3 ms·
Yes, given a theoretical ransomware which uses AES and RSA I would assume it's operating like this (pseudo-code): private_key, public_key = keygen_rsa();
by jakobdabo 10y ago
Yes, given a theoretical ransomware which uses AES and RSA I would assume it's operating like this (pseudo-code):
private_key, public_key = keygen_rsa();
send_home(computer_id, private_key);
wipe(private_key);
for file in files {
aes_iv = ivgen_aes()
aes_key = keygen_aes()
encrypted_file = aes_ccm_encrypt(file, aes_iv, aes_key);
encrypted_aes_key = rsa_encrypt(aes_key, public_key);
wipe(aes_key);
filepos(file, 0);
write(file, aes_iv);
write(file, encrypted_aes_key);
write(file, encrypted_file);
}
- aftbit 10y agoI'd guess something more like (ignoring IVs for now): aes_key = keygen_aes() crypted_aes_key = rsa_encrypt(MALWARE_PUB_KEY, aes_key) for file in files: content = read(file) encrypted = aes_encrypt(content, aes_key) write(file, encrypted) wipe(aes_key) display(RANSOM_NOTE, crypted_aes_key) I'd assume all the details needed to decrypt the files EXCEPT for a small key would be stored in the encrypted file headers. The AES key could be encrypted to a given public key and then directly displayed to the victim. This means that the software doesn't really need to know how to send infoto the ransomware writers. Instead the victim would be responsible for contacting them.
- Cyph0n 10y agoInteresting idea! So for example, the user would provide the displayed hex digest as a note along with the payment. The payment verification server could then email the user the decrypted key.
- aftbit 10y agoYeah, or more likely a Bitcoin address and payment amount would be generated based on the attacker's Bitcoin public key and a hash of the encrypted key. Then the victim would pay that address and somehow contact the attacker (email, forum, twitter, whatever). The point is that the attacker could rely on the victim's human ingenuity to make it harder for the authorities to block payments.