Command Injection

Command Chaining

<input>; ls
<input>& ls
<input>&& ls
<input>| ls
<input>|| ls

Also try:

  • Prepending a flag or parameter.

  • Removing spaces (<input>;ls).

Chaining Operators

Windows and Unix supported.

Syntax
Description

%0A

cmd1 %0A cmd2

Newline. Executes both.

;

cmd1 ; cmd2

Semi-colon operator. Executes both.

&

cmd1 & cmd2

Runs command in the background. Executes both.

`

`

`cmd1

&&

cmd1 && cmd2

AND operator. Executes cmd2 if cmd1 succeds.

`

`

I/O Redirection

Command Substitution

Replace a command output with the command itself.

Filter Bypassing

Space filtering

Linux

Windows

Slash (/) filtering

Command filtering

Quotes.

Slash.

At symbol.

Variable expansion.

Wildcards.

Time Based Data Exfiltration

Last updated

Was this helpful?