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

Determine scanned-for port from client... #12

Open
infracritical opened this issue Aug 6, 2017 · 2 comments
Open

Determine scanned-for port from client... #12

infracritical opened this issue Aug 6, 2017 · 2 comments

Comments

@infracritical
Copy link

This might take a while to explain, but I will do my best.

When I conduct a port scan using 'nmap', I would like to know the port that it is trying to connect to. So, in this case, port 23 (telnet). Once port 23 is connected by 'nmap', I'd like to know on the server side that port 23 was just scanned from the client.

I don't profess to know Python (am a newbie when it comes to this object-oriented language), but so far, have had little to no luck, as Python doesn't seem to offer you more granular features when it comes to socketed connections.

Additionally, since port 8080 is acting as the proxy-forwarder, how can I ensure that I report back that it's port 23...and NOT port 8080?

@infracritical
Copy link
Author

Wanted to provide a graphical representation of what I think is the process. Essentially, 'iptables' is what's performing all of the heavy lifting, right?

image

@Ezequieltbh
Copy link
Contributor

Hi @infracritical !
If you want know the original port scanned by tools like Nmap, you can use the iptables logging for that.
Due to forwarding you cant use python server for that.
Here you can read more about that logging feature!

https://websistent.com/linux-iptables-log-everything/

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

No branches or pull requests

2 participants