Command Injection

Basic info

Command Injection is a critical vulnerability that allows an attacker to execute arbitrary system commands on a server hosting an application. If an application improperly handles user input and passes it to the operating system, an attacker can escape the intended function and execute system commands with the same privileges as the application.

Depending on where your input is being injected you may need to terminate the quoted context (using " or ') before the commands.

🛠️ How Command Injection Works

Command Injection/Execution

Limition Bypasses

If you are trying to execute arbitrary commands inside a linux machine you will be interested to read about this Bypasses:

Examples

Parameters

Here are the top 25 parameters that could be vulnerable to code injection and similar RCE vulnerabilities:

wfuzz

ffuf

Time based data exfiltration

Extracting data: char by char

DNS based data exfiltration

Based on the tool from https://github.com/HoLyVieR/dnsbin also hosted at dnsbin.zhack.ca

Online tools to check for DNS based data exfiltration:

  • dnsbin.zhack.ca

  • pingb.in

Filtering bypass

Windows

Linux


Last updated

Was this helpful?