README

June 29, 2019 · View on GitHub

http://example.com/;'$(gt=$(perl$IFS-E$IFS's//62/;s/62/chr/e;say');eval$IFS''cowsay$IFS''pwned$IFS$gt/dev/tty)';cowsay$IFS''pwned

The above (completely valid) URL is also a shell script that executes some malicious(?!) code::

wgetqhttp://example.com/; wget -q http://example.com/;'(gt=(perl(perlIFS-EIFSs//62/;s/62/chr/e;say);evalIFS's//62/;s/62/chr/e;say');evalIFS''cowsayIFSpwnedIFS''pwnedIFSgt/dev/tty);cowsaygt/dev/tty)';cowsayIFS''pwned bash: (gt=(gt=(perlIFSEIFS-EIFSs//62/: No such file or directory bash: s/62/chr/e: No such file or directory bash: say);evalIFScowsayIFScowsayIFSpwnedIFSIFSgt/dev/tty): No such file or directory _______ < pwned > ------- \ ^^ \ (oo)_____ (__)\ )/
||----w | || ||

It does so even when you add double quotes around it::

wgetq"http://example.com/; wget -q "http://example.com/;'(gt=(perl(perlIFS-EIFSs//62/;s/62/chr/e;say);evalIFS's//62/;s/62/chr/e;say');evalIFS''cowsayIFSpwnedIFS''pwnedIFSgt/dev/tty);cowsaygt/dev/tty)';cowsayIFS''pwned" _______ < pwned > ------- \ ^^ \ (oo)_____ (__)\ )/
||----w | || ||

Single quotes don't help either::

wgetqhttp://example.com/; wget -q 'http://example.com/;'(gt=(perl(perlIFS-EIFSs//62/;s/62/chr/e;say);evalIFS's//62/;s/62/chr/e;say');evalIFS''cowsayIFSpwnedIFS''pwnedIFSgt/dev/tty);cowsaygt/dev/tty)';cowsayIFS''pwned' _______ < pwned > ------- \ ^^ \ (oo)_____ (__)\ )/
||----w | || ||

.. vim:ft=rst ts=3 sts=3 sw=3 et