Skip to content
Padding oracle attack demo.
Python Java
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aesdemo
.gitignore
padding_oracle.py
readme.md

readme.md

Usage

首先需要实现decode(secret: bytearray, iv: bytearray)->int方法,返回负值为padding exception。

DECODE_FUNC=decode

解密

secret=bytearray.fromhex("c8c9c4f092468f9e75b520a3ea1832c0")
real_iv=bytearray.fromhex("c86518374d219a7e")
intermedi=burp_intermediary(secret, block_len)
decrypt(secret, real_iv)

加密

fake_plain=bytearray("987654321", "ascii")
encrypt(fake_plain, len(real_iv))

选择单线程

单线程有利于理解算法,但是不实用

burp_iv=burp_iv_single_core
You can’t perform that action at this time.