In this challenge, I hosted a second DHCP server on the network.
This really wasn't that fancy and could've been done better, the challenge description just read "Repeatedly inform yourself about vendor information of DHCP servers running on this network."
All the server did was listen for DHCPINFORM broadcast-messages which asked for VendorSpecificInformation
The server then replied with a DHCP message containing fragments of the flag inside the option for vendor specific information.
Forging your message like this suffices:
msg->op = dhcp::BOOTREPLY;
msg->htype = dhcp::HardwareType::Ethernet10Mb;
msg->hlen = 0;
msg->hops = 0;
msg->xid = + ;
msg->secs = 0;
msg->flags = FLAG_BROADCAST;
msg->magic = MAGIC_COOKIE;
msg->ciaddr.s_addr = 0;
msg->yiaddr.s_addr = 0;
msg->siaddr.s_addr = 0;
msg->giaddr.s_addr = 0;
;
;
;
*msg. = dhcp::MsgType::DHCPINFORM;
*msg. = dhcp::Option::ViVendorSpecificInformation;