Skip to content

Commit 1095fe1

Browse files
committed
Merge branch 'rapid7' into dmaloney-r7-http/auth_methods
2 parents 24cb9e5 + d5b0482 commit 1095fe1

File tree

17 files changed

+695
-33
lines changed

17 files changed

+695
-33
lines changed

data/gui/msfgui.jar

-1.01 KB
Binary file not shown.

external/source/gui/msfguijava/src/msfgui/RpcConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ protected RpcConnection doInBackground() throws Exception {
260260
// Don't fork cause we'll check if it dies
261261
String rpcType = "Basic";
262262
java.util.List args = new java.util.ArrayList(java.util.Arrays.asList(new String[]{
263-
"msfrpcd","-f","-P",defaultPass,"-t","Msg","-U",defaultUser,"-a","127.0.0.1"}));
263+
"msfrpcd","-f","-P",defaultPass,"-t","Msg","-U",defaultUser,"-a","127.0.0.1",
264+
"-p",Integer.toString(defaultPort)}));
264265
if(!defaultSsl)
265266
args.add("-S");
266267
if(disableDb)

modules/auxiliary/admin/http/netgear_sph200d_traversal.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def find_files(file,user,pass)
7676
:category => "web",
7777
:method => "GET"
7878
})
79-
79+
8080
loot = store_loot("lfi.data","text/plain",rhost, res.body,file)
8181
vprint_good("#{rhost}:#{rport} - File #{file} downloaded to: #{loot}")
8282
elsif res and res.code
@@ -89,7 +89,7 @@ def run_host(ip)
8989
pass = datastore['PASSWORD']
9090

9191
vprint_status("#{rhost}:#{rport} - Trying to login with #{user} / #{pass}")
92-
92+
9393
#test login
9494
begin
9595
res = send_request_cgi({

modules/auxiliary/scanner/http/rails_xml_yaml_scanner.rb

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def initialize(info={})
1919
This module attempts to identify Ruby on Rails instances vulnerable to
2020
an arbitrary object instantiation flaw in the XML request processor.
2121
},
22-
'Author' => 'hdm',
22+
'Author' => [
23+
'hdm', #author
24+
'jjarmoc' #improvements
25+
],
2326
'License' => MSF_LICENSE,
2427
'References' =>
2528
[
@@ -29,15 +32,16 @@ def initialize(info={})
2932
))
3033

3134
register_options([
32-
OptString.new('URIPATH', [true, "The URI to test", "/"])
35+
OptString.new('URIPATH', [true, "The URI to test", "/"]),
36+
OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT'] ]),
3337
], self.class)
3438
end
3539

3640
def send_probe(ptype, pdata)
3741
odata = %Q^<?xml version="1.0" encoding="UTF-8"?>\n<probe type="#{ptype}"><![CDATA[\n#{pdata}\n]]></probe>^
3842
res = send_request_cgi({
3943
'uri' => datastore['URIPATH'] || "/",
40-
'method' => 'POST',
44+
'method' => datastore['HTTP_METHOD'],
4145
'ctype' => 'application/xml',
4246
'data' => odata
4347
}, 25)
@@ -46,29 +50,35 @@ def send_probe(ptype, pdata)
4650
def run_host(ip)
4751

4852
res1 = send_probe("string", "hello")
49-
res2 = send_probe("yaml", "--- !ruby/object:Time {}\n")
50-
res3 = send_probe("yaml", "--- !ruby/object:\x00")
5153

5254
unless res1
5355
vprint_status("#{rhost}:#{rport} No reply to the initial XML request")
5456
return
5557
end
5658

59+
if res1.code.to_s =~ /^[5]/
60+
vprint_status("#{rhost}:#{rport} The server replied with #{res1.code} for our initial XML request, double check URIPATH")
61+
return
62+
end
63+
64+
res2 = send_probe("yaml", "--- !ruby/object:Time {}\n")
65+
5766
unless res2
5867
vprint_status("#{rhost}:#{rport} No reply to the initial YAML probe")
5968
return
6069
end
6170

71+
res3 = send_probe("yaml", "--- !ruby/object:\x00")
72+
6273
unless res3
6374
vprint_status("#{rhost}:#{rport} No reply to the second YAML probe")
6475
return
6576
end
6677

67-
if res1.code.to_s =~ /^[45]/
68-
vprint_status("#{rhost}:#{rport} The server replied with #{res1.code} for our initial XML request, double check URIPATH")
69-
end
78+
vprint_status("Probe response codes: #{res1.code} / #{res2.code} / #{res3.code}")
79+
7080

71-
if res2.code.to_s =~ /^[23]/ and res3.code != res2.code and res3.code != 200
81+
if (res2.code == res1.code) and (res3.code != res2.code) and (res3.code != 200)
7282
print_good("#{rhost}:#{rport} is likely vulnerable due to a #{res3.code} reply for invalid YAML")
7383
report_vuln({
7484
:host => rhost,
@@ -79,7 +89,7 @@ def run_host(ip)
7989
:refs => self.references
8090
})
8191
else
82-
vprint_status("#{rhost}:#{rport} is not likely to be vulnerable or URIPATH must be set")
92+
vprint_status("#{rhost}:#{rport} is not likely to be vulnerable or URIPATH & HTTP_METHOD must be set")
8393
end
8494
end
8595

modules/auxiliary/scanner/misc/dvr_config_disclosure.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def initialize
3737

3838
end
3939

40-
def get_ppooe_credentials(conf)
40+
def get_pppoe_credentials(conf)
4141

4242
user = ""
4343
password = ""
@@ -208,7 +208,7 @@ def run_host(ip)
208208
get_ftp_credentials(conf)
209209
get_dvr_credentials(conf)
210210
get_ddns_credentials(conf)
211-
get_ppooe_credentials(conf)
211+
get_pppoe_credentials(conf)
212212

213213
dvr_name = ""
214214
if res.body =~ /DVR_NAME=(.*)/

modules/auxiliary/scanner/upnp/ssdp_msearch.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def setup
3838
"ST:upnp:rootdevice\r\n" +
3939
"Man:\"ssdp:discover\"\r\n" +
4040
"MX:3\r\n" +
41-
"\r\n\r\n" # Non-standard, but helps
41+
"\r\n"
4242
end
4343

4444
def scanner_prescan(batch)
@@ -144,14 +144,14 @@ def scanner_process(data, shost, sport)
144144
}
145145
}
146146

147-
if data =~ /^Server:[\s]*(.*)/i
147+
if data =~ /^Server:[\s]*(.*)/mi
148148
@results[skey][:info][:server] = $1.strip
149149
end
150150

151151
ssdp_host = nil
152152
ssdp_port = 80
153153
location_string = ''
154-
if data =~ /^Location:[\s]*(.*)/i
154+
if data =~ /^Location:[\s]*(.*)/mi
155155
location_string = $1
156156
@results[skey][:info][:location] = $1.strip
157157
if location_string[/(https?):\x2f\x2f([^\x5c\x2f]+)/]
@@ -168,7 +168,7 @@ def scanner_process(data, shost, sport)
168168
end
169169
end
170170

171-
if data =~ /^USN:[\s]*(.*)/i
171+
if data =~ /^USN:[\s]*(.*)/mi
172172
@results[skey][:info][:usn] = $1.strip
173173
end
174174

modules/exploits/multi/http/rails_json_yaml_code_exec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ def initialize(info = {})
5555
[
5656
Opt::RPORT(80),
5757
OptString.new('TARGETURI', [ true, 'The path to a vulnerable Ruby on Rails application', "/"]),
58-
OptString.new('HTTP_METHOD', [ true, 'The HTTP request method (GET, POST, PUT typically work)', "POST"])
59-
58+
OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT'] ])
6059
], self.class)
6160

6261
end

modules/exploits/multi/http/rails_xml_yaml_code_exec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def initialize(info = {})
5353
[
5454
Opt::RPORT(80),
5555
OptString.new('URIPATH', [ true, 'The path to a vulnerable Ruby on Rails application', "/"]),
56-
OptString.new('HTTP_METHOD', [ true, 'The HTTP request method (GET, POST, PUT typically work)', "POST"])
57-
56+
OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT'] ])
5857
], self.class)
5958

6059
register_evasion_options(

modules/exploits/multi/misc/pbot_exec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def initialize(info = {})
2828
[
2929
'evilcry', # pbot analysis'
3030
'Jay Turla', # pbot analysis
31-
'@bwallHatesTwits', # PoC
31+
'bwall', # aka @bwallHatesTwits, PoC
3232
'juan vazquez' # Metasploit module
3333
],
3434
'License' => MSF_LICENSE,

0 commit comments

Comments
 (0)