mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-26 22:52:06 +00:00
146 lines
6.8 KiB
Markdown
146 lines
6.8 KiB
Markdown
# 8086 - Pentesting InfluxDB
|
||
|
||
<figure><img src="../.gitbook/assets/image (45).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
\
|
||
Gebruik [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) om maklik en **outomatiese werksvloei** te bou wat aangedryf word deur die wêreld se **mees gevorderde** gemeenskapsinstrumente.\
|
||
Kry Toegang Vandag:
|
||
|
||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|
||
|
||
<details>
|
||
|
||
<summary><strong>Leer AWS hak 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 wil sien dat jou **maatskappy geadverteer word in HackTricks** of **HackTricks aflaai in PDF-formaat** Kyk na die [**INSKRYWINGSPLANNE**](https://github.com/sponsors/carlospolop)!
|
||
* Kry die [**amptelike PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
||
* Ontdek [**Die PEASS Familie**](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 haktruuks 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)** ontwikkel deur InfluxData. TSDB's is geoptimaliseer vir die stoor en bedien van tydreeksdata, wat bestaan uit tydstempel-waardepare. Vergeleke met algemene databasisse bied TSDB's aansienlike verbeterings in **stoorplek** en **verrigting** vir tydreeksdatastelle. Hulle maak gebruik van gespesialiseerde kompressie-algoritmes en kan gekonfigureer word om outomaties ou data te verwyder. Gespesialiseerde databasisindekse verbeter ook die vraagverrigting.
|
||
|
||
**Verstekpoort**: 8086
|
||
```
|
||
PORT STATE SERVICE VERSION
|
||
8086/tcp open http InfluxDB http admin 1.7.5
|
||
```
|
||
## Opsomming
|
||
|
||
Vanuit 'n pentester-oogpunt is hierdie nog 'n databasis wat sensitiewe inligting kan berg, dus is dit 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
|
||
```
|
||
Indien jy 'n fout soos hierdie een kry: `ERR: unable to parse authentication credentials` beteken dit dat dit **sekere geloofsbriewe 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)
|
||
|
||
### Handmatige Opsomming
|
||
|
||
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 oral vind)
|
||
```bash
|
||
> show databases
|
||
name: databases
|
||
name
|
||
----
|
||
telegraf
|
||
_internal
|
||
```
|
||
#### Wysig tabelle/meetpunte
|
||
|
||
Die [**InfluxDB-dokumentasie**](https://docs.influxdata.com/influxdb/v1.2/introduction/getting\_started/) verduidelik dat **meetpunte** in InfluxDB met SQL-tabelle vergelyk kan word. Die benaming van hierdie **meetpunte** dui op hul onderskeie inhoud, elkeen bevat data 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" %}
|
||
Tydens sekere toetse met die verifikasie omseiling is daar opgemerk dat die naam van die tabel tussen dubbele aanhalingstekens moes wees soos: `select * from "cpu"`
|
||
{% endhint %}
|
||
|
||
### Outomatiese Verifikasie
|
||
```bash
|
||
msf6 > use auxiliary/scanner/http/influxdb_enum
|
||
```
|
||
<details>
|
||
|
||
<summary><strong>Leer AWS-hacking vanaf 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 [**INSKRYWINGSPLANNE**](https://github.com/sponsors/carlospolop)!
|
||
* Kry die [**amptelike PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
||
* Ontdek [**Die PEASS Familie**](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 haktruuks 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 (45).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
\
|
||
Gebruik [**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks) om maklik te bou en **werkstrome outomatiseer** wat aangedryf word deur die wêreld se **mees gevorderde** gemeenskapshulpmiddels.\
|
||
Kry Vandaag Toegang:
|
||
|
||
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
|