Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panics in Modbus scanner #265

Merged
merged 2 commits into from
May 29, 2020
Merged

Fix panics in Modbus scanner #265

merged 2 commits into from
May 29, 2020

Conversation

bwireman
Copy link
Contributor

@bwireman bwireman commented May 28, 2020

Technical Changes

  • removes fatalf in scan()
  • check message and body length in GetModbusResponse()

How to Test

I looked at a couple of the modbus panic logs and tested against those IPs

./zgrab2 modbus -p 7000 <<< 221.132.95.154
./zgrab2 modbus <<< 133.34.157.97
./zgrab2 modbus <<< 133.34.157.117
./zgrab2 modbus <<< 133.34.157.24
./zgrab2 modbus <<< 133.34.157.25
./zgrab2 modbus <<< 61.155.174.55
./zgrab2 modbus <<< 210.253.251.215
./zgrab2 modbus <<< 218.45.180.18
./zgrab2 modbus -p 3001 <<< 60.221.39.185

@bwireman bwireman changed the title [DATA-568] Fix panics in Modbus scanner Fix panics in Modbus scanner May 28, 2020
Copy link
Member

@codyprime codyprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Can you squash 0c58bce into de37a87, so that a new bug doesn't exist (momentarily) on the master branch, for the sake of git-bisect?

@bwireman
Copy link
Contributor Author

bwireman commented May 28, 2020

Looks good. Can you squash 0c58bce into de37a87, so that a new bug doesn't exist (momentarily) on the master branch, for the sake of git-bisect?

Sure, I'll just squash merge once CI finishes

@bwireman bwireman merged commit cfd48de into master May 29, 2020
@bwireman bwireman deleted the bw/modbus_panics branch May 29, 2020 17:07
AnthraX1 pushed a commit to AnthraX1/zgrab2 that referenced this pull request Jul 21, 2020
* Check message and body length in in GetModbusResponse()

* add timeout to waiting when PSQL container to start

zmap#265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants