题解
vlhub给了我们这样的网页

测试发现只不能提交.php文件,我们将一句话木马<?php phpinfo(); ?>写进1.txt,重命名为1.jpg,然后上传,这个过程burp抓包,将filename从"1.jpg"改为"1.jpg "并forward,上传成功~服务器存着一个叫"1.jpg "的非图片文件.

在浏览器输入62.234.14.252:8080/uploadfiles/1.jpgaa.php并抓包,

然后Forward,漏洞利用成功:

我的服务器是nginx1.20,比较新,上述漏洞未能成功显示phpinfo();显示如下:

踩坑点及深入挖掘原理
-
成功上传1.jpg[0x20]后,访问http://62.234.14.252:8080/uploadfiles/1.jpg显示如下

因为服务器上存的是1.jpg[0x20],而浏览器输入62.234.14.252:8080/uploadfiles/1.jpg[0x20]实际访问的还是62.234.14.252:8080/uploadfiles/1.jpg (对,浏览器会过滤忽略掉url开头结尾的空格),所以404了。
-
假设我们上传的就是1.jpg,文件名不带空格,然后我们访问62.234.14.252:8080/uploadfiles/1.jpg,这个访问过程无法被FoxyProxy和burp抓包,可能是因为纯图片不是报文不在其业务范围的缘故。
解决如何即访问1.jpg[0x20]又能让burp抓到包?:
访问http://62.234.14.252:8080/uploadfiles/1.jpgaa.php,违背了纯图片就能被抓包了。然后用burp在底层将aa修改为
[0x20][0x00]就能访问1.jpg[0x20]了 -
官方教程教收尾阶段访问
http://your-ip:8080/uploadfiles/1.jpg[0x20][0x00].php,我傻乎乎的尝试在浏览器输入带[]的、不带[]的、[0x20]改写而成空格的、[0x00]改写不成空,都显示404了。后来才知道要去burp去修改报文的十六进制底层,即访问http://62.234.14.252:8080/uploadfiles/1.jpgaa.php,其中aa是可以留的占位符,a在底层对应ascii的十六进制61,将[61][61]改成[20][00],其中20是空格,00是空的ascii。 -
这里应该是用到了0x00截断原理了,具体原理是 系统在对文件名的读取时,如果遇到0x00,就会认为读取已结束。这个常用在对文件类型名的绕过上。还不止这个原理。
-
当Nginx得到一个用户请求时,首先对url进行解析,进行正则匹配,如果匹配到以.php后缀结尾的文件名(即http://62.234.14.252:8080/uploadfiles/1.jpg \0.php),会将请求的PHP文件交给PHP-CGI去解析。
其中处理模块如下:location ~ \.php$ { root html; include fastcgi_params; fastcgi_pass IP:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT /var/www/html; }
以.php结尾的文件都会交给该模块处理,其中fastcgi_pass就是Nginx与PHP-FPM之间的媒介,通过ip+port的方式将请求转发给PHP解释器。但是我们有代码的文件它叫’1.jpg ‘啊,不叫'1.php'不叫'1.jpg php'不叫'1.jpgphp',所以我们利用0x00的阶段原理,用0x00将'1.jpg '和.php分隔开。http://62.234.14.252:8080/uploadfiles/1.jpg \0.php通过.php进入这个Location块;但进入后,Nginx却因0x00隔断而错误地认为请求的文件是
1.gif[0x20],就将'1.gif '交付PHP-CGI去解析(就设置其为SCRIPT_FILENAME
The UFC White House
<a href=https://white-house-fight-guide.lovable.app/>https://white-house-fight-guide.lovable.app/</a>
Seven fights. Four different weight classes. Two walkouts of championship length. A complete UFC White House main card breakdown for the evening Topuria meets Gaethje on the White House South Lawn and Pereira goes for a third belt opposite Gane — every number, every angle, every key insight.
The UFC White House
Seven fights. Four weight classes. A pair of extended championship processionals. A full breakdown of the UFC White House main card for the card Topuria meets Gaethje on the South Lawn and Pereira chases a third belt against Gane — all the stats, each line, and every scouting read.
The UFC White House
Seven bouts. Four divisions. Two long-distance title fight entrances. A complete UFC White House main card breakdown for the event Topuria faces Gaethje on the White House South Lawn and Pereira hunts down a third championship facing Gane — all the stats, each line, and every scouting read.
DonaldSit
Эти действия помогают быстро восстановить водно-электролитный баланс и снизить нагрузку на внутренние органы. После проведения процедур врач дает рекомендации по дальнейшему наблюдению и реабилитации.
Изучить вопрос глубже – https://narcolog-na-dom-kaliningrad00.ru/vyzov-narkologa-na-dom-kaliningrad/
888starz_hlei
888strz <a href=http://www.888starz-kirish4.com>http://www.888starz-kirish4.com</a> .
TobyTig
If you asked me to point to a recent positive sign for the open web this site would be near the top, and a stop at <a href="http://softstoneoffering.shop" />softstoneoffering</a> reinforced that designation, the few sites that serve as evidence the web can still produce quality independent content are precious and this one has clearly become one for me.
WilliamBiory
После успешной детоксикации начинается этап реабилитации, который включает восстановление социального статуса пациента и формирование новых здоровых привычек. Мы предлагаем как групповые, так и индивидуальные занятия, направленные на изменение поведения и мышления, что способствует долгосрочному удержанию пациента от возвращения к зависимостям.
Изучить вопрос глубже – <a href=https://kapelnica-ot-zapoya-irkutsk2.ru/>капельница от запоя выезд в иркутске</a>
UFC White House Fight Card
This Ultimate Fighting Championship White House fight card goes down in history on June 14, 2026 — becoming the first UFC night held on the grounds of the White House in the nations capital. Officially branded UFC Freedom Fights 250, the night features as the main event Ilia Topuria taking on Justin Gaethje for the lightweight title, with former champion in two weight classes Alex Pereira moving up to heavyweight to take on Ciryl Gane in the co-main event.
UFC White House Fight Card
This UFC showdown at the White House goes down in history on June 14, 2026 — representing the first-ever UFC event staged on the grounds of the White House in the nations capital. Officially titled UFC Freedom Fights 250, the evening is headlined by Ilia Topuria vs. Justin Gaethje for the lightweight title, with former two-division champ Alex Pereira stepping up to the heavyweight division to take on Ciryl Gane in the nights co-headliner.
UFC White House Fight Card
<a href=https://white-house-fight-insight.lovable.app/>https://white-house-fight-insight.lovable.app/</a>
This UFC White House event etches itself into history on June 14, 2026 — representing the first-ever UFC show held on the White House grounds in the nations capital. Officially titled UFC Freedom Fights 250, the evening is headlined by a lightweight title clash between Ilia Topuria and Justin Gaethje for the 155-pound championship, with former champion in two weight classes Alex Pereira making his heavyweight debut to take on Ciryl Gane in the nights co-headliner.