RCE
RCE
When a script called from a web page performs operations directly on the server using a shell (cmd or bash) it is possible to append malicious code to the argument. The following strings can be used as effective separators between legit parameters and injected commands.
Make argument executable
The given argument will be executed by the host instead of being threated as literal string
Concatenate code to argument
Pass a standard argument and use one of the following strings to append a command that will be executed by the host.
Verify command execution
Start a HTTP server on your machine and make the remote host request a resource on your server. If you receive a GET request, the code injection was successful.
Send output
If it's not possible to read the output from the response, you can make the remote host connect back to you with nc and send the result to your machine.
Injection in parameters
When using url encoding with Windows paths the separators have to be escaped as \\ for example C:\\folder1\\folder2
Last updated