I am trying to write a port scanner in C#. I did some research on port scanning methods.
If you are interested, these are the links I found useful:
- http://www.cs.wright.edu/~pmateti/InternetSecurity/Lectures/Probing/index.html ^PPT Presentation^
- http://www.auditmypc.com/freescan/readingroom/port_scanning.asp
- (old) NMAP - The Art of Port Scanning : http://nmap.org/nmap_doc.html
- Port Scanning Techniques : http://nmap.org/book/man-port-scanning-techniques.html
- Port Scanning Interactive Example : http://www.osischool.com/concept/communication/port-scanning
Coming to my question. These are the port scanning methods:
- TCP Connect() Scan
- TCP SYN Scan
- TCP FIN Scan
- TCP XMAS Scan
- TCP NULL Scan
- TCP Window Scan
- UDP Scan
But I implemented only TCP Connect() Scan
(shown here). But this is dead slow (taking >0.5sec to test each port). For implementing rest of the methods, I need the packet level access. I need to create raw packets. Is it possible to do that in C#? If so how to do that?