Last active
August 15, 2023 17:27
-
-
Save gquere/4c711f0c3590ed843bc9ba0bdacc04e6 to your computer and use it in GitHub Desktop.
Decrypt FortiGate configuration secrets CVE-2019-6693
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from Cryptodome.Cipher import AES | |
import base64 | |
import sys | |
key = b'Mary had a littl' | |
data = base64.b64decode(sys.argv[1]) | |
iv = data[0:4] + b'\x00' * 12 | |
ct = data[4:] | |
cipher = AES.new(key, iv=iv, mode=AES.MODE_CBC) | |
pt = cipher.decrypt(ct) | |
print(pt) |
Can you help me decrypt a key I am not familiar with python?
what?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you help me decrypt a key I am not familiar with python?