Customising Blacklist3r for OWIN OAuth Access Tokens
The tool Blacklist3r could not decrypt OWIN OAuth access tokens, so the authors modified it to support that token type. This allowed them to recover the machine key from a target's bearer token and achieve authentication bypass.
Published on zxsecurity.co.nz
Blacklist3r is a project that collects pre-published secret keys such as the Machine Key used by a .NET application from various locations such as public Github repositories, blog posts and tutorials. These keys are sometimes reused in the production environment or were accidentally published by the developers.
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 application used a machine key that had been published publicly, allowing tokens to be decrypted and forged.
What the attacker needed
Target uses OWIN OAuth with a published machine key; attacker has a valid bearer token to test
How it was found
- Identify that the target uses OWIN OAuth access tokens.
- Modify Blacklist3r's purpose string to match OAuth bearer tokens.
- Run the modified tool against the target's bearer token.
- Recover the machine key and decrypt the token.
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.
Some .NET web applications protect login tokens with a secret key. If that key was accidentally published online, an attacker can try known keys until one works. The authors changed a tool so it could test these keys against a particular kind of token, and when a key matched they could forge a valid login.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.