Nmap Development mailing list archives
[NSE] Detecting IP forwarding
From: Patrik Karlsson <patrik () cqure net>
Date: Sun, 22 Apr 2012 20:55:10 +0200
Hi all, I had a discussion about ip forwarding and "internet connection sharing" with a friend the other day. The discussion was about detecting multi homed laptops having both the wireless and wired network interfaces active and ip forwarding enabled. I came up with the attached script which essentially tries to use each scanned host as a gateway and sends a ping packet to a given target (either on the same LAN or routed). It then sees whether it gets a ICMP echo reply or redirect back and determines whether the packet was forwarded or not. I've tried it against Windows 7 connection sharing, my home router and a OS X server with ip forwarding activated and it works as intended. If there's another more efficient way to discover this, let me know, otherwise I will commit the script within the next few days. The script relies on some recent changes to packet.lua, so it needs this to be updated library as well. Cheers, Patrik -- Patrik Karlsson http://www.cqure.net http://twitter.com/nevdull77
Attachment:
ip-forwarding.nse
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Detecting IP forwarding Patrik Karlsson (Apr 22)
- Re: [NSE] Detecting IP forwarding Daniel Miller (May 01)
- Re: [NSE] Detecting IP forwarding Patrik Karlsson (May 01)
- Re: [NSE] Detecting IP forwarding Daniel Miller (May 01)