
Nmap Development mailing list archives
Re: POC Payloader dat
From: Jay Fink <jay.fink () gmail com>
Date: Fri, 15 Jan 2010 20:19:57 -0500
On Wed, Jan 13, 2010 at 8:31 PM, David Fifield <david () bamsoftware com> wrote:
As for parsing, I think you can just keep adding to the payload as long as you're getting quoted strings (or comments). The first thing that's not quoted (or the end of the file) ends the payload. Once the payload has ended then you look at the next token--it might be "udp" or "source_port" or something--and then you know what to do next. In fact, you might want to use the format <proto> <ports> <name> instead of <name> <proto> <ports> just so there's no confusion about whether a token is a payload name or a keyword.
Right in lock step. The logic looks for <proto> and matches <port>,... (this is currently limited to two but I am working on a recursing it or a loop). Then anything in quotes is cat'd onto the payload. If the logic hits another valid proto keyword, it bails out, or if it hits the source keyword it returns the source port number. here some output, the payload is one string then the source port is returned (or 0 for now if one is not preferred) - I threw a false one in for fun: [20:15:13 jrf@argos:~/src/contrib]$ ./payload udp 5353 \x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x09_services\x07_dns-sd\x04_udp\x05local\x00\x00\x0C\x00\x01 0 [20:15:15 jrf@argos:~/src/contrib]$ ./payload udp 500 \x00\x11\x22\x33\x44\x55\x66\x77\x00\x00\x00\x00\x00\x00\x00\x00\x01\x10\x02\x00\x00\x00\x00\x00\x00\x00\x00\xC0\x00\x00\x00\xA4\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x98\x01\x01\x00\x04\x03\x00\x00\x24\x01\x01\x00\x00\x80\x01\x00\x05\x80\x02\x00\x02\x80\x03\x00\x01\x80\x04\x00\x02\x80\x0B\x00\x01\x00\x0C\x00\x04\x00\x00\x00\x01\x03\x00\x00\x24\x02\x01\x00\x00\x80\x01\x00\x05\x80\x02\x00\x01\x80\x03\x00\x01\x80\x04\x00\x02\x80\x0B\x00\x01\x00\x0C\x00\x04\x00\x00\x00\x01\x03\x00\x00\x24\x03\x01\x00\x00\x80\x01\x00\x01\x80\x02\x00\x02\x80\x03\x00\x01\x80\x04\x00\x02\x80\x0B\x00\x01\x00\x0C\x00\x04\x00\x00\x00\x01\x00\x00\x00\x24\x04\x01\x00\x00\x80\x01\x00\x01\x80\x02\x00\x01\x80\x03\x00\x01\x80\x04\x00\x02\x80\x0B\x00\x01\x00\x0C\x00\x04\x00\x00\x00\x01 500 [20:15:19 jrf@argos:~/src/contrib]$ ./payload udp 1812 \x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 0 [20:15:22 jrf@argos:~/src/contrib]$ ./payload udp 1646 0 [20:15:26 jrf@argos:~/src/contrib]$ ./payload udp 1645 \x01\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 0 _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: POC Payloader dat Jay Fink (Jan 12)
- Re: POC Payloader dat David Fifield (Jan 12)
- Re: POC Payloader dat Jay Fink (Jan 12)
- Re: POC Payloader dat David Fifield (Jan 12)
- Re: POC Payloader dat Jay Fink (Jan 13)
- Re: POC Payloader dat David Fifield (Jan 13)
- Re: POC Payloader dat Jay Fink (Jan 15)
- Re: POC Payloader dat Jay Fink (Jan 12)
- Re: POC Payloader dat David Fifield (Jan 12)