Skip to content
Write-up Intermediate

Obfuscation Isn’t a Fix, And It Cost Them $2,500 — A Real-World Case Study

The client tried to hide known vulnerabilities by encrypting HTTP request bodies with a client-side AES key wrapped in a static RSA public key. The tester showed that the encryption could be bypassed by intercepting the client-generated key at runtime, allowing the original vulnerabilities to be exploited again.

Aydin Naserifard Follow

Published on infosecwriteups.com

A while ago, I performed a penetration test on a major web application owned by one of my clients. During the assessment, I identified several critical vulnerabilities.

Aydin Naserifard, on infosecwriteups.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 client-side encryption relied on a key generated in the browser, which an attacker can capture at runtime, so it provided no real protection.

What the attacker needed

Access to the web application; ability to run JavaScript in the browser

The fix

The proper fix is to address the underlying vulnerabilities rather than obfuscating them with client-side encryption.

How it was found

  1. Inspect the JavaScript bundle to find the HashData function that encrypts request data.
  2. Set a breakpoint on the HashData function to capture the AES key and encrypted payload in memory.
  3. Log the AES key and plaintext data to the console.
  4. Use the captured key to encrypt custom payloads and decrypt server responses.
  5. Replay and modify requests to exploit the original vulnerabilities.

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.

The company had security bugs but instead of fixing them, they encrypted the data sent from the browser to the server, hoping attackers couldn't understand it. However, because the encryption key is created in the browser, anyone can grab it while the page is running and decrypt or modify the data. So the bugs were still there and still exploitable.

More by Aydin Naserifard

View all

5 more disclosed reports, best first.

Similar reports

Same bug class and techniques, clearest first.