-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_deps.sh
More file actions
206 lines (185 loc) Β· 9.79 KB
/
Copy pathinstall_deps.sh
File metadata and controls
206 lines (185 loc) Β· 9.79 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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#!/bin/bash
# install_deps.sh β Install all WebPentest Suite v2.0.0 dependencies on Kali Linux
# ============================================================
# Installs: core tools, optional tools, Nuclei, Recon-ng,
# SpiderFoot, Burp Suite (Community), and Go toolchain
# ============================================================
RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' CYAN='\033[0;36m' RESET='\033[0m'
ok() { echo -e "${GREEN}[+]${RESET} $1"; }
info() { echo -e "${YELLOW}[*]${RESET} $1"; }
err() { echo -e "${RED}[-]${RESET} $1"; }
hdr() { echo -e "\n${CYAN}ββββ $1 ββββ${RESET}"; }
[[ $EUID -ne 0 ]] && err "Run as root: sudo ./install_deps.sh" && exit 1
# ββ System update ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "System Update"
apt-get update -qq
# ββ Core required tools ββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Core Tools"
apt-get install -y -qq \
nmap nikto gobuster whatweb \
sqlmap hydra curl whois \
dnsutils sslscan openssl \
python3 python3-pip \
git ruby-full \
wget unzip jq
# ββ Go (required for Nuclei & Subfinder) ββββββββββββββββββββββββββββββββββ
hdr "Go Toolchain"
if ! command -v go &>/dev/null; then
info "Installing Go..."
GO_VERSION="1.22.4"
GO_ARCH="linux-amd64"
wget -q "https://go.dev/dl/go${GO_VERSION}.${GO_ARCH}.tar.gz" -O /tmp/go.tar.gz
rm -rf /usr/local/go
tar -C /usr/local -xzf /tmp/go.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> /etc/profile
export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"
ok "Go $(go version) installed"
else
ok "Go already installed: $(go version)"
fi
export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"
# ββ Subfinder βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Subfinder"
if ! command -v subfinder &>/dev/null; then
apt-get install -y -qq subfinder 2>/dev/null || \
GO111MODULE=on go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest 2>/dev/null
ok "subfinder installed"
else
ok "subfinder already installed"
fi
# ββ testssl.sh ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "testssl.sh"
if ! command -v testssl.sh &>/dev/null; then
git clone --depth 1 https://github.com/drwetter/testssl.sh.git /opt/testssl 2>/dev/null
ln -sf /opt/testssl/testssl.sh /usr/local/bin/testssl.sh
ok "testssl.sh installed β /opt/testssl/"
else
ok "testssl.sh already installed"
fi
# ββ WPScan ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "WPScan"
if ! command -v wpscan &>/dev/null; then
gem install wpscan 2>/dev/null
ok "wpscan installed"
else
ok "wpscan already installed"
fi
# ββ JoomScan ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "JoomScan"
if ! command -v joomscan &>/dev/null; then
apt-get install -y -qq joomscan 2>/dev/null || \
git clone https://github.com/rezasp/joomscan.git /opt/joomscan 2>/dev/null && \
ln -sf /opt/joomscan/joomscan.pl /usr/local/bin/joomscan 2>/dev/null
ok "joomscan installed"
else
ok "joomscan already installed"
fi
# ββ droopescan ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "droopescan"
if ! command -v droopescan &>/dev/null; then
pip3 install droopescan -q 2>/dev/null
ok "droopescan installed"
else
ok "droopescan already installed"
fi
# ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# NEW IN v2.0.0
# ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# ββ Nuclei ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Nuclei (ProjectDiscovery)"
if ! command -v nuclei &>/dev/null; then
info "Installing Nuclei via Go..."
GO111MODULE=on go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest 2>/dev/null
# Copy to system path if go bin isn't in PATH for all users
[ -f "$HOME/go/bin/nuclei" ] && cp "$HOME/go/bin/nuclei" /usr/local/bin/nuclei
ok "nuclei installed"
else
ok "nuclei already installed: $(nuclei -version 2>&1 | head -1)"
fi
info "Updating Nuclei templates..."
nuclei -update-templates -silent 2>/dev/null && ok "Nuclei templates updated" || warn "Could not update templates"
# ββ Recon-ng ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Recon-ng"
if ! command -v recon-ng &>/dev/null; then
apt-get install -y -qq recon-ng 2>/dev/null || {
info "Installing recon-ng via pip3..."
pip3 install recon-ng -q 2>/dev/null || \
git clone https://github.com/lanmaster53/recon-ng.git /opt/recon-ng 2>/dev/null && \
pip3 install -r /opt/recon-ng/REQUIREMENTS -q 2>/dev/null && \
ln -sf /opt/recon-ng/recon-ng /usr/local/bin/recon-ng
}
ok "recon-ng installed"
else
ok "recon-ng already installed"
fi
# Pre-install commonly used recon-ng marketplace modules
if command -v recon-ng &>/dev/null; then
info "Installing recon-ng marketplace modules..."
echo "marketplace install recon/domains-hosts/hackertarget
marketplace install recon/domains-hosts/certificate_transparency
marketplace install recon/hosts-hosts/resolve
marketplace install recon/domains-contacts/whois_pocs
marketplace install recon/domains-vulnerabilities/xssed
exit" | recon-ng -q 2>/dev/null || true
ok "Recon-ng modules installed"
fi
# ββ SpiderFoot ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "SpiderFoot"
if ! command -v spiderfoot &>/dev/null && [ ! -f /opt/spiderfoot/sfcli.py ]; then
apt-get install -y -qq spiderfoot 2>/dev/null || {
info "Cloning SpiderFoot from GitHub..."
git clone https://github.com/smicallef/spiderfoot.git /opt/spiderfoot 2>/dev/null
cd /opt/spiderfoot && pip3 install -r requirements.txt -q 2>/dev/null
# Create wrapper script
cat > /usr/local/bin/spiderfoot << 'SFEOF'
#!/bin/bash
python3 /opt/spiderfoot/sfcli.py "$@"
SFEOF
chmod +x /usr/local/bin/spiderfoot
cd - > /dev/null
}
ok "SpiderFoot installed β /opt/spiderfoot/"
else
ok "SpiderFoot already installed"
fi
# ββ Burp Suite Community βββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Burp Suite"
if ! command -v burpsuite &>/dev/null && [ ! -f /opt/BurpSuiteCommunity/burpsuite_community.jar ]; then
info "Downloading Burp Suite Community Edition..."
BURP_URL="https://portswigger.net/burp/releases/download?product=community&type=Linux"
BURP_INSTALLER="/tmp/burpsuite_community_linux.sh"
wget -q "$BURP_URL" -O "$BURP_INSTALLER" 2>/dev/null && \
chmod +x "$BURP_INSTALLER" && \
"$BURP_INSTALLER" -q 2>/dev/null && \
ok "Burp Suite Community installed" || {
warn "Automatic install failed β download manually:"
warn " https://portswigger.net/burp/communitydownload"
warn "For Burp Suite Professional (recommended for API use):"
warn " https://portswigger.net/burp/pro"
}
else
ok "Burp Suite already installed"
fi
info "NOTE: Burp Suite REST API scanning requires Burp Suite Professional."
info " Enable REST API: Burp > User options > REST API > Enable."
info " Default API URL: http://127.0.0.1:1337"
# ββ Wordlists βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Wordlists"
apt-get install -y -qq wordlists 2>/dev/null
[ -f /usr/share/wordlists/rockyou.txt.gz ] && \
gunzip -f /usr/share/wordlists/rockyou.txt.gz 2>/dev/null
ok "Wordlists installed"
# ββ Summary βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hdr "Installation Complete"
echo ""
ok "WebPentest Suite v2.0.0 dependencies installed!"
echo ""
echo " Installed tools:"
for tool in nmap curl nikto gobuster whatweb sqlmap subfinder nuclei recon-ng spiderfoot burpsuite testssl.sh wpscan joomscan droopescan; do
command -v "$tool" &>/dev/null && echo -e " ${GREEN}β${RESET} $tool" || echo -e " ${RED}β${RESET} $tool (not in PATH)"
done
echo ""
echo " Run the suite: ./webpentest.sh -t https://target.com"
echo " Quick scan: ./webpentest.sh -t https://target.com --quick"
echo " With Burp API: ./webpentest.sh -t https://target.com --burp-api http://127.0.0.1:1337"
echo ""