Researchers quietly cracked Zeppelin ransomware keys
krebsonsecurity.com
krebsonsecurity.com
My QNAP NAS was open to the internet (a forgotten but-not-in-use port forward on my router) and the famous QLocker ransomware got hold of it.
I got out, I got really lucky. I've millions of files (useless to anyone in the world but me) on my NAS and the ransomware encryption took literally days. I probably discovered it on the 3rd day of its activity.
Someone brighter than me already figured things out and posted this on the qnap forums, that there's a 7zip process running which encrypts the files and they process all files sequentially (aka: takes a long time in my case). This 7zip process gets executed for every file and gets passed the password for it on the command line, though in the process view it was masked for me. But I could just replace the invoked 7zip binary with a shell script and redirect all the arguments -> presto, I had the password.
I then wrote some more shell scripts to decrypt all the files infected so far, wrote it more efficient than the attacker, and within 24 hours everything was back to normal.
Before anyone cries "BACKUPS": yes, of course I've off-site backup and they also were not (yet) affected. But actually I only backed up the real important data for me and my family, due to the costs at that time, I didn't backup _everything_. But I since switched cloud backup storage to Backblaze which I figured was the cheapest vs. acceptable ergonomics for recovery, so I could increase the amount of data I back up.
Lesson learned, I guess. I know not everyone can help themselves like I could, I feel really lucky I got away with just some blood sweating.
I always assumed it used asymmetric encryption, and that the decryption key would never hit the victim's premises.
Definitely not computer gods.
Or is the reality of this that it's just encrypting a symmetric key with the asymmetric cipher, and then encrypting data using that key?
Than you store that random key encrypted with asymmetric algorithm.
Same goes for things like disk encryption. You never use the users key for encrypting the data. You always encrypt using random large key that is not brute-forcable and encrypt that one with user password, so the process of changing the user password is just decrypting the random key and encrypting it back with new password. Or you would have to re-encrypt the whole disk on password change
Most ransomware authors, I'd wager, have not been reading since before 1997.
You declare a sandbox and run program there (by default or context menu) and all the changes, including registry will be done as "copy-on-write" into sandboxie folder. Even uninstalling complex software like adobe photoshop is just deleting that folder.
Here someone is teasing but running wannacry in a sandboxie: https://www.youtube.com/watch?v=bg5GaEVEYlE
What ransonware will do in this case, it will open a file, but all the writes are going to be done within sandboxie directory leaving original files intact.
It's complicated but IMO virtualization seems to have less opportunities to fail vs a sandbox in terms of isolation.
Anyway: https://sandboxie-website-archive.github.io/www.sandboxie.co...
(old site before it was bought and later released into open source)
Edit: specified Outpost
There is absolutely no way they could have proven that...
Our firewall says it's fine....
It reminds me of something I learned when watching the movie "The Imitation Game" retelling how Alan Turing and his team cracked the Enigma code. They tried hard to make sure that the Germans wouldn't notice they had cracked it, and only used it sparingly so that it would not be noticeable.
Which, I realized, meant that the British and the Germans had teams of statisticians pitted against each other, one trying to make sure that their actions were not detectable statistically, and the other constantly monitoring the numbers to detect unusual patterns.
That's probably not true from German side though.
I learned this as a fact, but upon checking now, it likely has been a rumor/conspiracy.
But there surely are other, real examples.
> Unit 221B ultimately built a “Live CD” version of Linux that victims could run on infected systems to extract that RSA-512 key.
I'm guessing most didn't make it within the 5-min window, so the Live CD would recover the "deleted" record from the Windows Registry database?
> You can’t analyze the registry live on a windows machine because it locks the NTUSER.dat files by the process id (PID) 104 known as Registry.exe. Any useful registry information will be found in that process, and we recommend getting a memory and VAD dump of the Registry.exe process as soon as possible. You can do this quite easily with the REKALL tool, which can perform live and dead memory analysis on Windows machines.
[0]: https://blog.unit221b.com/dont-read-this-blog/0xdead-zeppeli...
“Since Zeppelin deletes the registry key store, we will have to extract unallocated cells from the registry to recover the Public Key section. […]
We have had 100% success carving the public key from NTUser.dat for live Zeppelin samples in the field”
it turns out the registry key that was deleted can be recovered. Much like you can recover deleted files from a file-system, you can recover deleted keys from a windows registry.
In the words of the blog[1]:
Since Zeppelin deletes the registry key store, we will have to extract unallocated cells from the registry to recover the Public Key section. We use a combination of code and existing tools such as yarp and regipy to carve registry information from the hard drive, memory, registry backup, and transaction files. We also need to recover the deleted data. The most successful process used yarp-carve and yarp-print with the -deleted flag against NTUSER.DAT files, which are compressed.
[1] https://blog.unit221b.com/dont-read-this-blog/0xdead-zeppeli...
Also, I just realized how cryptocurrency wallet draining happens with these infections. I thought it was because they scanned the whole drive for private keys and sent those separately. It seems it's probably more accidental: The user gets to send them one file to decrypt.
Note that RSA-155bit is much worse than RSA-512bit. Both are insecure and should not be used, but you are still looking at the difference of "you need to rent a server farm to crack is" and "you need a laptop to crash it". I'm probably underselling how trivial RSA-155 is to crack.
You can find much cheaper CPUs outside of the main cloud providers.
At the moment, spot price on a m5.24xlarge is $1/hr for 96 cores and ~300GB of RAM.
That’ll get it done for around $100 — assuming you can checkpoint and tolerate the risk of a shutdown. (The on-demand price is $4.60/h; $475 total.)
https://arstechnica.com/information-technology/2015/10/break...
Uhmmm…. this is an article about breaking a 3-piece puzzle using one piece of the puzzle and you give us this highly deductible information?
In seriousness though, 'quietly' is clickbait meant to imply this they were doing it secretly for some nefarious purpose. Also the fact that there is an article about it contradicts that meaning of quietly as its being published to the public. /end rant
Weird, you'd think this would be the exact time for some three letter agency to apply the xkcd $5 wrench approach:
Black bag rendition one of the principals, beat the private key out of him and publicize the entire thing. You only have to do it once, really.
Would that make it a $10 wrench?