loader image

nginx解析漏洞

介绍


该漏洞其实也并不算nginx的一个解析漏洞,他就是得由nginx和php配合才会有,apache+php就又不会有这个漏洞。在IIS的7.x版本中也存在这个漏洞,访问的方式和nginx是一样的

配置不当


在php的配置文件php.ini中有一个cgi.fix_pathinfo,该行默认为1,当这个默认为1时搭配nginx就会出现解析漏洞,当我们上传一个图片马webshell.jpg时,在浏览器访问www.hibugs.net/uplaod/webshell.jpg/xx.php,该文件就会被当作php脚本代码去执行

从上面cgi.fix_pathinfo这个参数我们能够从字面意思看出来他的功能是修复路径信息,也就是当我们访问的该文件不存在时去寻找一个存在的文件再进行解析。用上述的解释就是,我们访问xx.php的时候发现他并不存在,于是就会找webshell.jpg,找到该文件后,会将该文件以php的形式去解析执行

19人评论了“nginx解析漏洞”

  1. With havin so much content and articles do you ever run into any issues of plagorism or copyright violation? My website has a lot of unique content I’ve either authored myself or outsourced but it looks like a lot of it is popping it up all over the internet without my agreement. Do you know any ways to help protect against content from being stolen? I’d certainly appreciate it.

  2. Fatty has been honed for many years, and he is optimistic by nature, He has no choice can citalopram help lower blood pressure but to take this daily suffering as a test buy priligy pills Among the Huang Herbs To Lower Bp can you take doxycycline with high blood pressure clan, his seniority is higher than high blood pressure medications make my legs hurt Huang Lei

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

Scroll to Top