Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:




nmap-dev logo Nmap Development mailing list archives

[PATCH] Random decoy (-D) addresses
From: Kris Katterjohn <katterjohn () gmail com>
Date: Fri, 01 Jun 2007 12:31:09 -0500

Hey nmap-dev!

I attached a patch to add a "rnd" option to -D to generate a random,
non-reserved IP address for decoys.

I initially wrote this patch because I just wanted to be able to
generate traffic without having to type in a bunch of IP addresses by
hand when '-D rnd,rnd,rnd' etc. was easier (and with such a small
patch).  I thought that this might be useful for others sometimes (and
for other reasons), so I'm sending it here.  If people like it, I'll
stick it in the soc07 branch.

Well, please let me know what you think!


Thanks,
Kris Katterjohn
Index: nmap.cc
===================================================================
--- nmap.cc     (revision 4801)
+++ nmap.cc     (working copy)
@@ -892,6 +892,11 @@
          if (o.decoyturn != -1) 
            fatal("Can only use 'ME' as a decoy once.\n");
          o.decoyturn = o.numdecoys++;
+       } else if (!strcasecmp(p, "rnd")) {
+         do {
+           o.decoys[o.numdecoys].s_addr = get_random_u32();
+         } while (ip_is_reserved(&o.decoys[o.numdecoys]));
+         o.numdecoys++;
        } else {      
          if (o.numdecoys >= MAX_DECOYS -1)
            fatal("You are only allowed %d decoys (if you need more redefine MAX_DECOYS in nmap.h)", MAX_DECOYS);

Attachment: signature.asc
Description: OpenPGP digital signature


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]