1.信息收集
确认os centos/ub/ 确认CMS:THINKPHP&struct2/等
常见漏洞类型:
2.sql
类型:
简单无过滤,宽字节(前段GBK),花式绕过mysql(结合php特性),绕过关键字,MongoDB注入(Nosql注入:Nosqlmap) http头注入(XFF Referrer) 二次注入
工具:
burp hackbar sqlmap nosqlmap 自写脚本
常用技巧:
![](https://img.haomeiwen.com/i7449938/1ac729e30c4d4b36.png)
![](https://img.haomeiwen.com/i7449938/61cee31fda9330da.png)
![](https://img.haomeiwen.com/i7449938/5acd1728b6f1a57e.png)
![](https://img.haomeiwen.com/i7449938/bd855b66b8af7b3f.png)
案列:
![](https://img.haomeiwen.com/i7449938/18bba4e7ee516dd7.png)
![](https://img.haomeiwen.com/i7449938/df8667b9d3bd14de.png)
![](https://img.haomeiwen.com/i7449938/f8b0dcc624d99362.png)
3.XSS
类型:
简单存储型xss盲打后台 各种浏览器auditor绕过 富文本过滤黑白名单 CSP绕过 Flash xss AngularJS客户端模板XSS
工具:
burp hackbar swf-decomplie xss-platform flasm doswf Crypt-Flow(swf加密)
技巧:
简单无过滤,盲打后台(留言版,评论区) 过滤标签,尝试各种绕过 存在安全策略CSP,尝试绕过方法 逆向swf文件(审计源码,构造xsspayload)
![](https://img.haomeiwen.com/i7449938/4888f467d6f48e0c.png)
![](https://img.haomeiwen.com/i7449938/35b6fa5688806a15.png)
![](https://img.haomeiwen.com/i7449938/dc76e1887b6a5ac1.png)
![](https://img.haomeiwen.com/i7449938/464b4bf1ba288f04.png)
![](https://img.haomeiwen.com/i7449938/7f8d6d2e5af737d7.png)
![](https://img.haomeiwen.com/i7449938/ffc18f959be5e25c.png)
![](https://img.haomeiwen.com/i7449938/2411f4a4a13ac3ba.png)
![](https://img.haomeiwen.com/i7449938/5a361da26d4d14b1.png)
案列:
![](https://img.haomeiwen.com/i7449938/8898f76c11882c54.png)
![](https://img.haomeiwen.com/i7449938/82ffe25ade521e55.png)
4.代码审计
类型:
ASP,php,Python,Java,Perl审计 找源码技巧(git,xxx.php(linux下的隐藏文件).bak,svn,.xxx,xxx.php.swp(o/n)(异常退出后留下的文件))
工具:
seay githack strings grep
审计技巧:
![](https://img.haomeiwen.com/i7449938/d79a6ed52f7c3422.png)
![](https://img.haomeiwen.com/i7449938/28d8647f0504f6bf.png)
![](https://img.haomeiwen.com/i7449938/528775597428017c.png)
![](https://img.haomeiwen.com/i7449938/b6aea431fc32fcda.png)
![](https://img.haomeiwen.com/i7449938/b7122b821ad12e7f.png)
5.文件上传
类型:
00截断上传(burp) multipart/form-data大小写绕过(针对文件类型过滤策略进行大小写绕过) 花式文件后缀(.php234,.inc,.phtml,.phpt,.phps)(有时候黑名单限制时,这些扩展名也能正常解析) 各种文件内容检测(最常见去检测文件前两个字节,那么可以通过修改绕过) 各种解析漏洞(比如nginx下fastcgi,xxx.php/a.jpg 他只会去解析xxx.php) 花式打狗 在线编辑器利用(fckeditor 2.0<=2.2 允许上传asa,cer,php,php4,inc,pwml,pht后缀的文件 上传后它保存的文件直接用的$sFilePath = $sServerDir,$sFileName,而没有使用$sExtension为后缀,直接导致在win下上传文件后面加个.来突破) 文件包含(可上传一个文本文件,里面是php代码,然后通过文件包含的形式去执行代码)
工具:
hackbar burp webshell脚本 菜刀 AntSword
解题思路:
无限制,查看响应 只是前端过滤后缀名,抓包绕过 是否存在截断上传 是否对文件头检测(用图片马) 是否对内容检测(编码,变异的一句话) 是否上传马被杀(免杀) 是、是否存在解析漏洞(Apache Nginx-fastcgi,JBoss,tomcat,jetty ,Bea webLogic) http头以两个CRLF(相当于\r\n\r\n)作为结尾,\r\n没有被过滤时,可以利用\r\n\r\n作为URl参数截断http头,后面跟上注入代码
举例:HTCTF2016
![](https://img.haomeiwen.com/i7449938/f34135c9778efc2e.png)
![](https://img.haomeiwen.com/i7449938/980f5ad6dfe4b3d5.png)
6.php类型特性:
类型:
php弱类型(字符串与int相互转换) intval(1.000000000000000000000001在intval函数过滤后为1) strpos和=== 反序列化+destruct \0截断导致的命令注入 iconv截断(%00) parse_str 伪协议(phpinput/)
工具:
hackbar burp 在线调试环境:www.shucunwang.com/RunCode/php/
思路:
![](https://img.haomeiwen.com/i7449938/6cf66a736ed235bc.png)
![](https://img.haomeiwen.com/i7449938/1317bc95cfababaf.png)
![](https://img.haomeiwen.com/i7449938/4f1a7ca9c8e236a7.png)
![](https://img.haomeiwen.com/i7449938/2a21df48dfeab693.png)
案列:
![](https://img.haomeiwen.com/i7449938/199bc17f0463782f.png)
![](https://img.haomeiwen.com/i7449938/57ae87ebd678ad27.png)
![](https://img.haomeiwen.com/i7449938/f3e39a5c65b7dc3c.png)
![](https://img.haomeiwen.com/i7449938/47cb0ba3f37977c3.png)
7.后台登陆类:
![](https://img.haomeiwen.com/i7449938/f5d91beadd201065.png)
![](https://img.haomeiwen.com/i7449938/8a2e52fe45370619.png)
案列:
![](https://img.haomeiwen.com/i7449938/ca0d6b54aa9f00b2.png)
![](https://img.haomeiwen.com/i7449938/660f118ed6de4246.png)
8.加解密类
![](https://img.haomeiwen.com/i7449938/ad44ff92e8c2e6ab.png)
js加解密:HTCTF300或400
解题思路:
![](https://img.haomeiwen.com/i7449938/060418c964d4e4f8.png)
案列分析:
![](https://img.haomeiwen.com/i7449938/78dc1ab68ecfb9fb.png)
![](https://img.haomeiwen.com/i7449938/cbaf5c2a129e27e7.png)
9.其他类型
![](https://img.haomeiwen.com/i7449938/e9fa12192af49830.png)
![](https://img.haomeiwen.com/i7449938/5dcc5ea35b373593.png)
![](https://img.haomeiwen.com/i7449938/b73340143769f984.png)
![](https://img.haomeiwen.com/i7449938/c6579c6bb8d51f8f.png)
![](https://img.haomeiwen.com/i7449938/73d01e7cd1a6cde4.png)
![](https://img.haomeiwen.com/i7449938/14b8769ba4233791.png)
![](https://img.haomeiwen.com/i7449938/1cc4d487cd3ce366.png)
![](https://img.haomeiwen.com/i7449938/0bc15e185d4a44d9.png)
![](https://img.haomeiwen.com/i7449938/baf8ed5d33fdc63d.png)
![](https://img.haomeiwen.com/i7449938/65591942a2bb75d1.png)
网友评论