By Link
{Hazard. The problem will cause hackers to construct malicious statement injection to indirectly obtain webshell}
Many files use the che function to filter post or get variables.
Is the che function safe. Let's take a look. :
Function che (Str)
If Isnull (Str) Then
Che = ""
Exit Function
End If
Str = Replace (Str, Chr (0 ),"")
Str = Replace (Str, "<", "& lt ;")
Str = Replace (Str, ">", "& gt ;")
Str = Replace (Str, "script ","")
Str = Replace (Str, "SCRIPT ","")
Str = Replace (Str, "Script ","")
Str = Replace (Str, "script ","")
Str = Replace (Str, "object ","")
Str = Replace (Str, "OBJECT ","")
Str = Replace (Str, "Object ","")
Str = Replace (Str, "object ","")
Str = Replace (Str, "applet ","")
Str = Replace (Str, "APPLET ","")
Str = Replace (Str, "Applet ","")
Str = Replace (Str, "applet ","")
Str = Replace (Str ,"""","")
Str = Replace (Str ,"","'")
Str = Replace (Str, "select ","")
Str = Replace (Str, "execute ","")
Str = Replace (Str, "exec ","")
Str = Replace (Str, "join ","")
Str = Replace (Str, "union ","")
Str = Replace (Str, "where ","")
Str = Replace (Str, "insert ","")
Str = Replace (Str, "delete ","")
Str = Replace (Str, "update ","")
Str = Replace (Str, "like ","")
Str = Replace (Str, "drop ","")
Str = Replace (Str, "create ","")
Str = Replace (Str, "rename ","")
Str = Replace (Str, "count ","")
Str = Replace (Str, "chr ","")
Str = Replace (Str, "mid ","")
Str = Replace (Str, "truncate ","")
Str = Replace (Str, "nchar ","")
Str = Replace (Str, "char ","")
Str = Replace (Str, "alter ","")
Str = Replace (Str, "cast ","")
Str = Replace (Str, "exists ","")
Str = Replace (Str, Chr (13), "<; br> ;")
Che = Str
End Function
Hey, it's also case sensitive. For example. You can bypass, and ,,. Both scripts and scripts are filtered out. But we can submit scripts like this.
Flexible handle. You can change the case.
The next thing to do is to find a place for injection.