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

Missing open ports #1

Closed
Cr4ckC4t opened this issue Jul 31, 2021 · 0 comments
Closed

Missing open ports #1

Cr4ckC4t opened this issue Jul 31, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Cr4ckC4t
Copy link
Owner

Problem:
The first version of the code fails to always discover all open ports.

Inspecting the sent and received packets with Wireshark, it appears that although a request for every port is sent, the higher ports miss alot of responses. We get ~68,000 captured packets - 65,535 of which are requests!

Bombarding a machine with requests in such a short timespan (for(i=1; i < 65536; i++) without any delay) floods the target and eventually leads to missing responses from possibly open ports.

Possible fix:
Add an artificial delay between requests to avoid flooding the target.

Experimenting, it turns out that with a delay of 0.00015s we capture around 131,000 packets (out of at least 131.070 expected) at an approximate overall scan time of 30 seconds.

Essentialy, this means portcat could still be missing ~100 ports to check. Important. For a quick port checker it may be acceptable though.

Maybe allow for an easy-to-configure delay variable to tune the port-scanner from fast to reliable.

@Cr4ckC4t Cr4ckC4t added the bug Something isn't working label Jul 31, 2021
@Cr4ckC4t Cr4ckC4t self-assigned this Jul 31, 2021
@Cr4ckC4t Cr4ckC4t pinned this issue Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant