1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
##
# This file is part of WhatWeb and may be subject to
# redistribution and commercial restrictions. Please see the WhatWeb
# web site for more information on licensing and terms of use.
# https://morningstarsecurity.com/research/whatweb
##
Plugin.define do
name "Spiceworks"
authors [
"Brendan Coles <bcoles@gmail.com>", # 2011-05-23
]
version "0.1"
description "Spiceworks' single, easy-to-use interface combines Network Inventory, Help Desk, Mapping, Reporting, Monitoring and Troubleshooting"
website "http://www.spiceworks.com/product/"
# ShodanHQ results as at 2011-05-23 #
# 2,101 for spiceworks_session
# 20 for -spiceworks_session spiceworks
# Matches #
matches [
# Meta Author
{ :text=>'<meta name="author" content="Spiceworks, Inc." />' },
# Login Page # compatible browsers message
{ :text=>'<p>Spiceworks is compatible with <a href="http://community.spiceworks.com/help/Spiceworks_Requirements#Browser">modern browsers</a>, and requires JavaScript, Cookies, and Stylesheets (CSS) to function correctly.</p>' },
# Login Page # Title
{ :text=>'<title>Spiceworks - Login Required</title>' },
]
# Passive #
passive do
m=[]
# spiceworks_session cookie
# Session cookie format: URL encoded base64 string beginning with "BAh7"
# Terminated by "--" then followed by a md5 hash
m << { :name=>"spiceworks_session cookie" } if @headers["set-cookie"] =~ /spiceworks_session=BAh7[^\s]+--/
# spiceworks cookie
m << { :name=>"spiceworks cookie" } if @headers["set-cookie"] =~ /spiceworks=[a-f\d]{32}; path=\//
# If a match was found
unless m.empty?
# Version Detection # Login Page # Logo HTML
if @body =~ /<h1><img alt="Spiceworks" src="\/images\/logos\/large\.png\?([\d]{7})" \/><\/h1>/
m << { :version=>@body.scan(/<h1><img alt="Spiceworks" src="\/images\/logos\/large\.png\?([\d]{7})" \/><\/h1>/)[0][0].insert(1, ".").insert(3, ".") } unless version.nil?
end
# Version Detection # General stylesheet
if @body =~ /<link href="\/stylesheets\/general\.css\?([\d]{7}+)" media="screen" rel="stylesheet" type="text\/css" \/>/
m << { :version=>@body.scan(/<link href="\/stylesheets\/general\.css\?([\d]{7})" media="screen" rel="stylesheet" type="text\/css" \/>/)[0][0].insert(1, ".").insert(3, ".") }
end
end
# Return passive matches
m
end
end
|