-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
165 lines (123 loc) · 3.95 KB
/
init.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!/bin/bash
##########################################
# Functions
##########################################
#relies in git and python being downloaded
function getTools {
wget -q -O - archive.kali.org/archive-key.asc | sudo apt-key add -
declare -a packages
packages=("hydra" "hashcat" "john" "dirbuster" "cewl" "nikto" "sqlmap" "burp" "msfconsole")
for pkg in "${packages[@]}"
do
sudo apt-get install $pkg -y
done
echo "Finished Installing Packages"
}
function commentRepo {
echo '[-] Removing kali repo to /etc/apt/sources.list'
sed -i 's/deb http:\/\/http.kali.org\/kali kali-rolling main non-free contrib/#deb http:\/\/http.kali.org\/kali kali-rolling main non-free contrib/g' /etc/apt/sources.list
apt-get update -y
}
function checkRoot {
if [ "$EUID" -ne 0 ]
then echo "Please run with sudo permissions."
exit
fi
}
##########################################
# INIT
##########################################
checkRoot
CURR_DIR=$(pwd)
if ! command -v git &> /dev/null
then
echo '[+] Installing git...'
apt-get install git
fi
### Check for Kali Repo
CHECK=$(cat /etc/apt/sources.list | grep kali)
if [[ "$CHECK" == "" ]]
then
echo '[+] Updating system...'
apt-get update -y
getTools
commentRepo
else
# add kali repo to /etc/apt/sources.list
echo '[+] Adding kali repo to /etc/apt/sources.list'
echo 'deb http://http.kali.org/kali kali-rolling main non-free contrib' >> /etc/apt/sources.list
echo '[+] Updating system...'
apt-get update -y
getTools
commentRepo
fi
##########################################
# WORDLISTS
##########################################
mkdir WORDLISTS
cd WORDLISTS
echo 'BEGINNING TO INSTALL WORDLIST'
echo '[+] Git cloning seclists in background...'
git clone https://github.com/danielmiessler/SecLists.git &
# enter wordlist repos
cd $CURR_DIR
##########################################
# TOOLS
##########################################
mkdir TOOLS
echo '[+] Installing python3...'
apt-get install python3 &
echo '[+] Installing python2...'
apt-get install python2 &
cd TOOLS
echo 'BEGINNING TO INSTALL TOOLS'
# msfconsole
echo '[+] Installing msfconsole in background...'
git clone https://github.com/rapid7/metasploit-framework &
# bloodhound - post exploitation graph of AD environment
echo '[+] Installing bloodhound in the background...'
git clone https://github.com/BloodHoundAD/BloodHound.git &
# nmap
echo '[+] Installing nmap...'
git clone https://github.com/nmap/nmap.git
# owasp zap
echo '[+] Installing owasp zap...'
git clone https://github.com/OWASP/www-project-zap
# fuff
echo '[+] Installing fuff...'
git clone https://github.com/ffuf/ffuf
# dirbuster
echo '[+] Installing dirbuster...'
git clone https://gitlab.com/kalilinux/packages/dirbuster.git
# gobuster
echo '[+] Installing gobuster...'
git clone https://github.com/OJ/gobuster.git
# impacket -- enumerate and dump hashes
echo '[+] Installing impacket...'
git clone https://github.com/SecureAuthCorp/impacket.git
# linpeas/winpeas -- linux/windows priv escalation script
echo '[+] Installing linpeas/winpeas...'
git clone https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
# aquatone -- vuln scanner produces html w screenshots
echo '[+] Installing aquatone...'
git clone https://github.com/michenriksen/aquatone.git
# smod - scada pentesting framework using python 2.7
echo '[+] Installing smod...'
git clone https://github.com/trouat/smod.git
# sqlmap
echo '[+] Installing sqlmap...'
git clone https://github.com/sqlmapproject/sqlmap.git
cd $CURR_DIR
##########################################
# SHELLS
##########################################
mkdir SHELLS
cd SHELLS
echo 'BEGINNING TO INSTALL SCRIPTS'
# nishang
echo '[+] Installing nishang...'
git clone https://github.com/samratashok/nishang.git
echo '[+] Installing php-webshells'
git clone https://github.com/JohnTroony/php-webshells.git
cd $CURR_DIR
echo '[+] Done'