Add or modify any management account and repair solution to the music news system

Source: Internet
Author: User

For details, add the use and pass Parameters submitted from the outside to the admin table without the permission verified by the music news system mofei_admin_save.asp.
Proof of vulnerability:
<! -- # Include file = "conn. asp" -->
 
<! -- # Include file = "md5.asp" -->
 
<%
 
Use2 = request. form ("use ")
 
Pass2 = request. form ("pass ")
 
Pass2 = md5 (pass2)
 
If use2 = "" or pass2 = "" then // determine whether the user name or password is empty
 
%>
 
<P> </p>
 
<P> </p>
 
<P> </p>
 
<Table border = "0" cellpadding = "0" cellspacing = "0" width = "600" align = "center" bgcolor = "# FFFFFF">
 
<Tr>
 
<Td height = "25" background = "mofeiimg/login_bg.gif">
 
<P align = "center"> <B> <font size = "3" color = "# FFFF00">: Jile No. 2 Middle School
 
: Error detected </font> </B> </td>
 
</Tr>
 
<Tr>
 
<Td height = "30">
 
Please <a href = "javascript: history. go (-1)"> back up </a> to fill in the complete information!
 
</Td>
 
</Tr>
 
<Tr>
 
<Td height = "30" bgcolor = "# F9F9F9">
 
<font color = "# FF0000"> your username and password may be blank! </Font>
 
</Td>
 
</Tr>
 
<Tr>
 
<Td height = "30">
 

 
</Td>
 
</Tr>
 
</Table>
 
 
 
<%
 
Else
 
Set rs = Server. CreateObject ("ADODB. Recordset") // www.2cto.com
 
SQL = "select * from admin"
 
Rs. open SQL, conn, 1, 3
 
 
 
Rs ("usename") = use2
 
Rs ("password") = pass2
 
Rs. update
 
Rs. close
 
Response. redirect ("mofei_admin_edit.asp ")
 
End if %>
Solution:
 
 
Add session verification to the file header
<% If not session ("mofeicheck") = "true" then
Response. redirect ("mofei_login.asp") %>
 
 
From Yu Ren @ wooyun

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.