126oo CMS post-system update Vulnerability

Source: Internet
Author: User

The updated code modifies the background Bypass Method.
Use Random Functions


Code:
Sub chklogin
Dim SQL, rs
Dim M_Name, loginValidate
M_Name = GetCookie ("AdminName ")
M_Name = replace (M_Name ,"","")
On error resume next
Set rs = Database. GetRecordDetail ("Tbl_Manager", "M_Name =" & M_Name &"")

LoginValidate = md5 (rs ("M_Random") & rs ("M_Name") & rs ("M_ID") Here we use a random number + User Name + id.

If err then
SetCookie "check", "", 30
Writeend "<script> top. location. href = index. asp? Action = login; </script>"
End if

If GetCookie ("check") <> loginValidate then is not equal, the logon page is returned.
SetCookie "check", "", 30
Writeend "<script> top. location. href = index. asp? Action = login; </script>"
End if
You can log on here.
End Sub

 

After analysis, we will try to inject the injection, because if we can get all the content of the above three conditions, we can directly log on to the background, because we don't have time to look at it in detail, so I just watched it and found that he used functions to set query updates and so on. So I won't read it. Time is limited.

Let's just talk about this problem. ServerVariables in the getip function is definitely not filtered, so we can submit the injection. You can find the injection vulnerability by yourself.

Code:
Function GetIP ()
Dim addr, x, y
X = Request. ServerVariables ("HTTP_X_FORWARDED_FOR ")
Y = Request. ServerVariables ("REMOTE_ADDR ")
Addr = IIF (isN (x) or lCase (x) = "unknown", y, x)
If InStr (addr, ".") = 0 Then addr = "0.0.0.0"
GetIP = addr
End Function

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.