This picture was extracted from Cody Brocious' talk at the BlackHat 2012 in Las Vegas.
More information can be found on Cody's website: http://daeken.com/blackhat-paper
SecurityPitfalls.org is a community project that collects situations where security fails. It's primarily for educational purpose, as source for discussions and presentations and for fun. If you have related material you want to share with others, just send in your photos, stories or movies to incoming {at} securitypitfalls.org.
description = [[
Reports possible user registration pages of the Drupal CMS,
available at the URL path "/user/register". Some Drupal
installations have this functionalty unintentionally left open.
]]
---
-- @usage
-- nmap -p 80 --script drupal-registration-page.nse example.com
--
-- @output
-- PORT STATE SERVICE
-- 80/tcp open http
-- | drupal-registration-page.nse: Possible CMS user registration
-- |_interface at: http://example.com:80/user/register
author = "mk"
license = "BSD license (3 clause)"
categories = {"safe", "discovery"}
require 'shortport'
require 'http'
require 'stdnse'
local url = "/user/register"
-- Strings that must be present in a working registration page
local positiveCriteria = {
"<form action=\"/user/register\"",
"<input type=\"text\" maxlength=\"64\" name=\"mail\""
}
-- Strings that must not be present in a working registration page
local negativeCriteria = {
"Access Denied",
"You are not authorized"
}
function portrule(host, port)
return shortport.http(host, port)
end
function action(host, port)
local httpResp
local msg = {}
-- Abort if the HTTP response is empty or not 200 OK
httpResp = http.get(host, port, url)
if httpResp.status ~= 200 or httpResp.body == "" then
return nil
end
-- Abort if known "access denied" strings are found
for k,v in pairs(negativeCriteria) do
if string.find(httpResp.body,v) then
return nil
end
end
-- Abort if known registration page strings cannot be found
for k,v in pairs(positiveCriteria) do
if not string.find(httpResp.body,v) then
return nil
end
end
-- Output message
msg[#msg+1] = "Possible CMS user registration interface at:"
msg[#msg+1] = port.service .. "://" .. host.targetname .. ":" ..
port.number .. url
return stdnse.strjoin("\n", msg)
end
I googled the companies (mostly in the field of smoke detectors and facility management) and from what I saw, they are not really "big players". But I am pretty sure a lot of large companies also fail in protecting their internal information in these situations. A simple screen privacy filter would have done the job. :-)