Mamba ransomware allows riders free entry to San Francisco Muni

Ransomware infects 2,000 SFMTA computers, makes Muni rides free for the weekend.

This past weekend, November 26 and 27, people traveling on the San Francisco Municipal Railway were surprised to find out that they didn’t have to pay for their rides. Everyone rode free both days. A socialist dream come true? Nope. The SF Municipal Railway, aka the Muni, lost the ability to sell tickets because it was attacked by ransomware.

Some media outlets claim that the problem manifested a few days earlier, just before Thanksgiving Day, when station ticket machines and schedule monitors started displaying a message saying “You Hacked” — as usual, ransomware announced itself with a lot of grammatical mistakes. It seems that the ransomware, called Mamba, which is a variant of HDDCryptor, knocked more than 2,000 computers belonging to the San Francisco Municipal Transport Agency (SFMTA) out of commission.

Mamba (and HDDLocker; let’s just consider them one and the same for the rest of this post) is a piece of ransomware that encrypts the whole hard drive and changes the master boot record (MBR) to prevent infected computers from loading their operating systems, displaying the malefactors’ message instead.

The creators of Mamba used open-source utilities as parts of the Trojan, and that, among other things, helped them create a strong algorithm. So there is no known way to get back files encrypted by Mamba without paying the criminals.

The Mamba perpetrators urged the SFMTA to contact them at, and using this e-mail address, a journalist from the San Francisco Examiner was able to talk to the criminals, who introduced themselves as “Andy Saolis.” As Saolis’ story went, the attack on Muni was not a targeted one; the system got infected simply because someone with admin privileges downloaded an infected torrent file.

Saolis also told the Examiner that the SFMTA had to pay them 100 bitcoins (about $73,000) to get its computers back in operation. But it seems the SFMTA was able to deal with the problem without paying ransom; later on Sunday, the ticket machines were functioning again.

Kaspersky Lab’s antimalware researchers are keeping close track of the threat actor responsible for the attack. It seems that Mamba is typically used to attack businesses and organizations: The Muni attack is not the first notch on Mamba’s belt — and actually, 100 bitcoins is a rather small sum by these criminals’ standards. Usually they demand much more.

So, Mamba seems like a really nasty threat. What can you do protect yourself and your organization from it?

1. The SFMTA was able to get Muni up and running relatively quickly because it had backups. It’s worth mentioning that these backups were not on network shares; otherwise, Mamba would’ve encrypted them as well.

The lesson here: Be like the SFMTA and back up your data regularly. Keep the backups either in the cloud or on external hard drives, not on your computer or network-attached devices.

2. Be even smarter than the SFMTA and avoid getting infected by Mamba, or any other ransomwware, at all. Instead, use a good security solution. Kaspersky Plus detects Mamba (and HDDCryptor, and others like them) as HEUR:Trojan.Win32.Generic and doesn’t give them a chance to encrypt anything.