2024-05-06 11:08:56 +00:00
|
|
|
|
# 8086 - InfluxDB 渗透测试
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-05-05 22:03:00 +00:00
|
|
|
|
<figure><img src="../.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
2022-08-31 22:35:39 +00:00
|
|
|
|
|
2024-02-05 03:17:45 +00:00
|
|
|
|
\
|
2024-05-06 11:08:56 +00:00
|
|
|
|
使用 [**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_content=8086-pentesting-influxdb) 可轻松构建并通过全球**最先进**的社区工具**自动化工作流程**。\
|
2023-08-03 19:12:22 +00:00
|
|
|
|
立即获取访问权限:
|
2022-08-31 22:35:39 +00:00
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=8086-pentesting-influxdb" %}
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
<summary><strong>从零开始学习 AWS 黑客技术,成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE(HackTricks AWS 红队专家)</strong></a><strong>!</strong></summary>
|
2024-01-10 06:29:36 +00:00
|
|
|
|
|
2024-02-05 03:17:45 +00:00
|
|
|
|
支持 HackTricks 的其他方式:
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
* 如果您想在 HackTricks 中看到您的**公司广告**或**下载 PDF 版本的 HackTricks**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2024-02-09 12:48:25 +00:00
|
|
|
|
* 获取[**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
|
2024-05-05 22:03:00 +00:00
|
|
|
|
* 探索[**PEASS 家族**](https://opensea.io/collection/the-peass-family),我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
|
2024-03-17 16:19:28 +00:00
|
|
|
|
* **加入** 💬 [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或在 **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)** 上关注我们**。
|
2024-02-05 03:17:45 +00:00
|
|
|
|
* 通过向 [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github 仓库提交 PR 来分享您的黑客技巧。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 基本信息
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
**InfluxDB** 是由 InfluxData 开发的开源**时间序列数据库(TSDB)**。TSDB 专为存储和提供时间序列数据而优化,这些数据由时间戳-值对组成。与通用数据库相比,TSDB 在时间序列数据集的**存储空间**和**性能**方面提供了显著改进。它们采用专门的压缩算法,并可配置为自动删除旧数据。专门的数据库索引还增强了查询性能。
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
**默认端口**:8086
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```
|
|
|
|
|
PORT STATE SERVICE VERSION
|
|
|
|
|
8086/tcp open http InfluxDB http admin 1.7.5
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 枚举
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
从渗透测试人员的角度来看,这是另一个可能存储敏感信息的数据库,因此了解如何转储所有信息是很有趣的。
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-01-10 06:29:36 +00:00
|
|
|
|
### 认证
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-05-05 22:03:00 +00:00
|
|
|
|
InfluxDB可能需要认证,也可能不需要
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```bash
|
|
|
|
|
# Try unauthenticated
|
|
|
|
|
influx -host 'host name' -port 'port #'
|
|
|
|
|
> use _internal
|
|
|
|
|
```
|
2024-02-05 03:17:45 +00:00
|
|
|
|
如果你遇到类似这样的错误:`ERR: unable to parse authentication credentials`,这意味着它**需要一些凭据**。
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```
|
|
|
|
|
influx –username influx –password influx_pass
|
|
|
|
|
```
|
2024-05-06 11:08:56 +00:00
|
|
|
|
存在一个漏洞,允许绕过身份验证的influxdb:[**CVE-2019-20933**](https://github.com/LorenzoTullini/InfluxDB-Exploit-CVE-2019-20933)
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### 手动枚举
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-02-05 03:17:45 +00:00
|
|
|
|
这个示例的信息来自[**这里**](https://oznetnerd.com/2017/06/11/getting-know-influxdb/)。
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
#### 显示数据库
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
找到的数据库是 `telegraf` 和 `internal`(你会在任何地方找到这个)。
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```bash
|
|
|
|
|
> show databases
|
|
|
|
|
name: databases
|
|
|
|
|
name
|
|
|
|
|
----
|
|
|
|
|
telegraf
|
|
|
|
|
_internal
|
|
|
|
|
```
|
2024-02-05 03:17:45 +00:00
|
|
|
|
#### 显示表/测量
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-05-05 22:03:00 +00:00
|
|
|
|
[**InfluxDB文档**](https://docs.influxdata.com/influxdb/v1.2/introduction/getting\_started/)解释说,在InfluxDB中,**测量**可以与SQL表并行。这些**测量**的命名方式表明了它们各自内容的特点,每个都包含与特定实体相关的数据。
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```bash
|
|
|
|
|
> show measurements
|
|
|
|
|
name: measurements
|
|
|
|
|
name
|
|
|
|
|
----
|
|
|
|
|
cpu
|
|
|
|
|
disk
|
|
|
|
|
diskio
|
|
|
|
|
kernel
|
|
|
|
|
mem
|
|
|
|
|
processes
|
|
|
|
|
swap
|
|
|
|
|
system
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
#### 显示列/字段键
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
字段键类似于数据库的**列**
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```bash
|
|
|
|
|
> show field keys
|
|
|
|
|
name: cpu
|
|
|
|
|
fieldKey fieldType
|
|
|
|
|
-------- ---------
|
|
|
|
|
usage_guest float
|
|
|
|
|
usage_guest_nice float
|
|
|
|
|
usage_idle float
|
|
|
|
|
usage_iowait float
|
|
|
|
|
|
|
|
|
|
name: disk
|
|
|
|
|
fieldKey fieldType
|
|
|
|
|
-------- ---------
|
|
|
|
|
free integer
|
|
|
|
|
inodes_free integer
|
|
|
|
|
inodes_total integer
|
|
|
|
|
inodes_used integer
|
|
|
|
|
|
|
|
|
|
[ ... more keys ...]
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
#### 转储表
|
2021-11-02 21:50:13 +00:00
|
|
|
|
|
2024-02-05 03:17:45 +00:00
|
|
|
|
最后,您可以执行类似以下操作来**转储表**:
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```bash
|
|
|
|
|
select * from cpu
|
|
|
|
|
name: cpu
|
|
|
|
|
time cpu host usage_guest usage_guest_nice usage_idle usage_iowait usage_irq usage_nice usage_softirq usage_steal usage_system usage_user
|
|
|
|
|
---- --- ---- ----------- ---------------- ---------- ------------ --------- ---------- ------------- ----------- ------------ ----------
|
|
|
|
|
1497018760000000000 cpu-total ubuntu 0 0 99.297893681046 0 0 0 0 0 0.35105315947842414 0.35105315947842414
|
|
|
|
|
1497018760000000000 cpu1 ubuntu 0 0 99.69909729188728 0 0 0 0 0 0.20060180541622202 0.10030090270811101
|
|
|
|
|
```
|
|
|
|
|
{% hint style="warning" %}
|
2024-05-06 11:08:56 +00:00
|
|
|
|
在进行身份验证绕过测试时,注意到表名需要用双引号括起来,例如:`select * from "cpu"`
|
2021-11-02 21:50:13 +00:00
|
|
|
|
{% endhint %}
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### 自动化身份验证
|
2021-11-02 21:50:13 +00:00
|
|
|
|
```bash
|
|
|
|
|
msf6 > use auxiliary/scanner/http/influxdb_enum
|
|
|
|
|
```
|
2022-04-28 16:01:33 +00:00
|
|
|
|
<details>
|
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
<summary><strong>从零开始学习AWS黑客技术,成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE(HackTricks AWS红队专家)</strong></a><strong>!</strong></summary>
|
2024-01-10 06:29:36 +00:00
|
|
|
|
|
2024-03-29 21:06:45 +00:00
|
|
|
|
支持HackTricks的其他方式:
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-05 03:17:45 +00:00
|
|
|
|
* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
|
2024-05-06 11:08:56 +00:00
|
|
|
|
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* **加入** 💬 [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**。**
|
2024-02-05 03:17:45 +00:00
|
|
|
|
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2024-05-05 22:03:00 +00:00
|
|
|
|
<figure><img src="../.gitbook/assets/image (48).png" alt=""><figcaption></figcaption></figure>
|
2022-08-31 22:35:39 +00:00
|
|
|
|
|
|
|
|
|
\
|
2024-05-06 11:08:56 +00:00
|
|
|
|
使用[**Trickest**](https://trickest.com/?utm_source=hacktricks&utm_medium=text&utm_campaign=ppc&utm_content=8086-pentesting-influxdb)轻松构建和**自动化工作流程**,由全球**最先进**的社区工具驱动。\
|
2023-08-03 19:12:22 +00:00
|
|
|
|
立即获取访问权限:
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-05-06 11:08:56 +00:00
|
|
|
|
{% embed url="https://trickest.com/?utm_source=hacktricks&utm_medium=banner&utm_campaign=ppc&utm_content=8086-pentesting-influxdb" %}
|