风讯注入漏洞0802_[setnextoptions.asp]
作者:coolgo 日期:2008/07/02
By:Xiao.K
Site: Blog.sadk.org
Date:08.02.14
涉及版本:4.0 sp5
分析如下:
———————————————–User/setnextoptions.asp——————————————-
‘注意ReqSql
response.Charset=”gb2312″
SelectName = NoSqlHack(trim(request(”SelectName”)))
ReqSql = trim(request(”ReqSql”))
EquValue = NoSqlHack(trim(request(”EquValue”)))
sType = trim(request(”sType”))
if not isnumeric(sType) then sType = 1
if SelectName = “” then SelectName = “NoName_Sys” ‘看看你是否为空
if instr(lcase(ReqSql),”select “)=0 then
response.Write(”系统错误,请联系管理员。”)
response.End()
————————————
LCase 函数
返回字符串的小写形式
————————————–
InStr 函数
返回某字符串在另一字符串中第一次出现的位置。
InStr([start, ]string1, string2[, compare])
参数
start
可选项。数值表达式,用于设置每次搜索的开始位置。如果省略,将从第一个字符的位置开始搜索。如果 start 包含 Null,则会出现错误。如果已指定 compare,则必须要有 start 参数。
string1
必选项。接受搜索的字符串表达式。
string2
必选项。要搜索的字符串表达式。
Site: Blog.sadk.org
Date:08.02.14
涉及版本:4.0 sp5
分析如下:
———————————————–User/setnextoptions.asp——————————————-
‘注意ReqSql
response.Charset=”gb2312″
SelectName = NoSqlHack(trim(request(”SelectName”)))
ReqSql = trim(request(”ReqSql”))
EquValue = NoSqlHack(trim(request(”EquValue”)))
sType = trim(request(”sType”))
if not isnumeric(sType) then sType = 1
if SelectName = “” then SelectName = “NoName_Sys” ‘看看你是否为空
if instr(lcase(ReqSql),”select “)=0 then
response.Write(”系统错误,请联系管理员。”)
response.End()
————————————
LCase 函数
返回字符串的小写形式
————————————–
InStr 函数
返回某字符串在另一字符串中第一次出现的位置。
InStr([start, ]string1, string2[, compare])
参数
start
可选项。数值表达式,用于设置每次搜索的开始位置。如果省略,将从第一个字符的位置开始搜索。如果 start 包含 Null,则会出现错误。如果已指定 compare,则必须要有 start 参数。
string1
必选项。接受搜索的字符串表达式。
string2
必选项。要搜索的字符串表达式。





