Skip to content

Commit 0131b3b

Browse files
committed
2 parents 61259fc + 56b1739 commit 0131b3b

10 files changed

+541
-68
lines changed

.idea/WAES.iml

100644100755
+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/e.xml

100644100755
+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

100644100755
File mode changed.

.idea/vcs.xml

100644100755
+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/watcherTasks.xml

100644100755
File mode changed.

LICENSE

+339
Large diffs are not rendered by default.

README.md

+58-22
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,83 @@
1-
**Note:** Make sure directories are correct in supergobuster.sh
21

3-
## WAES
2+
![GitHub Logo](banner.png)
3+
4+
## CPH:SEC WAES at a Glance
5+
6+
Doing HTB or other CTFs enumeration against targets with HTTP(S) can become trivial.
7+
It can get tiresome to always run the same script/tests on every box eg. nmap, nikto, dirb and so on. A one-click on target with automatic reports coming solves the issue. Furthermore, with a script the enum process can be optimized while saving time for hacker. This is what **CPH:SEC WAES** or _Web Auto Enum & Scanner_ is created for. WAES runs 4 steps of scanning against target (see more below) to optimize the time spend scanning. While multi core or multi-threaded scanning could be implemented it will almost surely get boxes to hang and so is undesirable.
8+
* From current version and forward WAES will include an install script (see blow) as project moves from alpha to beta phase.
9+
* WAES could have been developed in python but good bash projects are need to learn bash.
10+
* WAES is currently made for CTF boxes but is moving towards online uses (see todo section)
11+
12+
## To install:
13+
14+
```
15+
1. $> git clone https://github.com/Shiva108/WAES.git
16+
2. $> cd WAES
17+
2. $> sudo ./install.sh
18+
```
19+
20+
Make sure directories are set correctly in supergobuster.sh.
21+
Should be automatic with Kali & Parrot Linux.
22+
* Standard directories for lists : SecLists/Discovery/Web-Content & SecLists/Discovery/Web-Content/CMS
23+
* Kali / Parrot directory list : /usr/share/wordlists/dirbuster/
24+
25+
26+
## To run WAES
427
Web Auto Enum & Scanner - Auto enums website(s) and dumps files as result.
528

6-
########################################################################
29+
##############################################################################
730

831
Web Auto Enum & Scanner
932

1033
Auto enums website(s) and dumps files as result
1134

12-
########################################################################
35+
##############################################################################
1336

14-
Usage: waes.sh -u {url}
37+
Usage: waes.sh -u {IP}
1538
waes.sh -h
1639

1740
-h shows this help
18-
-u url to test without http or https e.g. google.com
41+
-u IP to test eg. 10.10.10.123
42+
-p port nummer (default=80)
1943

44+
Example: ./waes.sh -u 10.10.10.130 -p 8080
2045

2146

22-
### Method
47+
## Enumeration Process / Method
2348

2449
WAES runs ..
2550

26-
+ whatweb
27-
+ OSIRA (same author)
28-
+ nmap
29-
- standard scripts (-sC)
30-
- http-enum
31-
- vulners.nse
32-
+ nikto
33-
+ uniscan
51+
Step 0 - Passive scan - (disabled in the current version)
52+
+ whatweb - aggressive mode
53+
+ OSIRA (same author) - looks for subdomains
54+
55+
Step 1 - Fast scan
56+
+ wafw00 - firewall detection
57+
+ nmap with http-enum
58+
59+
Step 2 - Scan - in-depth
60+
+ nmap - with NSE scripts: http-date,http-title,http-server-header,http-headers,http-enum,http-devframework,http-dombased-xss,http-stored-xss,http-xssed,http-cookie-flags,http-errors,http-grep,http-traceroute
61+
+ nmap with vulscan (CVSS 5.0+)
62+
+ nikto - with evasion A and all CGI dirs
63+
+ uniscan - all tests except stress test (qweds)
64+
65+
Step 3 - Fuzzing
3466
+ super gobuster
3567
- gobuster with multiple lists
3668
- dirb with multiple lists
37-
69+
+ xss scan (to come)
3870

3971
.. against target while dumping results files in report/ folder.
4072

4173

42-
### To Do
43-
+ Simplify tools check
44-
+ Adding FD tools: https://github.com/chrispetrou/FDsploit
45-
46-
47-
74+
## To Do
75+
+ Implement domain as input
76+
+ Add XSS scan
77+
+ Add SSL/TLS scanning
78+
+ Add domain scans
79+
+ Add golismero
80+
+ Add dirble
81+
+ Add progressbar
82+
+ Add CMS detection
83+
+ Add CMS specific scans

nmap-vulners

-1
This file was deleted.

supergobuster.sh

+21
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#!/bin/bash
2+
3+
# Standard directories for lists : SecLists/Discovery/Web-Content & SecLists/Discovery/Web-Content/CMS
4+
# Kali / Parrot directory list : /usr/share/wordlists/dirbuster/
5+
26
set -eu
37

48
URL=$1
59

10+
<<<<<<< HEAD
611
echo "super go bustering for super brute: -u $URL"
712

813
gobuster dir -u $URL -w /home/e/CTF-notes/SecLists/Discovery/Web-Content/tomcat.txt --wildcard
@@ -17,3 +22,19 @@ gobuster dir -u $URL -w /usr/share/wordlists/dirbuster/directory-list-2.3-medi
1722
gobuster dir -u $URL -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x php --wildcard
1823
gobuster dir -u $URL -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x doc --wildcard
1924
gobuster dir -u $URL -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x docx --wildcard
25+
=======
26+
echo "super gobustering for super brute: $URL"
27+
28+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w SecLists/Discovery/Web-Content/tomcat.txt
29+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w SecLists/Discovery/Web-Content/nginx.txt
30+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w SecLists/Discovery/Web-Content/apache.txt
31+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w SecLists/Discovery/Web-Content/RobotsDisallowed-Top1000.txt
32+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w SecLists/Discovery/Web-Content/ApacheTomcat.fuzz.txt
33+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w SecLists/Discovery/Web-Content/CMS/sharepoint.txt
34+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /usr/share/dirb/wordlists/vulns/iis.txt
35+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
36+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x txt
37+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x php
38+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x doc
39+
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -e -x docx
40+
>>>>>>> 56b17398b9ba8589c6a8aa43aee0262070e1629f

waes.sh

+111-43
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
#!/usr/bin/env bash
22
# 2018-2019 by Shiva @ CPH:SEC
3+
<<<<<<< HEAD
34

45
# WAES requires vulners.nse : https://github.com/vulnersCom/nmap-vulners
56
# WAES requires supergobuster : https://gist.github.com/lokori/17a604cad15e30ddae932050bbcc42f9
67
# WAEs requires SecLists : https://github.com/danielmiessler/SecLists
78

9+
=======
10+
>>>>>>> 56b17398b9ba8589c6a8aa43aee0262070e1629f
811

912
# Script begins
1013
#===============================================================================
1114

15+
# set -x # Starts debugging
1216

1317
# vars
14-
VERSION="0.0.3b"
15-
VULNERSDIR="nmap-vulners" # Where to find vulners.nse
18+
VERSION="0.0.36 alpha"
19+
VULNERSDIR="vulscan" # Where to find vulscan
1620
REPORTDIR="report" # /report directory
17-
TOOLS=( "nmap" "nikto" "uniscan" "gobuster" "dirb" "whatweb" )
18-
# SECLISTDIR="SecLists"
21+
TOOLS=( "nmap" "nikto" "uniscan" "gobuster" "dirb" "whatweb" "wafw00f" )
22+
HTTPNSE=( "http-date,http-title,http-server-header,http-headers,http-enum,http-devframework,http-dombased-xss,http-stored-xss,http-xssed,http-cookie-flags,http-errors,http-grep,http-traceroute" )
23+
PORT=80 # Setting std port
24+
COUNT=-1 # For tools loop
1925

2026
#banner / help message
2127
echo ""
2228
echo -e "\e[00;32m#############################################################\e[00m"
2329
echo ""
2430
echo -e " Web Auto Enum & Scanner $VERSION "
2531
echo ""
26-
echo -e " Auto enums website(s) and dumps files as result"
32+
echo -e " Auto enums HTTP port and dumps files as result"
2733
echo ""
2834
echo -e "\e[00;32m#############################################################\e[00m"
2935
echo ""
@@ -34,15 +40,28 @@ echo "Usage: ${0##*/} -u {url}"
3440
echo " ${0##*/} -h"
3541
echo ""
3642
echo " -h shows this help"
37-
echo " -u url to test without http or https e.g. testsite.com"
43+
echo " -u IP to test eg. 10.10.10.123"
44+
echo " -p port number (default=80)"
45+
echo ""
46+
echo " Example: ./waes.sh -u 10.10.10.130 -p 8080"
3847
echo ""
3948
}
4049

50+
if [[ `id -u` -ne 0 ]] ; then echo -e "\e[01;31m[!]\e[00m This program must be run as root. Run again with 'sudo'" ; exit 1 ; fi
51+
4152
# Checks for input parameters
4253
: ${1?"No arguments supplied - run waes -h for help or cat README.md"}
4354

55+
# Showing parameters - for debugging only
56+
#echo "Positional Parameters"
57+
#echo '$0 = ' $0
58+
#echo '$1 = ' $1
59+
#echo '$2 = ' $2
60+
#echo '$3 = ' $3
61+
#echo '$4 = ' $4
4462

45-
if [ $1 == "-h" ]
63+
# Parameters check
64+
if [[ $1 == "-h" ]]
4665
then
4766
usage
4867
exit 1
@@ -54,47 +73,93 @@ if [[ "$1" != "-u" && "$1" != "-h" ]]; then
5473
exit 1
5574
fi
5675

57-
# Check for nmap
58-
which nmap>/dev/null
59-
if [ $? -eq 0 ]
60-
then
61-
echo ""
62-
else
63-
echo ""
64-
echo -e "\e[01;31m[!]\e[00m Unable to find the required nmap program, install and try again"
65-
exit 1
76+
if [[ "$3" = "-p" && "$4" != "" ]]; then
77+
PORT="$4"
78+
# echo "Port is set to: " $PORT
6679
fi
6780

68-
#Check for nikto
69-
which nikto>/dev/null
70-
if [ $? -eq 0 ]
71-
then
72-
echo ""
73-
else
74-
echo ""
75-
echo -e "\e[01;31m[!]\e[00m Unable to find the required nikto program, install and try again"
76-
exit 1
77-
fi
81+
# Tools installed check
82+
while [[ "x${TOOLS[COUNT]}" != "x" ]]
83+
do
84+
COUNT=$(( $COUNT + 1 ))
85+
if ! hash ${TOOLS[COUNT]} /dev/null 2>&1
86+
then
87+
echo -e "\e[01;31m[!]\e[00m ${TOOLS[COUNT]} was not found in PATH"
88+
echo "Run sudo ./install.sh to install tools"
89+
fi
90+
done
7891

79-
#Check for uniscan
80-
which uniscan>/dev/null
81-
if [ $? -eq 0 ]
82-
then
83-
echo ""
84-
else
85-
echo ""
86-
echo -e "\e[01;31m[!]\e[00m Unable to find the required uniscan program, install and try again"
87-
exit 1
88-
fi
92+
echo " "
93+
echo -e "Target: $2 port: $PORT"
8994

90-
# Check if root
91-
if [[ $EUID -ne 0 ]]; then
92-
echo ""
93-
echo -e "\e[01;31m[!]\e[00m This program must be run as root. Run again with 'sudo'"
94-
echo ""
95-
exit 1
96-
fi
95+
# Todo: Implement progressbar (bartest.sh)
96+
97+
passive() {
98+
99+
echo "Starting PASSIVE scans..."
100+
# Whatweb
101+
echo -e "\e[00;32m [+] Looking up "$2" with whatweb - only works for online targets" "\e[00m"
102+
whatweb -a 3 $2":"$PORT | tee ${REPORTDIR}/$2_whatweb.txt
103+
104+
# OSIRA - For subdomain enum
105+
echo -e "\e[00;32m [+] OSIRA against:" $2 " - looking for subdomains \e[00m"
106+
OSIRA/osira.sh -u $2":"$PORT | tee ${REPORTDIR}/$2_osira.txt
107+
}
108+
109+
fastscan() {
110+
111+
echo "Step 1: Starting fast scan... "
112+
# wafw00f
113+
echo -e "\e[00;32m [+] Detecting firewall "$2":"$PORT" with wafw00f" "\e[00m"
114+
wafw00f -a -v $2":"$PORT | tee $REPORTDIR/$2_wafw00f.txt
115+
# nmap http-enum
116+
echo -e "\e[00;32m [+] nmap with HTTP-ENUM script against $2" "\e[00m"
117+
nmap -sSV -Pn -T4 -p $PORT --script http-enum $2 -oA ${REPORTDIR}/$2_nmap_http-enum
118+
}
119+
120+
scan() {
121+
122+
echo "Step 2: Starting more in-depth scan... "
123+
# nmap
124+
echo -e "\e[00;32m [+] nmap with various HTTP scripts against $2" "\e[00m"
125+
nmap -sSV -Pn -T4 -p $PORT --script $HTTPNSE $2 -oA ${REPORTDIR}/$2_nmap_http-va
126+
echo -e "\e[00;32m [+] nmap with vulscan on $2 with min CVSS 5.0" "\e[00m"
127+
nmap -sSV -Pn -O -T4 --version-all -p $PORT --script ${VULNERSDIR}/vulscan.nse $2 --script-args mincvss=5-0 -oA ${REPORTDIR}/$2_nmap_vulners
128+
129+
# nikto
130+
echo -e "\e[00;32m [+] nikto on $2" "\e[00m"
131+
nikto -h $2 -port $PORT -C all -ask no -evasion A | tee $REPORTDIR/$2_nikto.txt
132+
133+
# uniscan
134+
echo -e "\e[00;32m [+] uniscan of $2" "\e[00m"
135+
uniscan -u $2":"$PORT -qweds | tee $REPORTDIR/$2_uniscan.txt
136+
}
137+
138+
fuzzing() {
139+
140+
echo "Step 3: Starting fuzzing... "
141+
# xsser
142+
# echo -e "\e[00;32m [+] xsser on $2" "\e[00m"
143+
# Todo: Implement Xsser (requires url not ip)
144+
145+
# Supergobuster: gobuster + dirb
146+
echo -e "\e[00;32m [+] super go busting $2" "\e[00m"
147+
./supergobuster.sh "http://"$2":"$PORT | tee $REPORTDIR/$2_supergobust.txt
148+
}
149+
150+
end() {
151+
echo -e "\e[00;32m [+] WAES is done. Find results in:" ${REPORTDIR} "\e[00m"
152+
}
153+
154+
# passive $1 $2 $3 $4 # Uncomment to run, work online for online targets Todo: Add in next version
155+
fastscan $1 $2 $3 $4
156+
scan $1 $2 $3 $4
157+
fuzzing $1 $2 $3 $4
158+
end $1 $2 $3 $4
159+
160+
# Todo: Add from rapidscan / golismero and others
97161

162+
<<<<<<< HEAD
98163
#
99164
echo -e "Target: $2 "
100165

@@ -130,3 +195,6 @@ echo -e "\e[00;32m [+] super go busting $2" "\e[00m"
130195
./supergobuster.sh $2 | tee $REPORTDIR/$2_supergobust.txt
131196

132197
echo -e "\e[00;32m [+] WAES is done. Find results in:" ${REPORTDIR} "\e[00m"
198+
=======
199+
# set +x # Ends debugging
200+
>>>>>>> 56b17398b9ba8589c6a8aa43aee0262070e1629f

0 commit comments

Comments
 (0)