tomac / yersinia

A framework for layer 2 attacks
GNU General Public License v2.0
702 stars 119 forks source link

DHCP ciaddr unable to set to 0 for DHCPDECLINE #83

Open soxrok2212 opened 11 months ago

soxrok2212 commented 11 months ago

According to RFC 2131 page 36, DHCP ciaddr should be set to the client's MAC address in the case of a DHCPRELEASE message. However, for a DHCPDECLINE, it should be set to 0. However, the parser requires it be set to an IP address.

https://github.com/tomac/yersinia/blob/master/src/dhcp.h#L269-L270

soxrok2212 commented 11 months ago

This can be reproduced on the CLI with the -ci arg, e.g. yersinia dhcp -source xx:xx:xx:xx:xx:xx -interface eth0 -attack 0 -dest yy:yy:yy:yy:yy:yy -htype 1 -hlen 6 -hops 0 -xid 12345678 -ch xx:xx:xx:xx:xx:xx -ci 0