Vulnerability file: Accesstopic.asp
Impact version: DVBBS7.0 No version MSSQL
Test version: DVBBS7.0 SP1 MSSQL
Test environment: Windows 2000 Advanced Server SQL Server 2000
sequence
Since the release of its reputation and praise in the ASP forum, since the release of the ASP Forum, there is a great progress in the art, performance, safety and efficiency. The only feeling that gives me when reading the code is - US. But there is no non-winding wall in the world, and the code is written and then rigorous and there will be negligence. In order to find out its vulnerability, I am looking for a big sea, I'm looking for the code, and I look back that the man is in a dim light. Please take a look at me.
The first discovering new mainland
Open AccessTopic.asp file, turn it up to 200-212, the content is:
......
SUB FREETOPIC ()
......
For i = 1 to Request.form ("AnnounceID"). Count
ID = Replace (Request.form ("AnnounceID") (i), "'", "")
'delete
If Request ("ActionType") = 2 THEN
SET RS = DVBBS.EXECUTE ("Select Rootid from" & Dvbbs.nowusebbs & "Where ParentId = 0 and AnnounceId =" & id)
IF not (rs.eof and ly) THEN
Dvbbs.execute ("delete from dv_topic where topicid =" & r (0))
Dvbbs.execute ("delete from" & dvbbs.nowusebbs & "where rootid =" & r (0))
FoundID = rs (0)
Else
Dvbbs.execute ("delete from" & dvbbs.nowusebbs & "where announceId =" & id)
FoundID = 0
END IF
......
Obviously, the value of Request.form ("Ann CountyID") is only filtered by single quotes, but fortunately it is not used as a string in the SQL statement, or there is no play. If you want to break through this single quotation limit, you can use it directly to convert the string we need to use SQL Encoder. The basic principle is that automatically converts the data type data of the Varbinary type into varchatr type data in MSSQL, but this is generally unable to distinguish in the ASP. In the next operation, the part involved in the string is for easy understanding, I have retained the original text. In actual operation, use SQL ENCODER to convert unless special conditions are not described.
Second Art Network Forum's small shoes
This file is in the mobile network forum is the operation of each of the processes to be reviewed, and the process of discovering the loopholes is to delete a post ("ActionType") = 2). However, this feature is only available when the review feature opens a layout of posts, and only bamboo can use, its logo variable is the 4th number of DV_Board.boardSetting columns in the data.
Since this feature is closed by default, most of the forums will not be used, so it is rated as a low-risk level. When we use, we can imagine the ability to get the Access database, as if it is a mentally wise, there is no use value, so I only discuss the use of the MSSQL database. You may think that if you can't use an error, you can use an error to get the administrator's password de MD5 cipher, this is wrong. The execution of each SQL statement in the forum is implemented by the process of dvbbs.execute, the relevant code can be found in inc / dv_clsmain.asp, filtering the DV_ADMIN keyword during this process, I thought about it at first time. Use special methods to construct the statement, but all failures, if you have any way to succeed, don't forget to tell me.
Since AnnounceID is obtained with request.form, the local submission form is to be constructed when it is used, and its content is: