On May 7, the city discovered that it was a victim of a ransomware attack, in which critical files are encrypted remotely until a ransom is paid.
The city immediately notified the FBI and took systems offline to keep the ransomware from spreading, but not before it took down voicemail, email, a parking fines database, and a system used to pay water bills, property taxes and vehicle citations.
Real estate transactions were frozen, too, until the city put a fix in place this week.
What was the threat?
A copy of a digital ransom note, obtained by the Baltimore Sun, stated that the city could unlock the seized files for a price: three Bitcoins (nearly US$24,000) per system or 13 Bitcoins (about US$102,000) for them all.
The price of this decentralized, hard-to-track virtual currency fluctuates wildly. On the day of the attack, the ransom would have cost about US$17,000 per system, or less than US$75,000 for them all.
"We won't talk more, all we know is MONEY!" the note said.
Baltimore has released little else about the attack, citing a continuing FBI investigation.
Who is behind the attack?
The authorities have not named any individuals or groups behind the attack, but they have identified the malicious software, or malware, behind it as "RobbinHood," a relatively new ransomware variant, according to the Baltimore Sun.
Such attacks are often carried out by Russian or Eastern European hackers, but that isn't always the case. The ransomware attack that crippled Atlanta's government for days last year has since been attributed to two men in Iran.
Was Baltimore targeted?
The city has not described how the attack was executed, but experts don't believe that hackers sought the city out.
"I think it was purely an opportunistic attack," said Lawrence Abrams, the creator and owner of Bleeping Computer, a technology news site.
The language used in the Baltimore ransom note was nearly identical to those used in other RobbinHood attacks, according to Abrams, who has spoken to various researchers about RobbinHood and seen a handful of systems infected by it.
The creator or creators of RobbinHood most likely scanned a large number of online systems for vulnerabilities to exploit, such as gaps in protocols used to grant remote access to computers, he said.
And Baltimore isn't alone.
Early April 10, officials in Greenville, North Carolina, discovered that they, too, were the victims of a RobbinHood attack. The city declined to pay the ransom and the attack remains under investigation by the FBI, Mayor P.J. Connelly said by email.
How common are ransomware attacks?
The first known ransomware attack was carried out three decades ago, according to Allan Liska, an analyst with Recorded Future, a cybersecurity firm.
In that 1989 attack, disks claiming to offer information about Aids were mailed to more than 10,000 people around the world. Each contained software designed to lock up a computer's files with instructions to mail a check to Panama so the user could receive another program to undo the damage.
But ransomware attacks have been carried out much more frequently in recent years thanks to the advent of difficult-to-track payment methods.
"The reason for the modern rise in ransomware, and frankly the wild success, is directly attributable to Bitcoin and other cryptocurrencies," Liska said.
In a recent report on ransomware targeting state and local governments, Liska traced the current era back to 2013, when the police department in Swansea, Massachusetts, was infected by malware known as CryptoLocker.
There have been at least 169 incidents of state and local governments falling prey to ransomware since that year, though Liska said that estimate was probably low because governments don't always publicise such attacks.
"That's really only the tip of the iceberg," he said. "There's really probably a lot more that are never reported on."
About 70 per cent of state and local governments refused to pay a ransom, while 17 per cent did, he said. The outcome could not be determined in the remaining cases.
Should Baltimore pay?
The encryption used by ransomware can often be difficult to crack, but Liska nonetheless advised against paying the ransom.
"That money is going to help make the bad guy's job easier," he said, noting that the perpetrator might use the proceeds to pay for better, more effective attacks.
There's also no guarantee that hackers will hold up their end of the bargain if a victim pays. That said, the hackers might release the files if only to show future victims that it's worth paying, Liska said.
In the case of the RobbinHood attack, for example, the creator or creators offered to decrypt up to three files at no cost, to show "we are honest," according to a screenshot Abrams shared of the ransom payment page.
The hackers even included a privacy statement.
"I want to mention that your privacy is important for us, all of your records including IP address and Encryption keys will be wiped out after your payment," it read.
Written by: Niraj Chokshi
Photograph by: Gabriella Demczuk
© 2019 THE NEW YORK TIMES