Another type of vulnerability of free version DVBBS
Author: N.E.V.E.R Source:
Www.safechina.net
Forum login name: n.e.v.e.r
Submit Email Address: n.e.v.e.r@tom.com
Submit QQ number: 1143431
Title: Another type of vulnerability for free version DVBBS
Copyright: Article is China Safety Net
Http://www.safechina.net and the author together, please indicate the source! !
content:
There have been a lot of prawns to turn the card for the free version of the mobile network forum. I found that there may be a class of vulnerabilities to escape the eyes of prawn, so come out. Oh, write a hasty, please correct the wrong, my email is n.e.v.e.r@tom.com. Well, I have a problem with the DVBBS of the commercial registration version, but it is not easy to use.
Take the function Delfriend () in FriendList.asp in the Network Forum, there is such a paragraph in the middle
Delid = Replace (Request.form ("ID"), "'", "")
IF delid = "" or isnull (delid) THEN
Errmsg = errmsg "
Founderr = TRUE
EXIT SUB
Else
Conn.execute ("delete from friend where f_username = '" & trim (membername) & "' and f_id in (" & delid & ")")
SUCMSG = SUCMSG "
" "
Call dvbbs_suc ()
END IF
This filtering strict sense is wrong, no 'the same can be made, SQL INJECTION.
I think about it is the classic 1 'OR' 1 '=' 1 blinded a lot of people's eyes, that is like this
"SELECT * from user where user = '" & user & "' and .........
I have no way to indicate different colors with different colors in the 'and And and And and And and And and And and And. In fact, SQL INJECTION is not simple because you can appear in USER, but because 'appears in USER' results in 1 and 2 cannot be paired with the author's meaning. Filtering out the 'can solve this problem very perfect, so Replace (user, "" "," ") is a wonderful and incisive.
However, the people of the mobile network missed the Dharma, and see what is half a short half of this problem:
....... f_id in ("& delid &") "
It is paired here that the left and right brackets! It is stupid to filter '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ' We look at a possible attack method
Delid = .....); Drop Table [user];
This submission can escape the filtration, but complete SQL injection, successfully delete the table User.
When I exchange in Nanyang Rock, I just think of this injection method can modify some integer type data. Later, when I turned MSDN-related information, I suddenly found that it could not use 'the effect of using'. One way is to use the char function and a conclusion , I am doing these experiments in the query analyzer:
Select * from sysusers where left (name, 2) = char (100) char (98)
The result of this return is all system users starting with DB, that is, this is equivalent to this query.
Select * from sysusers where left (name, 2) = 'db'
I posted an encode.asp in the "New Vulnerability and Invasion", which is used, is a way to post it again, to rush the paper, so I have a hurry, if there is an improvement version, please I am
======================= cut heren ======================================================================================================================================================
Fill in the SQL statement! font>