fixed indent

unstable
Bruno Morisson 2013-06-25 23:08:58 +01:00
parent 7ab8485acc
commit 2da278f151
1 changed files with 52 additions and 52 deletions

View File

@ -15,41 +15,41 @@ class Metasploit3 < Msf::Auxiliary
def initialize
super(
'Name' => 'SAPRouter Port Scanner',
'Description' => %q{
'Name' => 'SAPRouter Port Scanner',
'Description' => %q{
This module allows for mapping ACLs and identify open/closed ports accessible
on hosts through a saprouter.
},
'Author' => [
'Bruno Morisson <bm[at]integrity.pt>', # metasploit module
'nmonkee' # saprouter packet building code from sapcat.rb and default sap ports information
'Author' => [
'Bruno Morisson <bm[at]integrity.pt>', # metasploit module
'nmonkee' # saprouter packet building code from sapcat.rb and default sap ports information
],
'References' =>
[
# General
['URL', 'http://help.sap.com/saphelp_nw70/helpdata/EN/4f/992dfe446d11d189700000e8322d00/frameset.htm'],
['URL', 'http://help.sap.com/saphelp_dimp50/helpdata/En/f8/bb960899d743378ccb8372215bb767/content.htm'],
['URL', 'http://labs.mwrinfosecurity.com/blog/2012/09/13/sap-smashing-internet-windows/'],
['URL', 'http://conference.hitb.org/hitbsecconf2010ams/materials/D2T2%20-%20Mariano%20Nunez%20Di%20Croce%20-%20SAProuter%20.pdf'],
['URL', 'http://scn.sap.com/docs/DOC-17124'] # SAP default ports
],
'References' =>
[
# General
['URL', 'http://help.sap.com/saphelp_nw70/helpdata/EN/4f/992dfe446d11d189700000e8322d00/frameset.htm'],
['URL', 'http://help.sap.com/saphelp_dimp50/helpdata/En/f8/bb960899d743378ccb8372215bb767/content.htm'],
['URL', 'http://labs.mwrinfosecurity.com/blog/2012/09/13/sap-smashing-internet-windows/'],
['URL', 'http://conference.hitb.org/hitbsecconf2010ams/materials/D2T2%20-%20Mariano%20Nunez%20Di%20Croce%20-%20SAProuter%20.pdf'],
['URL', 'http://scn.sap.com/docs/DOC-17124'] # SAP default ports
],
'License' => MSF_LICENSE
'License' => MSF_LICENSE
)
register_options(
[
OptAddress.new('SAPROUTER_HOST', [true, 'SAPRouter address', '']),
OptPort.new('SAPROUTER_PORT', [true, 'SAPRouter TCP port', '3299']),
OptEnum.new('MODE', [true, 'Connection Mode: SAP_PROTO or TCP ', 'SAP_PROTO', ['SAP_PROTO', 'TCP']]),
OptString.new('INSTANCES', [false, 'SAP instance numbers to scan (NN in PORTS definition)', '00-99']),
OptString.new('PORTS', [true, 'Ports to scan (e.g. 3200-3299,5NN13)', '32NN']),
# Default ports: 32NN,33NN,48NN,80NN,36NN,81NN,5NN00-5NN19,21212,21213,
# 59975,59976,4238-4241,3299,3298,515,7200,7210,7269,7270,7575,39NN,
# 3909,4NN00,8200,8210,8220,8230,4363,4444,4445,9999,3NN01-3NN08,
# 3NN11,3NN17,20003-20007,31596,31597,31602,31601,31604,2000-2002,
# 8355,8357,8351-8353,8366,1090,1095,20201,1099,1089,443NN,444NN
OptInt.new('CONCURRENCY', [true, 'The number of concurrent ports to check per host', 10]),
], self.class)
[
OptAddress.new('SAPROUTER_HOST', [true, 'SAPRouter address', '']),
OptPort.new('SAPROUTER_PORT', [true, 'SAPRouter TCP port', '3299']),
OptEnum.new('MODE', [true, 'Connection Mode: SAP_PROTO or TCP ', 'SAP_PROTO', ['SAP_PROTO', 'TCP']]),
OptString.new('INSTANCES', [false, 'SAP instance numbers to scan (NN in PORTS definition)', '00-99']),
OptString.new('PORTS', [true, 'Ports to scan (e.g. 3200-3299,5NN13)', '32NN']),
# Default ports: 32NN,33NN,48NN,80NN,36NN,81NN,5NN00-5NN19,21212,21213,
# 59975,59976,4238-4241,3299,3298,515,7200,7210,7269,7270,7575,39NN,
# 3909,4NN00,8200,8210,8220,8230,4363,4444,4445,9999,3NN01-3NN08,
# 3NN11,3NN17,20003-20007,31596,31597,31602,31601,31604,2000-2002,
# 8355,8357,8351-8353,8366,1090,1095,20201,1099,1089,443NN,444NN
OptInt.new('CONCURRENCY', [true, 'The number of concurrent ports to check per host', 10]),
], self.class)
deregister_options('RPORT')
@ -98,15 +98,15 @@ class Metasploit3 < Msf::Auxiliary
route_data=''
ni_packet = [
'NI_ROUTE',
0,
2,
39,
2,
mode,
0,
0,
1
'NI_ROUTE',
0,
2,
39,
2,
mode,
0,
0,
1
].pack("A8c8")
first = false
@ -257,7 +257,7 @@ class Metasploit3 < Msf::Auxiliary
vprint_error("#{ip}:#{port} - unknown error message")
end
when /NI_PONG/
vprint_good("#{ip}:#{port} - TCP open")
vprint_good("#{ip}:#{port} - TCP OPEN")
return [ip, port, "open", sap_port_info(port)]
else
vprint_error("#{ip}:#{port} - unknown response")
@ -306,8 +306,8 @@ class Metasploit3 < Msf::Auxiliary
s = connect(false,
{
'RPORT' => sap_port,
'RHOST' => sap_host
'RPORT' => sap_port,
'RHOST' => sap_host
}
)
@ -339,18 +339,18 @@ class Metasploit3 < Msf::Auxiliary
end
tbl = Msf::Ui::Console::Table.new(
Msf::Ui::Console::Table::Style::Default,
'Header' => "Portscan Results",
'Prefix' => "\n",
'Postfix' => "\n",
'Indent' => 1,
'Columns' =>
[
"Host",
"Port",
"State",
"Info",
])
Msf::Ui::Console::Table::Style::Default,
'Header' => "Portscan Results",
'Prefix' => "\n",
'Postfix' => "\n",
'Indent' => 1,
'Columns' =>
[
"Host",
"Port",
"State",
"Info",
])
r.each do |res|
tbl << [res[0], res[1], res[2], res[3]]