Skip to content

Commit 3e422c2

Browse files
Grezzojvoisin
andauthored
Use random number to check for code execution in werkzeug_debug_rce.rb
Co-authored-by: Julien Voisin <[email protected]>
1 parent 255ab5c commit 3e422c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/exploits/multi/http/werkzeug_debug_rce.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ def execute_python(cmd, secret, frame, cookies = '')
298298
end
299299

300300
def check_code_exec(secret, frame, cookies = '')
301-
execute_python(1, secret, frame, cookies).body.start_with? ">>> 1\n"
301+
canary = rand()
302+
execute_python(canary, secret, frame, cookies).body.start_with? ">>> #{canary}"
302303
end
303304

304305
def check

0 commit comments

Comments
 (0)