root/framework3/trunk/modules/auxiliary/scanner/http/frontpage.rb

Revision 5500, 1.7 kB (checked in by hdm, 2 weeks ago)

New FrontPage? modules from Matteo Cantoni

  • Property svn:keywords set to Rev Revision Id Header
Line 
1 ##
2 # This file is part of the Metasploit Framework and may be subject to
3 # redistribution and commercial restrictions. Please see the Metasploit
4 # Framework web site for more information on licensing and terms of use.
5 # http://metasploit.com/projects/Framework/
6 ##
7
8
9 require 'msf/core'
10
11 module Msf
12
13 class Auxiliary::Scanner::Http::FrontPage < Msf::Auxiliary
14        
15         include Exploit::Remote::HttpClient
16         include Auxiliary::Scanner
17
18         def initialize
19                 super(
20                         'Name'        => 'FrontPage Server Extensions Detection',
21                         'Version'     => '$Revision$',
22                         'Description' => 'Display version information about FPSE.',
23                         'References'  =>
24                                 [
25                                         ['URL', 'http://en.wikipedia.org/wiki/Microsoft_FrontPage'],
26                                 ],
27                         'Author'      => 'Matteo Cantoni <goony[at]nothink.org>',
28                         'License'     => MSF_LICENSE
29                 )
30        
31                 register_options(
32                         [
33                                 Opt::RPORT(80),
34                                 OptString.new('UserAgent', [ true, "The HTTP User-Agent sent in the request", 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' ])
35                         ], self.class)
36         end
37
38         def run_host(target_host)
39        
40                 res = send_request_raw({
41                         'uri'     => '/_vti_inf.html',
42                         'method'  => 'GET',
43                         'headers' =>
44                         {
45                                 'User-Agent' => datastore['UserAgent'],
46                         }
47                 }, 20)
48
49                 if (res.code >= 200)
50                         if (res.headers['Server'])
51                                 print_status("http://#{target_host}:#{rport} is running #{res.headers['Server']}")
52                         end
53                         if (fpversion = res.body.match(/FPVersion="(.*)"/))
54                                 fpversion = $1
55                                 print_status("FrontPage Version: #{fpversion}")
56                                 if (fpauthor = res.body.match(/FPAuthorScriptUrl="([^"]*)/))
57                                         fpauthor = $1
58                                         print_status("FrontPage Author: http://#{target_host}/#{fpauthor}")
59                                 end
60                         else
61                                 print_status("FrontPage not found on http://#{target_host}:#{rport} [#{res.code} #{res.message}]")
62                         end
63                 end
64         end
65 end
66 end
Note: See TracBrowser for help on using the browser.