Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
4 décembre 2010 6 04 /12 /décembre /2010 16:27

 

Voilà un petit article que j'ai rédigé pour SecurityVibes. Je me suis dis que finalement je pourrais en faire profiter un plus grand nombre de personnes. En espérant que ça plaise.

 

L'histoire ci-dessous remontée par Wired il y a déjà quasiment un an permet de rappeler certaines bases en matière de sécurité informatique. On s'aperçoit assez rapidement que toutes les mauvaises pratiques fréquemment rencontrées en société et souvent jugées comme mineures peuvent être à l'origine de problèmes très importants.

 

Loin de moi l'idée de pointer du doigt une société en particulier. Ce qui m'intéresse ici, c'est vraiment la succession de petits travers, de manque de bon sens, de manque de gestion qui a conduit à l'exploitation de failles assez importantes. Pour moi ce qui est arrivé peut arriver dans toute société. D'ailleurs, si Wal-Mart devait être cité, c'est pour avoir autorisé (enfin je l'espère) la diffusion de cet article qui détaille de manière très approfondie l'enchainement des faits qui ont conduit a cette compromission.

 

Les erreurs communes que l'on constate, et tente de combattre en tant que profesionnels de la sécurité, sont quasiment toutes listées dans cet article. J'ai décidé de recopier l'article en y insérant mes commentaires. J'espère que cela vous donnera quelques arguments pour défendre vos positions sécurité vis-à-vis des décideurs ou pour sensibiliser un auditoire.

 

http://www.wired.com/threatlevel/2009/10/walmart-hack/

 

Big-Box Breach: The Inside Story of Wal-Mart’s Hacker Attack

By Kim Zetter October 13, 2009 | 7:00 am | Categories: Breaches, Crime, Cybersecurity

 

Wal-Mart was the victim of a serious security breach in 2005 and 2006 in which hackers targeted the development team in charge of the chain’s point-of-sale system and siphoned source code and other sensitive data to a computer in Eastern Europe, Wired.com has learned.

 

1/ Ne jamais céder aux desiderata d'une frange de la population

ex: Les développeurs sont au coeur de l'activité, il faut absolument les laisser travailler sans contraintes:

  • Droits d'admin sur les postes

  • Aucun filtrage firewall entre les postes et les serveurs de développement

=> Dans le cas de Wal Mart, ce sont justement les développeurs qui ont été la cible d'attaques!

 

2/ Ne jamais sous-estimer les attaques externes

ex :80% des attaques viennent de l'intérieur.

=> Dans le cas de Wal Mart, ce sont les accès distants qui ont été la cible d'attaques!

 

Internal documents reveal for the first time that the nation’s largest retailer was among the earliest targets of a wave of cyberattacks that went after the bank-card processing systems of brick-and-mortar stores around the United States beginning in 2005. The details of the breach, and the company’s challenges in reconstructing what happened, shed new light on the vulnerable state of retail security at the time, despite card-processing security standards that had been in place since 2001.

 

3/ Ne jamais sur-estimer les mécanismes de conformité

ex : La compliance permet d'assurer la sécurité

=> Dans le cas de Wal Mart, des standards de sécurité étaient en place dès 2001, l'attaque s'est déroulée en 2005 et 2006. La certification ne garantie pas la sécurité. Il faut bien différencier Conformité et Sécurité. La première autorise la société à faire son métier, la seconde lui permet de le conserver. Le document du clusif de novembre 2009 sur PCI-DSS rappelle bien la différence entre les deux notions (PCI-DSS : une présentation).

 

In response to inquiries from Wired.com, the company acknowledged the hack attack, which it calls an “internal issue.” Because no sensitive customer data was stolen, Wal-Mart had no obligation to disclose the breach publicly.

 

Wal-Mart had a number of security vulnerabilities at the time of the attack, according to internal security assessments seen by Wired.com, and acknowledged as genuine by Wal-Mart. For example, at least four years’ worth of customer purchasing data, including names, card numbers and expiration dates, were housed on company networks in unencrypted form. Wal-Mart says it was in the process of dramatically improving the security of its transaction data, and in 2006 began encrypting the credit card numbers and other customer information, and making other important security changes.

 

“Wal-Mart … really made every effort to segregate the data, to make separate networks, to encrypt it fully from start to finish through the transmission, ” says Wal-Mart’s Chief Privacy Officer Zoe Strickland. “And not just in one area but across the different uses of credit card systems.”

 

Wal-Mart uncovered the breach in November 2006, after a fortuitous server crash led administrators to a password-cracking tool that had been surreptitiously installed on one of its servers. Wal-Mart’s initial probe traced the intrusion to a compromised VPN account, and from there to a computer in Minsk, Belarus.

 

4/ Ne jamais sous-estimer les incidents de production, même basiques. Un serveur qui plante seul, ce n'est pas normal.

ex: Le serveur crashe, priorité au service, redémarrage sans analyse

=> Dans le cas de Wal Mart, c'est justement l'analyse post-crash qui a permis de remonter à la source du problème.

 

5/ Ne jamais laisser les logs sans analyse. Logguer pour logguer, cela ne sert à rien.

ex: C'est bon, tout est loggué.

=> Dans le cas de Wal Mart, c'est justement l'analyse des logs qui a permis de remonter à la source du problème.

 

6/ Ne jamais sous-estimer les accès distants

ex: C'est un compte de tests, on peut laisser ouvert

ex : Personne ne peut savoir que nous avons une connexion distante, nous ne publions pas d'adresse DNS pour l'adresse IP du VPN

=> Dans le cas de Wal Mart, c'est justement l'exploitation d'un compte VPN sans authentification forte qui est à l'origine de l'attaque.

 

The discovery set off an investigation that swept in outside security consultants and corporate attorneys to determine what the hackers had touched, and whether the company was required to report the intrusion, and to whom, the documents show. Wal-Mart says it notified federal law enforcement agents, who were working on other ongoing investigations involving similar breaches.

 

At the time, attacks featuring a similar MO were occurring at TJX, Dave & Buster’s restaurants and other companies, which ultimately resulted in more than 100 million cards being compromised. Albert Gonzalez, a 28-year-old Miami man, pleaded guilty this month to carrying out many of those breaches with other hackers, and is facing unresolved charges for the remainders.

 

7/ Ne jamais cacher les compromissions des systèmes au public ou à ses partenaires

ex: Si on ne dit rien, personne n'en saura rien et l'impact sera limité

=> Dans le cas de Wal Mart, une discussion avec les partenaires aurait pu permettre de réagir plus vite.

 

The Wal-Mart intrusion began unraveling on Nov. 5, 2006, when the company’s IT security group was brought in to investigate the server crash.

 

Wal-Mart has thousands of servers nationwide, and any one of them crashing would ordinarily be a routine event. But this one raised a red flag. Someone had installed L0phtcrack, a password-cracking tool, onto the system, which crashed the server when the intruder tried to launch the program.

 

8/ Ne jamais s'arrêter à surveiller uniquement les fichiers systèmes

ex: Tant que le C:\Winnt\System32 n'est pas modifié, pas de problèmes

Configurer les programmes de contrôle d'intégrité et de téléinventaire pour détecter les programmes classiques d'attaques (password cracking tools) selon les machinespeut s'avérer fructueux.

=> Dans le cas de Wal Mart, une inspection de présence de Lophtcrack aurait permis de réagir plus vite.

 

Investigators found that the tool had been installed remotely by someone using a generic network administrator account. The intruder had reached the machine through a VPN account assigned to a former Wal-Mart worker in Canada, which administrators had failed to close after the worker left the company. The day the server crashed, the intruder had been connected to Wal-Mart’s network for about seven hours, originating from an IP address in Minsk, the documents show.

 

9/ Ne jamais avoir de comptes génériques si les logs et l'activité de ces comptes n'est pas monitorée et analysée en détails

ex: Les comptes systèmes d'administration génériques c'est plus simple

=> Dans le cas de Wal Mart, c'est justement un compte générique qui est à l'origine de l'attaque

 

10/ Ne jamais remettre à plus tard la suppression de comptes

ex: On supprimera le compte plus tard, personne ne l'utilise.

=> Dans le cas de Wal Mart, c'est justement un compte inactif, appartenant à un ancien employé, qui est à l'origine de l'attaque

 

11/ Ne jamais croire que les procédures de gestion de comptes sont connues et appliquées

ex: Notre filiale gère forcément bien ses comptes, ça paraît évident

Et bien non, mieux vaut avoir des procédures écrites exactes et appliquées partout.

=> Dans le cas de Wal Mart, c'est justement un compte au Canada dans une filiale qui est à l'origine de l'attaque

 

The security team disabled the compromised VPN account, but the intruder, who should have realized the jig was up, came back in through another account belonging to a different Canadian employee. When that VPN account was closed, the intruder grabbed yet a third account while Wal-Mart workers were still scrambling to get a fix on the scope of the breach.

 

When Wal-Mart reviewed its VPN logs, it found that the activity had begun at least as early as June 2005, according to memos written by Wal-Mart employees during the initial stage of the investigation. The company’s server logs recorded only unsuccessful log-in attempts, not successful ones, frustrating a detailed analysis.

 

12/ Ne jamais logguer sans politique de filtrage des logs

ex: C'est bon, on loggue tout et on verra en cas de problèmes.

Il faut filtrer les logs intelligements, avoir une réelle politique de log avec une réflexion poussée sur ce qui doit être loggué ou non, sur ce qui doit être analysé ou non et comment.

=> Dans le cas de Wal Mart, c'est justement l'absence de logs pertinents qui a ralenti la progression de lanalyse

 

Wal-Mart declined to respond to questions about the initial date of the attack, the server logging or the conclusions it reached in its final report, which Wired.com has not seen.

 

Nonetheless, Wal-Mart’s security team was able to identify “over 800 machines that the attacker either tried to brute force or actually made a successful connection,” according to a Nov. 10, 2006 e-mail summarizing the early investigation.

 

13/ Ne jamais attendre avant de réagir

ex: On respecte le process à la lettre, on attendra la 3ème relance sans réponse avant d'escalader

=> Dans le cas de Wal Mart, plus d'un an s'est passé entre la première attaque et la découverte des activités malicieuses.

 

Many computers the hackers targeted belonged to company programmers, the documents show. Wal-Mart at the time produced some of its own software, because the company couldn’t find off-the-shelf applications that scaled to its size, according to a source who was involved with the investigation. One team of programmers was tasked with coding the company’s point-of-sale system for processing credit and debit card transactions. This was the team the intruders targeted.

 

14/ Ne jamais négliger une population

ex: Les développeurs, il faut les laisser tranquilles pour développer.

=> Dans le cas de Wal Mart, ce sont justement les développeurs qui ont été la cible d'attaques!

 

“They weren’t port scanning, they weren’t ping tracing, they weren’t groping blindly in the dark trying to find a nugget,” says the investigator. “They knew what they were going for and they were all over it — point-of-sale.”

 

15/ Ne jamais croire aux schémas d'attaque établis

ex: Il y a toujours une phase de reconnaissance du réseau

=> Dans le cas de Wal Mart, les attaquants savaient exactement ce qu'ils voulaient, aucune des attaques classiques n'a été mise en oeuvre.

 

The intruders’ interest in Wal-Mart’s point-of-sale system is consistent with large data breaches that occurred at other companies around the same time. In the spring of 2005, associates of TJX hacker Albert Gonzales hacked into the point-of-sale system of a Marshall’s clothing store in Minnesota. The hackers pointed an antenna at the store to grab data as it streamed over the store’s vulnerable Wi-Fi network, then used the data to gain access to the central transaction database of TJX, Marshall’s parent company.

 

16/ Ne jamais sous-estimer les attaques Wi-Fi

ex: C'est bon, notre réseau Wi-Fi est globalement bien isolé du réseau de production et il y a peu de chances qu'un employé ait installé un réseau pirate

=> Dans le cas de TJX, à la même époque, ce sont des problèmes de Wi-Fi qui ont été exploités.

 

Similarly, in mid-2007, Gonzalez’s gang gained access to point-of-sale servers at Dave & Buster’s restaurants and installed packet sniffers to siphon card data as it was transmitted to corporate computers and others for authorization. According to court documents, the hackers’ MO included doing reconnaissance of retailers to determine the point-of-sale systems they used and map their network setups. (There’s no evidence Wired.com has seen linking Gonzalez to the Wal-Mart breach.)

 

In the case of Wal-Mart, one of the documents that flew off to Minsk from a programmer’s machine was titled “POS Store Systems Technical Specifications TLOG Encryption and Financial Flows Draft 03/04/2006″ – essentially a flow chart that would have mapped out Wal-Mart’s transaction process, the source says, from the moment a customer swipes his credit or debit card in a store’s card reader, to the point the digital data crosses the network to be authenticated by a card issuer.

 

17/ Ne jamais sous-estimer la classification des documentations (emplacement, droits d'accès, nommage, etc.)

ex: C'est bon, chacun sait que ce document ne doit pas être publié, pas besoin de le classifier et de le rendre inaccessible aux personnes non autorisées.

=> Dans le cas de Wal Mart, une bonne classification, une nomenclature adéquate et un stockage dans un endroit préservé auraient peut-être permis de ne pas transmettre le document ou de rendre l'identification de son contenu plus complexe.

 

The hackers also stole or accessed files containing point-of-sale source code and executables, as well as additional proprietary documentation detailing the company’s transaction processing network. A partial list seen by Wired.com includes documentation on a company database, a file connected to a point-of-sale simulator, debugging files, a telnet capture, a bash history file and a sign-on log.

 

18/ Ne jamais négliger une population, toujours surveiller ses codes sources

ex: Les développeurs gèrent leur code source, ce n'est pas nécessaire de rajouter une couhce de protection.

=> Dans le cas de Wal Mart, ce sont justement des codes source qui ont été volés.

 

The documents show no evidence that files containing customer information were breached in the attack.

 

At the time Wal-Mart discovered the breach, it had been encrypting its transaction data for at least three months. It began to do so after a security audit performed for the company in December 2005 found that customer data was poorly protected.

 

19/ Ne pas attendre les recommandations d'audit avant d'agir avec bon sens

ex: Tant que l'on ne nous demande pas de chiffrer, on ne va pas le faire

=> Dans le cas de Wal Mart, il a fallu attendre un audit pour que les données soient chiffrées

 

Wal-Mart commissioned the probe from security auditors at CyberTrust as part of its efforts to become compliant with Payment Card Industry (PCI) security standards that were established in 2001. Enforced by credit card issuer Visa, top-tier companies such as Wal-Mart were theoretically required to be in compliance with the standards by mid-2004. Wal-Mart says it received a number of deadline extensions.

 

20/ Ne pas considérer que l'on aura des délais pour appliquer les correctifs !

ex: C'est bon, on peut rester en l'état, on aura un délai supplémentaire

Compliance n'est pas securité, les sybercriminels ne fournissent pas d'extensions eux!

=> Dans le cas de Wal Mart, les multiples reports ont nui à la bonne application des recommandations.

 

CyberTrust examined networks at five Wal-Mart locations: three Wal-Mart stores in Missouri and Oklahoma, and two other Wal-Mart-owned businesses — a Sam’s Club store in Missouri and a Neighborhood Market in Arkansas, according to a report the auditors wrote.

 

The assessment lasted six days, during which CyberTrust found numerous problems. Each of the five stores, for example, housed complete backup copies of transaction logs on network-connected UNIX servers, which included at least four years’ worth of unencrypted credit card numbers, cardholder names and expiration dates from purchases at the stores.

 

21/ Ne pas croire que les recommandations d'audit s'appliquent uniquement aux nouvelles données

ex: Depuis janvier, on est en ligne avec ce qui a été demandé. On est donc bien.

Il faut aussi penser à purger les anciennes situation d'avant janvier.

=> Dans le cas de Wal Mart, les anciennes données étaient toujours accessibles en clair.

 

The auditors also discovered that servers, transaction processing systems, and other network-connected devices handling sensitive information used the same usernames and passwords across every Wal-Mart store nationwide. In some cases, the passwords could be easily guessed. A hacker or malicious insider who compromised a point-of-sale controller or in-store card processor at one store, could “access the same device at every Wal-Mart store nationwide,” CyberTrust wrote.

 

22/ Ne pas uniformiser les procédures sans sécurisation préalable des échanges

ex: On a le même couple user/password sur tous les routeurs, en cas de problème, c'est plus simple à dépanner.

=> Dans le cas de Wal Mart, un accès avec authentification centralisée et chiffrement des communications auraient éviter cela.

 

Finally, CyberTrust found sensitive customer information stored unencrypted on pharmacy computers at four of the stores, including customer names, home addresses, Social Security numbers, genders, credit card numbers and expiration dates. “A long-term, undetected compromise of Wal-Mart RXP system could allow a virtually endless supply of customers’ names, addresses, and Social Security numbers – the basic ingredients for identity theft,” CyberTrust wrote in its report. “Wal-Mart runs the risk of … losing not only the sensitive information, but also their customers’ hard earned trust,” the auditors added.

 

23/ Ne jamais sous-estimer les conclusions d'un audit

ex: Le scénario catastrophe décrit ne nous arrivera jamais!

=> Dans le cas de Wal Mart, certes le pire n'est pas arrivé, mais cela aurait pu se produire.

 

The report was dated Jan. 9, 2006, 10 months before Wal-Mart discovered the breach.

 

24/ Ne jamais se donner de délai trop long pour appliquer les recommandations d'audit !

ex: On va monter un plan d'actions et agir sur 2 ans.

=> Dans le cas de Wal Mart, 10 mois se sont écoulés entre le rapport d'audit et la découverte de la faille. Tout était connu et rien n'a été fait en 10 mois!

 

Strickland says the company took the report to heart and “put a massive amount of energy and expertise” into addressing the risks to customer data, and became certified as PCI-compliant in August 2006 by VeriSign.

 

After it discovered the breach in November 2006, the company turned over memory dumps and at least 31 forensic images of machines and servers to Stroz Friedberg, a forensic investigations firm, for further analyses. E-mails exchanged by team members eight days after the intrusion was detected show the company furiously searching firewall and intrusion detection logs for suspicious activity. The e-mails also discuss shutting down the entire Nortel VPN network the intruder used, ordering RSA security tokens to authenticate users to the network, and increasing logging retention on servers.

 

25/ Ne jamais sur-estimer les mécanismes de conformité (bis)

ex : La compliance permet d'assurer la sécurité

=> Dans le cas de Wal Mart, la certification PCI-DSS a été obtenue en août, en novembre la compromission a été découverte.

 

On Nov. 16, one team member sent an unencrypted e-mail update to other employees and was harshly rebuked by a senior security manager who warned them to communicate only through e/pop, a secure instant messaging system.

 

“Guys…. time out here,” he wrote. “What was the first thing I discussed in our meeting about communications protocol concerning this project? Get Epop up, installed, and running today!”

 

26/ Ne jamais croire que la communication est bien passée !

ex: C'est bon, ils ont compris, on ne répète pas

=> Dans le cas de Wal Mart, bien que des consignes pour utiliser des communications chiffrées aient été passées, certains utilisateurs n'ont pas respecté la consigne.

 

The company’s internal investigators found evidence potentially linking the attack to a suspected breach at a Wal-Mart division a year earlier. The forensic trail showed that the machine in Belarus that breached Wal-Mart’s VPN had tried to log on to a machine belonging to Sam’s Club, Wal-Mart’s membership store chain, in 2005.

 

27/ Ne jamais sous-estimer les compromissions pouvant venir de partenaires

ex: C'est au partenaire de gérer sa sécurité, on ne peut que lui faire signer des documents nous assurant de sa sécurité.

=> Dans le cas de Wal Mart, c'est une filiale qui a permis de rentrer dans le système d”informations. Il est possible de rajouter des mécanismes de sécurité sur les accès aux réseaux partenaires.

 

This finding was potentially significant, because Sam’s Club had been suspected in 2005 of spilling credit card data in a breach. Late that year, MasterCard and Visa informed Wal-Mart about a cluster of fraudulent charges on credit cards that had been used at Sam’s Club gas stations. A press release issued by Sam’s Club at the time warned that intruders might have gained access to 600 cards used at the pumps between Sept. 21 and Oct. 2, 2005. But the company assured consumers that “the electronic systems and databases used inside its stores and for samsclub.com are not involved” and now says that after investigating the issue, it never found any evidence of a breach at its gas pumps or in its stores.

 

The company also says the Sam’s Club investigation and the 2006 breach are not connected.

 

“The Sam’s Club matter has been closed for some time and is not related to the other matter you’re asking about,” said Wal-Mart spokeswoman Michelle Bradford.

 

Internal documents show that Sam’s Club suffered the same types of vulnerabilities as the rest of Wal-Mart’s empire, and that logging was inadequate to completely rule out a breach. An audit by VeriSign at the time found that Sam’s Club’s firewall and intrusion-detection logs were configured to record only “spotty and inconsistent” data, and that operating systems lacked the latest security patches.

 

 

 

“The level of vulnerability identified . . . would leave these systems open to compromise from a number of different attacks,” wrote VeriSign in a report. But “due to the level of logging enabled on these systems, which did not capture much information, it was not possible to determine if any of these vulnerabilities were attacked.” In the report, which Wal-Mart submitted to the Federal Trade Commission in February 2006, nine months before it discovered the breach in its main network, VeriSign concluded that although it had found no point of compromise in the Sam’s Club system, the company’s logs didn’t contain sufficient information “to identify or rule out a specific point of compromise.”

 

28/ Ne jamais logguer sans politique de filtrage des logs (bis)

ex: C'est bon, on loggue tout et on verra en cas de problèmes.

Filtrer les logs intelligements, avoir une réelle politique de log avec une réflexion poussée sur ce qui doit être loggué ou non, sur ce qui doit être analysé ou non et comment.

=> Dans le cas de Wal Mart, c'est justement l'absence de logs pertinents qui a ralenti la progression de l'analyse

 

Wal-Mart says that the security issues raised in all of these reports have been addressed and that since the company became PCI compliant in August 2006, it has been commissioning PCI audits every six months — twice the frequency required by PCI standards.

 

“Every item [in the reports] that had a PCI vulnerability was remediated,” says Strickland.

 

PCI certification doesn’t guarantee the security of bank card data — numerous companies that experienced serious bank card breaches in recent years were certified PCI compliant at the time they were breached. There is no evidence, however, that Wal-Mart suffered a sizable breach of credit or debit card data from either Sam’s Club in 2005 or from its main network in 2006.

Partager cet article
Repost0

commentaires