Bitcrypt broken
blog.cassidiancybersecurity.com
blog.cassidiancybersecurity.com
I've been thinking about ways to create an offline-equivalent backup, so that it can be automated. One way would be to have a computer that is only connected via serial cable, which only accepts new files to be backed up. (No ability to delete via the serial cable.)
Of course if you backup system gets hit then the whole thing falls apart, but you can isolate this one system and it doesn't need to accept any incoming connections.
Unless you need to remote administer it.... But I suppose that's what virtualization helps with.
This does rely on the FTP implementation being solid (vsftpd seems like a reasonable choice).
If such a remote root exploit exists, and the person that discovers it decides to write something like the Code Red worm from 2001, and also decides to have the worm erase all block devices, I'd currently lose every file I have and all of my backups, even though they are geographically dispersed. It's possible that even services like S3 and Dropbox would be wiped in such an event.
Once again, I realize I'm unusually paranoid in this regard, but I really don't want to lose my stuff.
If it's online, it isn't a backup, it's redundancy.
And if it can not in any way overwrite history, it's as good as an offline backup. But now we are talking about custom kernels and maybe hardware.
One of the approaches we take with Efficito is to ensure our offsite backups are pulled by the backup server, not pushed there by the backed up server (exception is made for archiving Pg wal segments). A backed-up server has no access to its own offsite, online backups for db base backups, file backups, and the like and only write-once-read-only access to its own WAL segment archives.
It's not quite an offline backup (and for our purposes there are real limitations with fully offline backups), but it is about as close as you can get.
This has happened quite a lot in some high profile cases over recent years, where [Company Name Here] was hacked and as well as taking down their live service the attackers got from there to the backups and killed them too.
> I've been thinking about ways to create an offline-equivalent backup, so that it can be automated.
The trick I use to improve the safety of my online+offsite backups is to stop any one service being able to connect and authenticate with all the others, disconnecting the online backups from their source as much as possible.
My "live" stores connect to an intermediary and push updates, and my online backup stores connect to the intermediary and pull updates (with restores and automated tests being the same thing in reverse). The live stores and the backups can not connect+authenticate to each other directly, and the intermediary can't connect+authenticate to either the live store or the backups. This way if a malicious entity (be it a human or an automated exploit) gains access to a privileged account on any of the three locations it does not automatically gain access to all the others, but the process of taking and testing backups can still be automated.
Of course this isn't perfect: it is a little more hassle to setup, needs an extra resource (the intermediate location) which could potentially be a point of failure (though your automated backup tests will hopefully detect problems there before they become serious) and it depends on good credentials management (I sill need to be able to connect to all three for remote admin and if you use the same credentials for them all, and/or store said credentials in the same insecure place, the extra protection is lost) but I find it works well in practise. Also as I'm using the same OS+libs+tools in all three places I'm still susceptable to attacks using "zero day" exploits on some part of that stack, so for that reason (amongst others) this does not remove the need for truly offline backups.
A lower tech alternative is to use a Linear Tape-Open drive/cartridge. Not only are they archival safe (20 years+), but either you can use a new one every time or I think there is an option somewhere to only write once.
https://en.wikipedia.org/wiki/Linear_Tape-Open
Edit: Indeed, available since LTO3 https://en.wikipedia.org/wiki/Write_Once_Read_Many
Of course this isn't really automated, but if you have one of those disc changers that people often use with audio CDs, you might be able to turn that into an automated system with a bit of scripting and hardware hacking.
As terrible as optical discs are for long-term archiving, I'm sure their shelf life usually exceeds that of a carton of eggs. That should be enough to protect against ransomware and most other kinds of disasters that can strike a personal computer.
a) Creating multiple DVDs each time you back up (if your dataset is small enough and stable enough that DVDs are an option, doing two burns seems like an acceptable burden to me).
b) Storing parity files[0] on the DVDs to allow you to actually recover from bit rot and disk damage.
You can do this with Tarsnap. The tarsnap-keymgmt utility allows you to create key file which can only create new archives, not delete or overwrite existing ones.
The number has 128 digits, which could indicate a (big)
mistake from the malware author, who wanted to generate
a 128 bytes key.
Finally, we simply deal with RSA-464 encryption, which
can easily be broken on a standard PC in a matter of hours.* Update your anti-virus software * Apply all software updates * Pick a hard password
Rarely do these matter: ransomware, Target, etc., are exploits unrelated to these defenses. Why do we push them so hard? Does anyone feel safer and more righteous from advocating this security theatre?
Because of this, I am going to assume that it is enabled by default on IE. Correct me if I'm wrong. IE has about an 18-20% share of the browser market [1]. A significant amount of targets by any measure!
So as long as it is true that a large percentage of the target market could benefit from "Don't visit/view!" security advice then it makes sense to include such advice.
[1] http://gs.statcounter.com/#desktop-browser-ww-monthly-200807...
Drive bys are still of course possible via Adobe Flash and Reader exploits, the occasional IE exploit, and the rare Firefox exploit.
I guess, the parent of this comment meant that the "address space" of 1e128 is much smaller than that of >702e300.
I just wanted to clarify, because it made me pause and wtf for a second.
bmax - a maximum number of bits required for a decimal number is calculated by this formula: bmax = ceil(d(log(10)/log(2))) (where d - number of digits).
log(10)/log(2) = 3.3219280948873623
approximately: bmax = ceil(d3.3219)
comes to 425 bits key.
~54 bytes vs 128 bytes.
Considering it's a logarithmic measure (every bit adds x2 difficulty for cracking) and 128 bytes is rather tight... gives an idea of the weakness of this key.
That's what the cybercriminal needs to learn to distinguish :-)
Digit means base 10 numerals. It would have to be a string of 128 characters, not 128 digits.
Those points are there because they make sense. While having an up-to-date system and anti-virus software isn't a silvet bullet, it's certainly better than nothing.
Heuristics don't work against ransomware because they act like a well behaved program. Search for files, open file, overwrite file. All could be done as non-privileged user.
Ransomware is truly scary but the proper advice is: 1. Don't run untrusted software 2. Proper backups (e.g. not just a mirror) 3. Proper permissions on network drives that are mapped. Ransomware is devastating to small offices.
The problem is that there are so many cheap services out there for malware distributors to automatically "crypt" (pack) their payloads, that the chances of getting a completely fresh sample are pretty high.
AVs are also less effective against ransomware because they have to catch it before it first runs on the system, otherwise there's nothing it can do.
That being said, keep everything up to date and don't reuse passwords or use guessable ones :)
For some practical examples for why AV is risky, see also:
https://lock.cmpxchg8b.com/sophail.pdf https://lock.cmpxchg8b.com/sophailv2.pdf
Do you mind clarifying?
The classic example is of a service using a shared wallet like Coinbase does. Coinbase maintains control of the keys of every piece of Bitcoin their clients own, and they have an external database that contains a record of how much Bitcoin they are holding on behalf of their clients. This allows them to keep the vast majority of the funds offline where they are invulnerable to attack. This system means that the "from" address is likely never correlated to the sender, and they have no control of where they send "from". Relying on a client to provide this information usually ends in disaster, as does sending refunds to an address you were sent "from".
Even for the reference client Bitcoin-QT addresses are disposable and almost never linked. Change from one transaction is sent to an entirely new address which done invisibly from the users perspective. There's more information about that on the wiki, change addresses in themselves are quite confusing.
Bitcrypt works around this problem by having the victim enter the address after the transaction is sent. But this also has a problem. The victim can simply go to this page http://blockchain.info/address/1HKCHx1RFhNHuF3NxLviHdrjNFzJb... and watch for when a different victim sends a new transaction to that address. Then the first victim can claim that payment as their own.
https://blockchain.info/address/1HKCHx1RFhNHuF3NxLviHdrjNFzJ...
Just kidding! :P
Sigh. The author is using the MtGox price. Mtgox is one of the smaller Bitcoin exchanges these days. Due to their legendary incompetence, they got hacked a while back and disabled Bitcoin withdrawals. As a result, their "Bitcoin" trading price fluctuated from 1/2 to 1/6th that of other exchanges. The current market value of Bitcoin on all other exchanges is actually 400+ euros right now.
A listener to Security Now wrote in to episode 340 with this for perspective:
I took 256-bit encryption and assumed that the only way to crack it was, as we
currently believe, a brute-force attack against the 256-bit key. ... So let's
say the tricksy government has a secret algorithm that somehow allows them to
weaken the strength to one trillionth of the original. That's a good number,
one trillionth. And let's say they had a computer that can try 100 trillion
guesses per second. And let's say this computer was one cubic millimeter in
size, and let's say they build a cracking complex the size of the entire Earth
made out of these one cubic millimeter crypto cracking computers. If I did my
math right, it would still take 34 trillion years to crack.
I've double-checked the math, that's how long it takes to exhaust the 256-bit keyspace, even in an unreasonably-generous scenario. You could halve that time to get the average time it takes to find any given 256-bit key, since you won't, on average, have to search the entire key space.We trust AES 256 because, as long as the algorithm is sound, it is actually impossible to brute-force in any useful time frame, for even insane definitions of "useful". Even in some scenarios where the algorithm isn't sound, as above, it's still impossible.
The author of BitCrypt didn't use AES 256, however. They used AES 192, which is drastically weaker. According to the same calculations, it would take 0.00067 days to brute-force an AES 192 key. With a planet-sized cracking machine, impossibly fast computers, and a substantially weakened algorithm.
However, it gets better - the author of BitKeeper didn't actually choose a 256-bit key, they chose a 16-character password that was expanded into a key, and that's what we can crack to decrypt an individual BitCrypt file. In our hypothetical (yet unrealistic) scenario, this can be done in under a second.
So: brute-forcing well-implemented AES (good key, good key length) is impossible, no matter how you slice it. Brute forcing AES with a questionable key length is still impossible with anything remotely resembling the technology we'll see in our lifetimes.
Brute-forcing a file encrypted by low-quality malware is absolutely possible, as the article shows :)
(not affiliated with those guys, just a happy user)
Fail.
Not important for the article though.
For me personally, the time when people can (and do) reliably list prices in BTC (which do not float with BTC/USD exchange rate) is the time when I take Bitcoin's use as a currency seriously.