IIS7.5解析漏洞
安装IIS7.5







安装完成之后直接访问浏览器:

安装phpstudy for IIS
安装这个的目的是方便,不用自己去配置

解压开傻瓜式安装即可。然后查看探针:

漏洞原理
IIS7/7.5在Fast-CGI运行模式下,在一个文件路径(/shell.jpg)后面加上/1.php会将/shell.jpg/1.php 解析为 php 文件。
有两个前提:
1.配置php.ini中的配置 cgi.fix_pathinfo=1
2.在"Handler Mapping"中取消勾选以下内容

漏洞复现
直接将图片码放置网址根目录:

访问:

漏洞防御
和两个前提反着来即可。
IIS6版本的漏洞
目录解析漏洞
对于名字为.asp后缀的文件夹,IIS会将该文件夹内部的文件都解析为.asp文件来执行。 即构造名字为a.asp的目录,目录中的1.txt会作为asp文件执行。
文件名解析漏洞
对于名字为'a.asp;.jpg'文件,IIS并非以最后一个后缀名来判断格式,会忽略掉;之后的文件名,故会将 其解析为asp文件并执行。
即上传木马的后缀名为'.asp;.jpg'就可以被服务器执行。