mailing list archives
Nsock port scanning
From: Jacek Wielemborek <d33tah () gmail com>
Date: Mon, 06 Jan 2014 22:23:12 +0100
On CCC we talked a bit about the scanning pipeline and if I understood it
correctly, one of the steps we have to take first is to implement port scanning
using Nsock. Yesterday I finally got around to that and created nmap-nsock-scan
branch, where I wanted to experiment with adding TCP connect scanning using
Nsock. I'm happy to announce that I've got a proof of concept ready and I
wanted to ask you guys what should I do next.
Currently, it's implement as a separate Nmap switch, -sD. This creates an
nsock pool and schedules TCP connections for all specified ports for all the
targets, then enters the nsock main loop, which ends when all connections had
been established. It definitely doesn't feel like the most elegant solution -
for example nmap -sD -p- localhost/24 will result in:
libnsock nsock_make_socket(): Socket trouble: Too many open files
I'm looking for a way to implement it in a more sane manner - one of my ideas
is to schedule the connect() for the first port only and then in the connect
handler schedule next connections. Another idea is to schedule, say, 100
connections and if the 100th gets its handler fired, schedule another bundle.
BTW, I completely didn't worry about timing for now. Could you guys give any
hints on how would you expect that to work?
Description: This is a digitally signed message part.
Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/
- Nsock port scanning Jacek Wielemborek (Jan 06)