description = [[ Detects whether the D-Link DIR-600M or DIR-615 router is vulnerable to Incorrect Access Control Vulnerability (CVE-2019-13101). ]] --- -- @usage: -- nmap -p 80 -n --open --script dlink-cve-2019-13101 . --- author = "Devendra Singh Solanki" license = "Same as Nmap--See https://nmap.org/book/man-legal.html" categories = {"discovery", "vuln", "exploit"} local http = require "http" local shortport = require "shortport" local stdnse = require "stdnse" local string = require "string" portrule = shortport.http local uri = "/wan.htm" function action (host, port) local response = http.get(host, port, uri, { header = { ["User-Agent"] = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" } }, { no_cache = true }) if( response.body and response.status == 200 ) and response.body:match("PPPoE") then return ("Router is vulnerable to CVE-2019-13101") end end