I posted the following question link on stack overflow and it was pointed out that I should possibly forward it to security exchange. For convenience the question is re-iterated below:
I started creating a script to automate host setup testing in Kali using python. I would like to know if there are any other "scans" that I am missing or that could be done in order to retrieve more information about a specific host?
I would also like to know if any of the current scans can be improved?
The code thus far is shown below:
#Automate test startup using IP Addresses
import os
def runTerminal(command,name):
os.system("gnome-terminal --tab -e 'bash -c \"" + command+" > "+name+"\"'")
testName = raw_input("Enter the name of the current test: ")
URL = raw_input("Enter the URL: ")
print "Current test: " + testName + " using host: "+ URL
initialURL = URL.split("://",1)[1]
if ':' in initialURL:
port = initialURL.split(":",1)[1]
else:
port = 0
shortURL=initialURL.split(":",1)[0]
print "URL : " + str(shortURL) + " Port: " + str(port)
#Scan web server for known vulnerabilities
print "Running Nikto..."
niktoCommand = "nikto -h "+ str(shortURL)
runTerminal(niktoCommand,testName+"Nikto.txt")
#transfer a URL or get basic headers
print "Running cURL..."
cURLCommand = "curl -kv "+ str(initialURL)
runTerminal(cURLCommand,testName+"Curl.txt")
#Network exploration tool and security / port scanner
print "Running Nmap..."
if port == 0:
NmapCommand = "nmap -sV -A "+str(shortURL)
else:
NmapCommand = "nmap -sV -A "+str(shortURL)+ " -p "+ port
runTerminal(NmapCommand,testName+"Nmap.txt")
#Web Content Scanner
print "Running Dirb..."
dirbCommand = " dirb "+str(URL)
runTerminal(dirbCommand,testName+"Dirb.txt")
#Fast SSL/TLS scanner
if port == 443:
print "Running SSLScan..."
sslCommand = " sslscan "+str(initialURL)
runTerminal(sslCommand,testName+"SSLScan.txt")
#Web Application Firewall Detection Tool
print "Running wafw00f..."
wafCommand = " wafw00f -av " +str(URL)
runTerminal(wafCommand,testName+"WafScan.txt")
#Scanner similar to dirb mixed with curl
print "Running UniScan..."
uniCommand = " uniscan -u " +str(URL)+" -qweds"
runTerminal(uniCommand,testName+"UniScan.txt")
So far the code takes in a project name in order to save a file, it also takes in a URL which then gets split as required by specific scans. From there it sends the scan specific commands to a function which runs the scan in a new terminal window.