-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoneclick.sh
139 lines (133 loc) · 4.61 KB
/
oneclick.sh
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/bin/bash
declare -a failed=()
declare -i index=0
#update the system
echo "[+] Update and upgrading the system"
apt update && apt upgrade -y
#norwegian lang
echo "[+] Adding norwegian lang to bash and zsh"
echo "setxkbmap no" >> /home/kali/.bashrc
echo "setxkbmap no" >> /home/kali/.zshrc
#update metasploit
echo "[+] Updating metasploit"
apt-get upgrade metasploit-framework
#programs you need
echo "setting up httpie"
curl -SsL https://packages.httpie.io/deb/KEY.gpg | gpg --dearmor -o /usr/share/keyrings/httpie.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/httpie.gpg] https://packages.httpie.io/deb ./" > /etc/apt/sources.list.d/httpie.list
apt update
echo "[+] Installing programs"
apt install -y tmux vim jq crowbar bloodhound
apt install -y httpie docker.io
apt install -y docker-compose
echo "[+] Enabling docker and adding user to docker"
systemctl enable docker --now
usermod -aG docker $USER
#python libs you need
echo "[+] Installing python packages"
{
sudo -u kali pip install pwntools
sudo -u kali pip install pycryptodome
} ||{
echo "[-] Error something went wrong with python package installation, continuing"
failed[$index]="python-packages"
index=$(($index+1))
}
#install sliver
echo "[+] Installing sliver"
{
curl https://sliver.sh/install| bash
} ||{
echo "[-] Error something went wrong with sliver installation, continuing"
failed[$index]="sliver"
index=$(($index+1))
}
# Github tools
echo "[+] Installing github libs"
gits=(
"https://github.com/ticarpi/jwt_tool.git"
"https://github.com/carlospolop/PEASS-ng.git"
"https://github.com/PowerShellMafia/PowerSploit.git"
"https://github.com/DominicBreuker/pspy.git"
"https://github.com/internetwache/GitTools.git"
"https://github.com/nidem/kerberoast.git"
"https://github.com/NetDirect/nfsshell.git"
"https://github.com/besimorhino/powercat.git"
"https://github.com/61106960/adPEAS.git"
"https://github.com/decalage2/oletools.git"
"https://github.com/turbo/zero2hero.git"
"https://github.com/kozmer/log4j-shell-poc.git"
"https://github.com/ropnop/kerbrute.git"
"https://github.com/pwndbg/pwndbg.git"
"https://github.com/mdsecactivebreach/SharpShooter.git"
#Placeholder to not forget https://github.com/tyranid/DotNetToJScript.git
)
for i in "${gits[@]}"
do
cd /opt
git clone "$i"
done
for i in $(ls /opt/)
do
cd /opt
cd $i
{
sudo -u kali pip install -r requirements.txt
} || {
echo "no requirements"
}
done
cd /usr/share/wordlists
git clone https://github.com/danielmiessler/SecLists.git
git clone https://github.com/stealthsploit/OneRuleToRuleThemStill.git
gunzip ./rockyou.txt.gz
#install ngrok
echo "[+] Installing ngrok"
{
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | tee /etc/apt/sources.list.d/ngrok.list
apt update && apt install ngrok
} ||{
echo "[-] Error something went wrong with ngrok installation, continuing"
failed[$index]="ngrok"
index=$(($index+1))
}
echo "[+] Getting linpeas and winpeas"
{
cd /opt/PEASS-ng/linPEAS/
wget https://github.com/carlospolop/PEASS-ng/releases/download/20240124-4b54e914/linpeas.sh
cd /opt/PEASS-ng/winPEAS/
wget https://github.com/carlospolop/PEASS-ng/releases/download/20240124-4b54e914/winPEAS.bat
wget https://github.com/carlospolop/PEASS-ng/releases/download/20240124-4b54e914/winPEASx64.exe
wget https://github.com/carlospolop/PEASS-ng/releases/download/20240124-4b54e914/winPEASany_ofs.exe
wget https://github.com/carlospolop/PEASS-ng/releases/download/20240124-4b54e914/winPEASx86_ofs.exe
} || {
echo "[-] Error something went wrong with linPEAS or winPEAS get, continuing"
failed[$index]="linPEAS/winPEAS"
index=$(($index+1))
}
echo "[+] Installing Go"
{
cd /home/kali/Downloads
wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
}||{
echo "[-] Error could not install go"
failed[$index]="go"
index=$(($index+1))
}
echo "[+] Installing pwndbg"
{
cd /opt/pwndbg
./setup.sh
echo "source /opt/pwndbg/gdbinit.py" >> /home/kali/.gdbinit
}||{
echo "[-] Error could not install pwndbg"
failed[$index]="pwndbg"
index=$(($index+1))
}
if (( ${#failed[@]} )); then
echo "Following parts of the script failed"
echo "${failed[@]}"
fi
echo "[+] Script done!"