Skip to content

PRP: Secret extractor for DataBricks User Account Personal Access Token #1719

@0xXA

Description

@0xXA
  • Secret name: DataBricks User Account Personal Access Token
  • DataBricks Explained:
    • What is DataBricks ?
     Databricks is a cloud-based data & AI platform built on top of Apache Spark.
     It’s designed to help companies store, process, analyze, and build machine learning models using massive amounts of data.
     Think of it as a workspace where data engineers, data scientists, and analysts all work together on big data.
     
     It runs on top of cloud providers like: AWS, Azure, and Google Cloud.
     Companies use Databricks for Big Data Processing, Data Warehousing & Analytics, and Machine Learning & AI.
    
    • What type of accounts are there in DataBricks ?
     There are two types of accounts that are used for authentication:
    
     	User account: For interactive CLI commands and API calls.
     	Service principal: For automated CLI commands and API calls without human interaction.
    
    • Does DataBricks Personal Access Token have a prefix ?
     Yes, all DataBricks Personal Access Token regardless of User Account or Service Principal have the following format:
     	A "dapi" prefix followed by an Alphanumeric String. In concret regex terms: dapi[a-zA-Z0-9]
    
  • Risk in exposing the secret:
     A leaked PAT is basically account takeover via API. Depending on the token owner's permissions, an attacker may be able to:
     Access Sensitive Data (customer's private data), Steal Intellectual Property (source code), Destroy or Corrupt Data,
     Run Malicious Workloads, and Move Laterally in the Cloud (S3 and GCS buckets).
    
  • Validation method, if any:
  • Send a POST request to /api/2.0/token/create endpoint with URL below as host to validate the secret:
    https://accounts.cloud.databricks.com // For AWS
    https://accounts.gcp.databricks.com // For Google Cloud
    https://accounts.azuredatabricks.net // For Microsoft Azure
    One must also include this in the header: PAT, and Account id
    We must note that Account id is only required for User Account authentication.
    Also, validation for user accounts is more complex than Service Principal because we need to send requests to all three endpoints.
  • If the response code is 200 or 400 or 401, then it's a valid token

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRPPatch Reward Program: This label is added to all PRP related issues for easy filteringPRP:AcceptedPatch Reward Program: This issue has been accepted as a PRP entry.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions