Skip to content

Commit 7f59cf5

Browse files
author
Tod Beardsley
committed
Ora XID HTTP needn't edit DBUSER (@cellabosm)
Looks like copypasta artifacts. DBUSER and DBPASS aren't ever set as options in the module, and the module doesn't include MC's Exploit::ORACLE mixin. It's also from four years ago and doesn't report_auth or anything useful like that, but that's out of scope for this branch.
1 parent efffbf7 commit 7f59cf5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/auxiliary/scanner/oracle/xdb_sid_brute.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def initialize
3232
OptString.new('CSVFILE', [ false, 'The file that contains a list of default accounts.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'oracle_default_passwords.csv')]),
3333
Opt::RPORT(8080),
3434
], self.class)
35-
deregister_options('DBUSER','DBPASS')
3635
end
3736

3837
def run_host(ip)
@@ -57,9 +56,9 @@ def run_host(ip)
5756

5857
fd = CSV.foreach(list) do |brute|
5958

60-
datastore['DBUSER'] = brute[2].downcase
61-
datastore['DBPASS'] = brute[3].downcase
62-
user_pass = "#{datastore['DBUSER']}:#{datastore['DBPASS']}"
59+
dbuser = brute[2].downcase
60+
dbpass = brute[3].downcase
61+
user_pass = "#{dbuser}:#{dbpass}"
6362

6463
res = send_request_raw({
6564
'uri' => '/oradb/PUBLIC/GLOBAL_NAME',
@@ -72,7 +71,7 @@ def run_host(ip)
7271
}, 10)
7372

7473
if( not res )
75-
vprint_error("Unable to retrieve SID for #{ip}:#{datastore['RPORT']} with #{datastore['DBUSER']} / #{datastore['DBPASS']}...")
74+
vprint_error("Unable to retrieve SID for #{ip}:#{datastore['RPORT']} with #{dbuser} / #{dbpass}...")
7675
next
7776
end
7877
if (res.code == 200)
@@ -89,10 +88,10 @@ def run_host(ip)
8988
:data => sid,
9089
:update => :unique_data
9190
)
92-
print_good("Discovered SID: '#{sid[0]}' for host #{ip}:#{datastore['RPORT']} with #{datastore['DBUSER']} / #{datastore['DBPASS']}")
91+
print_good("Discovered SID: '#{sid[0]}' for host #{ip}:#{datastore['RPORT']} with #{dbuser} / #{dbpass}")
9392
users.push(user_pass)
9493
else
95-
vprint_error("Unable to retrieve SID for #{ip}:#{datastore['RPORT']} with #{datastore['DBUSER']} / #{datastore['DBPASS']}...")
94+
vprint_error("Unable to retrieve SID for #{ip}:#{datastore['RPORT']} with #{dbuser} / #{dbpass}...")
9695
end
9796
end #fd.each
9897

0 commit comments

Comments
 (0)