InfluxDB 1.7.6 之前版本在 services/httpd/handler.go 的 authenticate 函数中存在一个身份认证绕过漏洞,因为 JWT 令牌可能具有空的 SharedSecret(也就是共享密钥)。
(参见 https://nvd.nist.gov/vuln/detail/CVE-2019-20933 了解更多详情)
此 PoC 利用上述 CVE 制作了一个快速而粗糙的 influxDB 客户端。
usage: influx-client.py [-h] [--host HOST] [--port PORT] [--user USER] [--db DB] query
A simple, silly, over-the-top influxdb client made in Python
positional arguments: query The query to execute. default: SHOW DATABASES
optional arguments: -h, --help show this help message and exit --host HOST The target IP. (default: localhost) --port PORT, -p PORT The target port. (default: 8086) --user USER The target username. (default: admin) --db DB The database to use.
部分代码借鉴自 https://github.com/LorenzoTullini/InfluxDB-Exploit-CVE-2019-20933