Skip to content

DL-creator/Padding_Oracle_Attack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Padding Oracle Attack Demo (Node.js)

This project demonstrates a Padding Oracle Attack. The encryption used is AES-128-CBC and the padding has been made to match the variation of PKCS#7 padding that TLS 1.0 uses.

The goal is to recover the original plaintext using only oracle access to a server that reveals whether decrypted ciphertext has valid padding.

Requirements to run

  • Node.js

How To Run The Attack

1.

Open a terminal and enter following command:

node demo.js

2.

You will then be promted to enter a plaintext message - or go with the default secret message: "This is a secret message."

3.

As an output you'll see:

  1. The ciphertext as a HEX
  2. The original message
  3. The original message as a HEX
  4. The original length of the message
  5. The ciphertext length
  6. The recovered Plaintext
  7. A response on whether or not the attack succeded.

If the attack succeded you should see the response:

  • Success: The attack correctly recovered the plaintext!

If it failed you should see: Failure: The recovered plaintext does not match the original.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors