the_open_door
coffee
ESEN
← Back to index

PortableKanban password decryption

ATT&CKT1555

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.

How to detect it. There is no exploit here to raise an alert: the attack is reading a file and decrypting it elsewhere, so the signal is in the access. Watch for reads of PortableKanban.cfg and the *.pk3 files by processes other than the application itself (Windows object auditing, event 4663 with a SACL on the app directory), copies to temporary paths, and the file leaving the host. Because the decryption is offline and invisible, the second net is what comes after: a successful authentication by that account from a machine that never used it before (event 4624 with a new source) is what gives away that the password left the store.

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