Malspec

Famous hacks, and how they were fixed.

BreachesIncident report

The Target breach: how a contractor's login led to 40 million stolen cards

Attackers used an HVAC contractor's stolen login to put card-stealing malware on Target's checkouts; it took a call from investigators to stop them.

Illustration: a red line runs from a swiped card terminal through a store's back office to a contractor's van with a key, while a green chip card goes into a new terminal in front.

During the 2013 holiday shopping season, attackers stole the card details of about 40 million Target shoppers straight from the checkout terminals in its US stores. They got into Target's network using login details taken from a heating and air-conditioning contractor. Target's security tools raised alerts along the way, but the theft only stopped after the US Department of Justice told the company about it. Target cleaned the malware off its tills within days, and the breach went on to speed up America's switch to chip cards.

When: November to December 2013 Hit: About 40 million payment cards, and contact details of up to 70 million people Way in: Stolen login details from an outside contractor, then malware on store checkout terminals Found by: The US Department of Justice, which alerted Target Fixed by: Removing the malware, then chip-card terminals and a security overhaul Time to fix: 3 days from notice to removal; about 2 years to chip cards

What happened

Target is one of the largest retailers in the United States. Like many big companies, it gave some outside suppliers access to parts of its network, for example to send invoices or manage contracts.

Attackers stole the network login details of one of those suppliers, a heating, ventilation and air-conditioning contractor in Pennsylvania, reportedly through malware sent to the contractor by email. With those details they got into Target's network in November 2013. From there they moved on to the systems that run checkout, and installed malware on the point-of-sale terminals in Target's US stores.

Between 27 November and 15 December 2013, the busiest shopping weeks of the year, the malware copied card data from about 40 million credit and debit cards as they were swiped. The attackers also took names, addresses, phone numbers and email addresses for up to 70 million customers. Target announced the breach on 19 December 2013.

How it worked

Card terminals of the time read the card's magnetic stripe, which holds the card number and other details needed to make a copy of the card. The data is encrypted on its way to the bank, but for a moment it sits unencrypted in the terminal's memory while being processed.

The malware read the terminal's memory and picked out card data in that moment, a technique called memory scraping. It stored what it found, then sent it to other machines inside Target's network, which passed it out to servers the attackers controlled.

Two weaknesses made this possible. The contractor's access was a way into the same network that held far more sensitive systems, and nothing stopped the attackers from moving from one to the other. And magnetic-stripe cards were easy to copy, so stolen data was immediately valuable: it went up for sale on criminal card shops within days.

How it was discovered

Target's own systems did see something. According to a 2014 report by the US Senate Committee on Commerce, Science and Transportation, the company's security software raised alerts as the malware was installed and as data began to leave. Its security team monitoring the alerts flagged them, but the warnings were not acted on in time to stop the theft.

The breach was confirmed from outside. Banks and card networks track fraud on stolen cards and work back to the place where those cards were all used, a pattern called common point of purchase. On 12 December 2013 the US Department of Justice notified Target that card data appeared to have been stolen from its stores.

Target brought in outside forensic investigators, found the malware on its terminals and removed most of it by 15 December. On 18 December the security journalist Brian Krebs reported the breach, citing sources at banks, and Target confirmed it the next day.

The timeline

2013-11-12 · Attackers first get into Target's network

Using the contractor's stolen login details, they begin moving toward the checkout systems.

2013-11-27 · Card theft begins at checkouts

The malware starts collecting card data from store terminals on the day before Thanksgiving.

2013-12-12 · The Department of Justice notifies Target

Investigators following fraud on stolen cards trace it back to Target's stores.

2013-12-15 · Target removes the malware from its terminals

With forensic investigators, Target cleans its checkout systems and the theft stops.

How it was fixed

The immediate fix was removing the malware from thousands of checkout terminals and closing the paths the attackers had used. Target then told customers, offered a year of free credit monitoring and covered fraudulent charges.

The longer fix changed the cards themselves. In 2014 Target sped up its plans to accept chip cards, also known as EMV, which create a one-time code for each payment so that copied data cannot be reused to make a working card. It rolled out chip-ready terminals across its stores and moved its own store cards to chip-and-PIN in 2015.

Inside the company, Target hired its first chief information security officer, reorganised its security team and separated its networks more strictly. Its chief information officer and its chief executive both left in 2014. In 2017 Target agreed to pay $18.5 million to settle with 47 states and the District of Columbia, and to follow a list of security requirements.

What changed after

Target became the case that made boards ask about security. The breach showed that a company's risk includes its suppliers, and that alerts only help if someone acts on them.

It also added urgency to the US move to chip cards. Card networks had already set October 2015 as the date when liability for fraud would shift to merchants that had not upgraded, and after Target and other retail breaches, many retailers hurried to meet it. Fraud from copied cards in stores fell as chip cards spread, pushing criminals toward online fraud instead.

Lessons that still apply

  • Give suppliers only what they need. A contractor's login should lead to that contractor's systems, not to the network that runs the tills.
  • Act on alerts. Target's tools saw the attack. A clear process for who investigates a warning, and how fast, matters as much as the tool.
  • Separate your networks. Systems that handle card data or other sensitive information belong in their own zone, reachable only by what needs them.
  • Use chip or contactless payments. For shoppers, tapping or inserting a card is much safer than swiping, because the data can't be reused.

Sources

The fix → Malware gone in three days, and a country's cards switched to chips within two years.

Share this