mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-23 21:24:06 +00:00
146 lines
6.8 KiB
Markdown
146 lines
6.8 KiB
Markdown
# 8086 - Pentesting InfluxDB
|
||
|
||
<figure><img src="../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
\
|
||
Gebruik [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) om maklik en outomatiese werkstrome te bou met behulp van die wêreld se mees gevorderde gemeenskapsinstrumente.\
|
||
Kry vandag toegang:
|
||
|
||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
||
|
||
<details>
|
||
|
||
<summary><strong>Leer AWS-hacking van nul tot held met</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||
|
||
Ander maniere om HackTricks te ondersteun:
|
||
|
||
* As jy jou **maatskappy in HackTricks wil adverteer** of **HackTricks in PDF wil aflaai**, kyk na die [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
|
||
* Kry die [**amptelike PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
||
* Ontdek [**The PEASS Family**](https://opensea.io/collection/the-peass-family), ons versameling eksklusiewe [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||
* **Sluit aan by die** 💬 [**Discord-groep**](https://discord.gg/hRep4RUj7f) of die [**telegram-groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||
* **Deel jou hacktruuks deur PR's in te dien by die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github-opslag.
|
||
|
||
</details>
|
||
|
||
## Basiese Inligting
|
||
|
||
**InfluxDB** is 'n oopbron **tydreeksdatabasis (TSDB)** wat ontwikkel is deur InfluxData. TSDB's is geoptimeer vir die stoor en bediening van tydreeksdata, wat bestaan uit tydstempel-waardepare. In vergelyking met algemene databasisse bied TSDB's aansienlike verbeterings in **stoorruimte** en **prestasie** vir tydreeksdatastelle. Hulle maak gebruik van gespesialiseerde kompressie-algoritmes en kan gekonfigureer word om outomaties ou data te verwyder. Gespesialiseerde databasisindekse verbeter ook die vraagprestasie.
|
||
|
||
**Verstekpoort**: 8086
|
||
```
|
||
PORT STATE SERVICE VERSION
|
||
8086/tcp open http InfluxDB http admin 1.7.5
|
||
```
|
||
## Enumerasie
|
||
|
||
Vanuit 'n pentester se oogpunt is hierdie 'n ander databasis wat sensitiewe inligting kan stoor, so dit is interessant om te weet hoe om al die inligting te dump.
|
||
|
||
### Verifikasie
|
||
|
||
InfluxDB mag verifikasie vereis of nie.
|
||
```bash
|
||
# Try unauthenticated
|
||
influx -host 'host name' -port 'port #'
|
||
> use _internal
|
||
```
|
||
As jy 'n fout soos hierdie een kry: `ERR: nie in staat om verifikasiebewyse te ontled nie`, beteken dit dat dit **verifikasiebewyse verwag**.
|
||
```
|
||
influx –username influx –password influx_pass
|
||
```
|
||
Daar was 'n kwesbaarheid in influxdb wat toegelaat het om die outentifikasie te omseil: [**CVE-2019-20933**](https://github.com/LorenzoTullini/InfluxDB-Exploit-CVE-2019-20933)
|
||
|
||
### Handleiding Enumerasie
|
||
|
||
Die inligting van hierdie voorbeeld is geneem van [**hier**](https://oznetnerd.com/2017/06/11/getting-know-influxdb/).
|
||
|
||
#### Wys databasisse
|
||
|
||
Die gevonde databasisse is `telegraf` en `internal` (jy sal hierdie een oral vind)
|
||
```bash
|
||
> show databases
|
||
name: databases
|
||
name
|
||
----
|
||
telegraf
|
||
_internal
|
||
```
|
||
#### Wys tabelle/metings
|
||
|
||
Die [**InfluxDB-dokumentasie**](https://docs.influxdata.com/influxdb/v1.2/introduction/getting_started/) verduidelik dat **metings** in InfluxDB gelykstaande is aan SQL-tabelle. Die benaming van hierdie **metings** dui op hul onderskeie inhoud, waar elkeen data bevat wat relevant is vir 'n spesifieke entiteit.
|
||
```bash
|
||
> show measurements
|
||
name: measurements
|
||
name
|
||
----
|
||
cpu
|
||
disk
|
||
diskio
|
||
kernel
|
||
mem
|
||
processes
|
||
swap
|
||
system
|
||
```
|
||
#### Wys kolomme/veld sleutels
|
||
|
||
Die veld sleutels is soos die **kolomme** van die databasis
|
||
```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 ...]
|
||
```
|
||
#### Stort Tabel
|
||
|
||
En uiteindelik kan jy die tabel **stort** deur iets soos dit te doen
|
||
```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" %}
|
||
In sommige toetse met die omseiling van die verifikasie is opgemerk dat die naam van die tabel tussen dubbele aanhalingstekens moet wees, soos: `select * from "cpu"`
|
||
{% endhint %}
|
||
|
||
### Outomatiese Verifikasie
|
||
```bash
|
||
msf6 > use auxiliary/scanner/http/influxdb_enum
|
||
```
|
||
<details>
|
||
|
||
<summary><strong>Leer AWS-hacking van nul tot held met</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||
|
||
Ander maniere om HackTricks te ondersteun:
|
||
|
||
* As jy jou **maatskappy geadverteer wil sien in HackTricks** of **HackTricks in PDF wil aflaai**, kyk na die [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
|
||
* Kry die [**amptelike PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
||
* Ontdek [**The PEASS Family**](https://opensea.io/collection/the-peass-family), ons versameling eksklusiewe [**NFTs**](https://opensea.io/collection/the-peass-family)
|
||
* **Sluit aan by die** 💬 [**Discord-groep**](https://discord.gg/hRep4RUj7f) of die [**telegram-groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
||
* **Deel jou hacking-truuks deur PR's in te dien by die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) GitHub-opslag.
|
||
|
||
</details>
|
||
|
||
<figure><img src="../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
\
|
||
Gebruik [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) om maklik **werkstrome** te bou en outomatiseer met behulp van die wêreld se **mees gevorderde** gemeenskapsinstrumente.\
|
||
Kry vandag toegang:
|
||
|
||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|