azure-postgres-mysql-admin-exfiltrate

Admin read access to the database (CanReadData) enables full exfiltration via pg_dump (PostgreSQL) or mysqldump (MySQL).

derived azure emits CanExfiltrate

match

A conjunctive graph pattern. Variables (?x) bind node ids; every clause must hold.

{'principal': None} CanReadData {'server': None}

where

node_class(?server) == Data and node_type(?server) == RelationalDatabase node_type(?server) matched provider_type in ['Microsoft.DBforPostgreSQL/flexibleServers', 'Microsoft.DBforMySQL/flexibleServers']

emit

source typeIdentity
target typeRelationalDatabase
source?principal
target?server
conditionsnetwork_reachability
state logicInherits the state of the upstream CanReadData edge (per edge_state_model weakest-contributor rule). If CanReadData is ACTIVE, CanExfiltrate is ACTIVE (the attacker can run pg_dump / mysqldump). If CanReadData is CONDITIONAL, CanExfiltrate is also CONDITIONAL with the same preconditions. Exfiltration is gated by the data-plane credential (native admin password or Entra token) and network reachability — already captured in the upstream CanReadData edge. No additional ARM permission check applies.

Narrative

{principal.name} can read all data in {server.name} (CanReadData). Using native database tools (pg_dump for PostgreSQL, mysqldump for MySQL), the attacker can exfiltrate the entire database contents, including user data, application secrets, and embedded credentials. Exfiltration is a native database-engine capability (not gated by ARM RBAC) and requires only the data-plane credential and network reach.

Raw rule rules/derived/azure/postgres-mysql.yaml

id: azure-postgres-mysql-admin-exfiltrate
emits: CanExfiltrate
description: Admin read access to the database (CanReadData) enables full exfiltration via pg_dump (PostgreSQL)
  or mysqldump (MySQL).
match:
- - principal: null
  - CanReadData
  - server: null
where:
- node_class(?server) == Data and node_type(?server) == RelationalDatabase
- node_type(?server) matched provider_type in ['Microsoft.DBforPostgreSQL/flexibleServers', 'Microsoft.DBforMySQL/flexibleServers']
emit:
  source_type: Identity
  target_type: RelationalDatabase
  source: ?principal
  target: ?server
  permissions: []
  conditions:
  - network_reachability
  state_logic: "Inherits the state of the upstream CanReadData edge (per edge_state_model weakest-contributor\
    \ rule). If CanReadData is ACTIVE, CanExfiltrate is ACTIVE (the attacker can run pg_dump / mysqldump).\
    \ If CanReadData is CONDITIONAL, CanExfiltrate is also CONDITIONAL with the same preconditions. Exfiltration\
    \ is gated by the data-plane credential (native admin password or Entra token) and network reachability\
    \ \u2014 already captured in the upstream CanReadData edge. No additional ARM permission check applies."
  confidence: '0.95'
  derived_from:
  - 'CanReadData edge: source=?principal, target=?server, rule=(azure-postgres-mysql-admin-reset-readdata
    or azure-postgres-mysql-entra-admin-readdata)'
  false_positive_note: "This is a direct consequence of CanReadData \u2014 do NOT emit as ACTIVE unless\
    \ CanReadData is ACTIVE or CONDITIONAL at the upstream rule. Network reachability is already encoded\
    \ in the upstream CanReadData; do not add redundant gates. Exfiltration via pg_dump (PostgreSQL) or\
    \ mysqldump (MySQL) is a native database-engine capability \u2014 the attacker must hold valid credentials\
    \ (native admin password or Entra token) to run these tools. There is no ARM permission check at the\
    \ data plane. Do NOT list ARM permissions as blockers on this edge."
  narrative: '{principal.name} can read all data in {server.name} (CanReadData). Using native database
    tools (pg_dump for PostgreSQL, mysqldump for MySQL), the attacker can exfiltrate the entire database
    contents, including user data, application secrets, and embedded credentials. Exfiltration is a native
    database-engine capability (not gated by ARM RBAC) and requires only the data-plane credential and
    network reach.'
move · open · esc close