Skip to content
RCE Write-up Intermediate

How i find Blind Remote Code Execution vulnerability

The application was vulnerable to blind remote code execution through a parameter, allowing an attacker to run Python code and commands on the server even though output was not returned in the response. The attacker confirmed execution by causing time delays and by making the server connect back to an external server.

medium.com

Published on medium.com

In this post I am going to explain how to detect Blind RCE vulnerability and how it can be exploited, I have encountered this bug in one of my vulnerability assessment and penetration testing activity and taking the same as an example,

vivek chauhan, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application passed user-supplied input into a Python eval/compile call without proper sanitisation, allowing arbitrary code execution.

Impact

An attacker could execute arbitrary commands on the server, potentially leading to full compromise, though the text notes the client did not allow execution of malicious code on the server.

What the attacker needed

Ability to send requests to the vulnerable parameter; server allows outbound connections (for callback…

How it was found

  1. Intercept requests with Burp Suite and notice the server uses Python 2.7.13 and Werkzeug.
  2. Fuzz parameters with various payloads and observe that Python-related payloads cause 500 errors while others cause 200 or 400 errors.
  3. Craft Python code injection payloads that include a sleep function and observe delayed responses of 5, 10, and 15 seconds.
  4. Set up a Python server and use a payload that makes the target server connect back to it, confirming outbound connections.
  5. Use a payload that writes command output to a file via a PHP script hosted on the attacker's server, then retrieve the output.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Remote code execution means an attacker can make the server run their own commands. In this blind version, the attacker cannot see the command output directly, so they use tricks like making the server wait (a sleep command) or connect back to a server they control to confirm it worked.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.