Skip to content
Info disclosure Write-up Beginner

Proof Of Concept

A cloud-hosted data loss prevention (DLP) solution failed to detect sensitive data after it was encoded in Base64, allowing an attacker to exfiltrate credit card numbers from a Word document. The author demonstrated that a simple PowerShell script could extract and encode the data, bypassing the DLP.

medium.com

Published on medium.com

Recently I was on an engagement where one of the objectives was to discover sensitive data and possibly exfiltrate the data. This led to me trying some basic (very basic at that) Powershell scripting and encoding techniques to achieve the goal.

Russell Wells, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the DLP solution only inspected for sensitive data in plain text and did not decode or recognise common encoding such as Base64.

Impact

An attacker could exfiltrate sensitive data such as credit card numbers past a cloud-hosted DLP solution, but the text notes that this only works if the DLP is misconfigured and no host-based DLP is present.

What the attacker needed

Access to a document with sensitive data; ability to run PowerShell scripts; cloud-hosted DLP that does not inspect encoded data; no host-based DLP

The fix

The DLP should be configured to detect and block encoded or obfuscated sensitive data, and host-based DLP should be used in addition to cloud-based DLP.

How it was found

  1. Extract the text from the Word document into a plain text file using a PowerShell script.
  2. Encode the contents of the text file into Base64 using another PowerShell script.
  3. Upload or transfer the Base64-encoded file, which bypasses the cloud-based DLP.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A DLP system is meant to stop sensitive information like credit card numbers from leaving a company. Here, the DLP only looked for the numbers in plain text, so when the attacker converted the data into a different format (Base64, which looks like random letters and numbers), the DLP did not recognise it and let it through.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.