You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a cursory look at the implementation of the code, I reckon the UDP port scan would not work just because of how UDP protocol works. If the the code dials the target with UDP protocol e.g. conn, err = net.Dial("udp", raddr), there will not be any error message from the target server just because UDP is connectionless. A server will only reply when a "meaningful" packet is sent to the UDP port on the target. For more info - https://serverfault.com/a/416269
By the current way of checking for open/close UDP port i.e. presence of error dialing the target, all UDP ports would be open. Which defeats the purpose of a port scan.
I think to successfully do a UDP port scan, you may need a list of pre-determined list of services to probe for responses.
First construct a UDP packet request with a byte array that is expected from the service running on the UDP port. Then listen for the corresponding response byte array to check if the port is open. Something like this - https://github.com/antelman107/net-wait-go#udp-library-usage-example
I understand this is a lot of work so I'm just putting this out there for reference. I don't think I can do this on my own :D
Just a cursory look at the implementation of the code, I reckon the UDP port scan would not work just because of how UDP protocol works. If the the code dials the target with UDP protocol e.g.
conn, err = net.Dial("udp", raddr)
, there will not be any error message from the target server just because UDP is connectionless. A server will only reply when a "meaningful" packet is sent to the UDP port on the target. For more info - https://serverfault.com/a/416269By the current way of checking for open/close UDP port i.e. presence of error dialing the target, all UDP ports would be open. Which defeats the purpose of a port scan.
Alternatively, can refer to how
nmap
implements its UDP probe - https://nmap.org/book/scan-methods-udp-scan.htmlThe text was updated successfully, but these errors were encountered: