Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FingerprintUSBHost implementation to detect OS #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified ESPortal-Templates/error.html
100644 → 100755
Empty file.
Empty file modified ESPortal-Templates/spoof_other.html
100644 → 100755
Empty file.
Empty file modified ESPortal-Templates/welcome.html
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
19 changes: 18 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Select Sketch - Include Library - Manage Libraries. Search for "Json".
Install "ArduinoJson by Benoit Blanchon version 5.11.0" and click "Close"  
Download https://github.com/exploitagency/esp8266FTPServer/archive/feature/bbx10_speedup.zip
Click Sketch - Include Library - Add .ZIP Library and select bbx10_speedup.zip from your Downloads folder.
Download https://github.com/keyboardio/FingerprintUSBHost/archive/master.zip
Click Sketch - Include Library - Add .ZIP Library and select FingerprintUSBHost-master.zip from your Downloads folder.
The Arduino IDE is now configured and ready for the code.

Use git to clone this repo: https://github.com/exploitagency/ESPloitV2.git
Expand Down Expand Up @@ -172,6 +174,10 @@ To make a generic delay:
-"Delay"
--"Delay" would wait for The Default Delay x 2 before proceeding to next item in payload

To detect the OS of the victim computer:
-"GetOS:"
--"After executing the command "GetOS:" in the Exfiltrate section an OS.txt file will appear. In this file you can find the operating system that has the victim computer."

For individual keypresses or combinations of key presses:
-"Press:X" or "Press:X+Y" or "Press:X+Y+Z" and so forth
--Expects Decimal Key Code Values for X,Y,Z,etc
Expand Down Expand Up @@ -311,7 +317,18 @@ The victim is forced to access the URL above and now under "List Exfiltrated Dat
For FTP exfiltration method use the credentials configured in the "Configure ESPloit" page. Also note that only Passive Mode FTP is supported.

See the example payloads for more in depth examples.


-----
Detect OS
-----

Based on the Keyboardio FingerprintUSBHost library.

Inspect USB Descriptors and guess the host operating system based on markers it sees.

Execute the "GetOS:" command in the textarea or in a payload.
After executing the command "GetOS:" in the Exfiltrate section an OS.txt file will appear. In this file you can find the operating system that has the victim computer.

-----
ESPortal Credential Harvester(Phisher)
-----
Expand Down
Empty file modified flashing/README.md
100644 → 100755
Empty file.
Empty file modified flashing/esp8266Programmer/esp8266Programmer.ino
100644 → 100755
Empty file.
Empty file modified images/MainMenu.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified payloads/LinExfilWiFiCreds.txt
100644 → 100755
Empty file.
Empty file modified payloads/LinFTPExfiltrate.txt
100644 → 100755
Empty file.
Empty file modified payloads/LinHTTPExfiltrate.txt
100644 → 100755
Empty file.
Empty file modified payloads/LinSerialEXFIL.txt
100644 → 100755
Empty file.
Empty file modified payloads/WinHTTPExfiltrate.txt
100644 → 100755
Empty file.
Empty file modified payloads/WinPSFTPExfil.txt
100644 → 100755
Empty file.
Empty file modified payloads/WinSerialEXFIL.txt
100644 → 100755
Empty file.
Empty file modified payloads/blink.txt
100644 → 100755
Empty file.
Empty file modified payloads/kali2hiddenpayld.txt
100644 → 100755
Empty file.
Empty file modified payloads/macidentifykb.txt
100644 → 100755
Empty file.
Empty file modified payloads/mousetest.txt
100644 → 100755
Empty file.
Empty file modified payloads/winhiddenpayload.txt
100644 → 100755
Empty file.
Empty file modified payloads/winkiOSKhack.txt
100644 → 100755
Empty file.
Empty file modified payloads/winpropopups.txt
100644 → 100755
Empty file.
15 changes: 13 additions & 2 deletions source/Arduino_32u4_Code/Arduino_32u4_Code.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//Requires Keyboard and SoftwareSerial library
#include <Keyboard.h>
#include <Mouse.h>
#include "FingerprintUSBHost.h"
//#include <SoftwareSerial.h>

//Setup RX and TX pins to be used for the software serial connection
Expand All @@ -41,13 +42,14 @@
//const int debug=0;

String version = "2.2";
String os;

//Used later for determining if we are ready to release a key press or a combination of key presses
int keypressdone=0;

//Start serial interfaces and HID keyboard emulator
void setup() {

void setup() {
//Start up the ESP 8266
pinMode(13, OUTPUT);
digitalWrite(13,HIGH);
Expand All @@ -59,6 +61,9 @@ void setup() {
Serial1.begin(38400);
Serial.begin(38400);
Keyboard.begin();
delay(3000);
FingerprintUSBHost.guessHostOS(os);
delay(3000);
}

//Do-IT!
Expand Down Expand Up @@ -105,6 +110,12 @@ void loop() {
keypressdone=0;
}
}

//If command equals "GetOS"
else if(cmd.startsWith("GetOS")) {
Serial1.print("OS: ");
Serial1.println(os);
}

//If command equals "Print:X"
else if(cmd == "Print") {
Expand Down
Empty file modified source/Arduino_32u4_Code/LICENSE.txt
100644 → 100755
Empty file.
Empty file modified source/ESP_Code/Duckuino.h
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions source/ESP_Code/ESP_Code.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,13 @@ void loop() {
f.println(SerialEXFIL);
f.close();
}
else if(cmd == "OS"){
String os = Serial.readStringUntil('\n');
File f = SPIFFS.open("/OS.txt", "a+");
f.print("Target OS: ");
f.println(os);
f.close();
}
else if(cmd == "BlinkLED") {
String cmdinput = Serial.readStringUntil('\n');
int blinkcount = cmdinput.toInt();
Expand Down
Binary file modified source/ESP_Code/ESP_Code.ino.generic.bin
Binary file not shown.
Empty file modified source/ESP_Code/HelpText.h
100644 → 100755
Empty file.
Empty file modified source/ESP_Code/LICENSE.txt
100644 → 100755
Empty file.
Empty file modified source/ESP_Code/License.h
100644 → 100755
Empty file.
Empty file modified source/ESP_Code/inputmode.h
100644 → 100755
Empty file.
Empty file modified source/ESP_Code/spoof_page.h
100644 → 100755
Empty file.
Empty file modified source/ESP_Code/version.h
100644 → 100755
Empty file.