|
|||||||||||
|
Gobbler 1.8 Alpha
From: <root(at)networkpenetration.com>
Date: Mon Feb 17 2003 - 20:24:59 EST ('binary' encoding is not supported, stored as-is) just thought i would let u know about a tool i am workin on..... use's libnet to do some stuff..... u will have to read to see what it does :) The latest version 1.8 alpha is available from http://gobbler.sourceforge.net big thanks to Mike Schiffman for writing libnet..... i dunno where i would of started coding this without libnet :) Network Penetration
The Gobbler - A tool to audit DHCP networks
Copyright (C) 2003
1 Introduction
1.1 What is DHCP a acronym for?
1.2 Why write this program?
2 Install Instructions
Libraries required: Libpcap 0.7.1 http://freshmeat.net/projects/libpcap/ Libnet 1.1.1-PRERELEASE http://www.packetfactory.net Libdnet 1.5 http://libdnet.sourceforge.net Once libraries are installed, compile using: ./Compile.sh You may have to edit the Compile.sh file to point to the right places for the above libraries. I have also heard about problems with libnet-config, you may need to copy the libnet-config from the directory where u compiled it, to /usr/bin.
3 How it works
3.1 Dynamically Assigned Distributed Spoofed Stateless Port Scanning
***WARNING***
3.2 Non Dynamically Assigned Distributed Spoofed Stateless Port Scanning
***WARNING***
Non dynamic portscanning is basically the same as above but from step 3 onwards. Also the source IP and MAC are the ones specified on the command line, opposed to the gobbled addresses.
3.3 Distributed scanning howto
The source IP's needs to reply to arp requests as the target needs to know where to return the packets. If the target is on the local subnet, the target will send the arp request otherwise the default gateway will issue the request. Either is not a problem as it is just replying to a packet :) A couple of other things, if the gobbler needs to do a arp request for the target MAC it does so from a spoofed host (incase you were wondering). And also at the moment there is no support for DNS lookups... still need to write the code to do the lookups from spoofed sources (all in good time)
3.3 Why stateless?
Stateless is slightly different the kernel doesn't know that a SYN packet has been sent and in turn relies on the sniffer to notify that a port is open (SYN/ACK). The advantage of this method is that the program can send packets at high speed without the need to maintain a process control block for that connection. Thus reducing overheads within the kernel and speeding up the scan. This scanning method of using a gobbled IP address could be used for gobbled and that range of IP's could then be used to scan a host. One advantage could be bypassing IDS's, as many keep state of what is being scanned by the source IP address. If multiple IP addresses are used the IDS might not pick up the scan. Check out paketto on www.doxpara.com by Dan Kaminsky for more info on stateless portscanning. 3.5 OSSTM
4 Other misc info
4.1 ARP scan
"/BSD: Arp: ether address is broadcast IP address 255.255.255.255". This is because the mac address for arp broadcasts is 00:00:00:00:00:00 and not ff:ff:ff:ff:ff:ff thus a error is detected and logged A openBSD box will not reply to this type of scanning, where as a windows machine will. (one method of possibly fingerprinting targets?)
4.2 Bugs
they are not my fault.... problems in libnet and the gobbler not giving the kernel enough time to free a list inside libnet. I have tried to slow the gobbler down as much as possible to ensure these errors do not occur. The program does crash during a dhcp gobble, A class C network would be easy to DoS but when it comes to class B the program crashes (still in alpha testing)
4.3
Detecting filtered ports results
For example:
Sniffer results
tested on p3 1g 128mb laptop running Mandrake 8
tcpdump drops on average 2950 packets
Any packets dropped are apparently done so by the kernel and the limitations of tcpdump..... check out Martin Roesch's presentation on snort (www.blackhat.com) for more info on the limitations of tcpdump. The gobbler is not designed to be a sniffer but has a sniffer core do i decided to add a switch to output data. As it is not designed to be a sniffer the output will be all over the place especially since it is multithreaded..... and the randomness of context switching ensures that the output will not match up... and i did not want to slow down the sniffing just to ensuring a correct packet dump. e.g. the contents of the ip packets could be printed followed by the the contents the tcp header of a different packet. This would be due to a context switch between the packet headers being printed on the screen. nmap by fydor is available from www.insecure.org.nmap tcpdump is available from www.tcpdump.org tethereal is the text version of ethereal available from www.ethereal.com
4.5
www.networkpenetration.com
ChangeLog Alpha 1.8 Added multiple methods for arp scan (from broadcast address, from gobbled host, from specified host). Slowed down arp scan.... increased chance of getting replies. Added dont reply to icmp echo request switch (-r). Fixed arp scan again.... message on bsd boxes now doesn;t appear... changed broadcast src mac from ff:ff:ff:ff:ff:ff to 00:00:00:00:00:00 Moved startlibnet() to b4 parsing args as if random mac was selected the same MAC addressess were used (not seeding random until after so moved it) Changed results (fixed minor timing bugs and removed irrelevant info). added reply to udp scans with ICMP port unavailable (-O command line opens a specified UDP port). added reply to half open syn scans and tcp connects. Send RST or if port specified -o open send SYN ACK. added create single host option for testing gobblers broken TCP/IP stack. Changed portscan timings... now sleep 750 000 00 nanosecs every X ports scanned (increased portscan reliabilty 10 fold). Reduced default endwait time from 5 to 2 seconds... as the scan is slower we don;t have to wait aslong Fixed major bug in scanning routine..... OSSTM was scanning both OSSTM ports and NMAP ports Added filtered port detection and rescan..... if port doesn;t reply retry, if still no reply port = filtered added subnet mitm attack (gobble 4 ip's dhcp server, dns server, default gw and client addr, and send to client when requested) default portscans (osstm and nmap services) now take around 20 to 40 seconds depending on how filtered scanning filtered ports slower than initial scanning phase Added start portscan signal (after portscan threads initialized signal it to start) Added real nmap ports (-Pr) opposed to just nmap services (real = 1605, services = 1153, OSSTM = 1233) Alpha 1.5
Distributed port scanning using either DHCP to decide on the source or source specified on command line
Display MAC address of DHCP servers to detect rogue dhcp servers (unless rogue server is spoofing its mac address)
Added NMAP service ports (array)
Alpha 1
Multithreaded pthread_mutex_locking around pcap_next sniffer (another mouthful... good job its the gobbler were talking about) Multithreaded ARP scanner
portscanner - decide on route and issue arp request
*All (simple count increment) *OSSTM (array of ports) *libnet port list - had to be converted to a linked list for thread concurrency issues
gobbled IP-reply to arp request
DoS DHCP server
Packet stats + various timers displayed on exit
Sniffer decodes-Ethernet frame
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com For additional commands, e-mail: libnet-help@securityfocus.com Received on Mon Feb 17 20:25:32 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:22 EDT |
||||||||||
|
|||||||||||