I was in dilemma in these days because our website has been attacked by SQL Injection Attacks by the way of using store procedure command in URL variable. Finally, I can prevent this one cannot attack to our site by using like that anymore. The one use following store procedure command the after "?" of your website URL.
2 SET @S=CAST(0x4400450043004C00 ... 6F007200 AS NVARCHAR(4000))
3 EXEC(@S)
4
5 DECLARE @S VARCHAR(4000)
6 SET @S=CAST(0x4445434C41524520 ... 736F7220 AS VARCHAR(4000))
7 EXEC(@S)
8
9 DECLARE @S CHAR(4000)
10 SET @S=CAST(0x4445434C41524520 ... 736F7220 AS CHAR(4000))
11 EXEC(@S)
The above three variants have been injected through an HTTP GET: Decoding the binary string to its textual form reveals the T-SQL script below, which has been slightly formatted and edited for purposes of clarity. For those who are not proficient in the syntax, the script simply creates a cursor through which it browses for all columns of certain data types (textual) in all user-defined tables underlying the database. Next, the T-SQL script affixes a JavaScript reference (to the malicious script) to the current values contained in each such column.

Android


Top of Page