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 scanning ourselves with privileged scans #36

Open
kwesthaus opened this issue Apr 2, 2020 · 0 comments
Open

Fix scanning ourselves with privileged scans #36

kwesthaus opened this issue Apr 2, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@kwesthaus
Copy link
Owner

Currently, the socket created for privileged scans checks EVERY packet your computer receives, and returns the one that has a source IP equal to the target (since this should be our target's response). However, when we scan ourselves, the original scan packet matches and is returned, which confuses the scan logic. The simple way to fix this would be to add a check to see if we are scanning ourselves, and if so, return the second packet which matches (the response) instead of the first (the scan).

However, now that I think about this, we should check first if either of the options below makes it so we only get responses back since they would be cleaner.

  • not setting IP_HDRINCL on the socket (and not crafting the IP header ourselves)
  • binding our socket to a specific port before we send packets
@kwesthaus kwesthaus added the bug Something isn't working label Apr 2, 2020
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