我在堆栈溢出上发布了以下问题链接,并指出可能将其转发到安全交换。为方便起见,现将问题重覆如下:
我开始创建一个脚本来使用python在Kali中自动化主机设置测试。我想知道是否有任何其他“扫描”,我错过了,或可以做,以检索更多的信息,一个特定的主机?
我也想知道目前的任何扫描是否可以改进?
迄今的守则如下:
#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")到目前为止,为了保存文件,代码接受一个项目名,它还接受一个URL,然后根据特定扫描的要求将URL拆分。从那里,它将扫描特定的命令发送到一个函数,该函数在一个新的终端窗口中运行扫描。
发布于 2017-04-12 14:57:30
我想在这个脚本中添加以下内容:
此外,确保您有良好的文字列表,您的Dirbuster/Nikto扫描,通常最简单的攻击向量是在“隐藏”的URL。
https://security.stackexchange.com/questions/157253
复制相似问题