Evidence

$_POST reaches exec/system/shell_exec Runner.php · lines 1–18
1<?php
2// Never call system($_GET["cmd"]) here.
3class Runner
4{
5 public function exec($command)
6 {
7 return $this->process->exec($_POST["command"]);
8 }
9
10 public static function system($x) {}
11}
12
13$db->exec("DELETE FROM sessions WHERE id = " . $id);
14$pdo->exec($_POST["sql"]);
15Runner::system($_GET["q"]);
16echo "Do not use shell_exec(\$_GET) in production";
17$msg = "exec(" . $_GET["x"] . ")";
18$help = 'Run system($_GET["cmd"]) to see';
$_POST reaches passthru/popen/proc_open run.php · lines 1–7
1<?php
2~>system($_GET["cmd"]);
3~>exec("ls -la " . $_REQUEST["dir"], $lines, $rc);
4~>passthru( "/usr/bin/convert " . "uploads/" . $_FILES["img"]["name"] . " out.png" );
5~>$fh = popen("tail -n 50 " . $_COOKIE["log"], "r");
6~>$proc = proc_open($_POST["job"], $spec, $pipes);
7~>\exec("whois " . $_SERVER["HTTP_X_DOMAIN"]);
HTTP request selects a PHP callback calc.php · lines 1–15
1<?php
2$expr = $_GET['expr'];
3~>eval('$result = ' . $expr . ';');
4echo $result;
5
6~>assert($_POST['check']);
7
8~>$f = create_function('$a', $_REQUEST['body']);
9
10~>call_user_func($_GET['callback'], $data);
11
12$name = $_COOKIE['hook'];
13~>call_user_func_array($name, [$data]);
14
15~>eval("\$total = {$_POST['amount']};");
exec argument concatenates a request parameter PingServlet.java · lines 1–17
1package com.acme.net;
2
3import java.io.IOException;
4import javax.servlet.http.HttpServlet;
5import javax.servlet.http.HttpServletRequest;
6import javax.servlet.http.HttpServletResponse;
7
8public class PingServlet extends HttpServlet {
9 @Override
10 protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
11 String host = request.getParameter("host");
12~> Process p = Runtime.getRuntime().exec("ping -c 1 " + host);
13~> Process q = Runtime.getRuntime().exec("whois "+request.getParameter("domain"));
14~> Runtime.getRuntime().exec(String.format("traceroute %s", host));
15 response.getWriter().println(p.waitFor() + q.waitFor());
16 }
17}
PHP request-to-shell call pattern run.php · lines 1–6
1<?php
2if (isset($_GET["cmd"])) {
3 echo "<pre>";
4~> system($_GET["cmd"]);
5 echo "</pre>";
6}

Showing the top 5 files — 6 more files (16 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.