Skip to content

Commit 16fefd9

Browse files
committed
Turning off SSL datastore temporarily.
Briefly disable the SSL datastore option before starting the HTTP server to avoid spinning up an HTTPS server, which would cause the exploit to fail.
1 parent 08de13f commit 16fefd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/exploits/multi/http/magento_xxe_cve_2024_34102.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ def xxe_request
158158
end
159159

160160
def exploit
161+
if datastore['SSL']
162+
ssl_restore = true
163+
datastore['SSL'] = false
164+
end
161165
start_service({
162166
'Uri' => {
163167
'Proc' => proc do |cli, req|
@@ -166,6 +170,7 @@ def exploit
166170
'Path' => '/'
167171
}
168172
})
173+
datastore['SSL'] = true if ssl_restore
169174
xxe_request
170175
rescue Timeout::Error => e
171176
fail_with(Failure::TimeoutExpired, e.message)

0 commit comments

Comments
 (0)