Advanced persistent threat: what does the WhatsApp case teach us?

The news of the recent discovery of the presence of a powerful spyware virus within the world's most popular instant messaging application has gone around the world. The malicious software, it seems, sneaks into the victim devices through a simple anonymous phone call and has some key features: invisible, difficult to trace by the device's internal security measures and able to operate for long periods of time stealing sensitive information and data.

It's a nightmare scenario for those who have fallen victim to this attack, but what makes this breach so shocking and especially where we have already encountered the symptoms of this infection. Taking a step back we can recognize how the attack on WhatsApp comes very close to the Advanced persistent threat (APT), one of the most dangerous types of Cyberattack nowadays.

A real and silent threat

The APT is a type of long-term Cyberattack. Considered by many to be the greatest threat in cybersecurity, its findings are increasing.

Attacks of this kind are dangerous because, first, they are carried out by groups of criminal hackers sponsored - off the record - by states or industry groups in search of information and secrets, thus able to enjoy total immunity.

The assault has two fundamental characteristics: a long period of study of the target system - to identify its vulnerabilities - and a very low detectability by the security systems (do you remember something?). In order to exploit to the maximum the identified criticalities, Criminal hackers use tailor-made malware (like the Spyware that hit WhatsApp) on the target system so as to keep their detectability to a minimum.

Who carries out these activities, as mentioned, is not the small disorganized hacker who sends banal phishing emails, but real "superstars" of the hacker world. The most active groups come from Southeast Asia, in particular from Korea and China. Names like Lazarus, Group123, Reaper and LuckyMouse are the bane of banks and financial institutions, governments and corporations around the world.

The First Approach

The goal of the APT attack is simple: gain access to confidential information, install destructive code or plant hidden backdoors that allow them to enter and exit the target network at will. Se la maggior parte utilizza codici personalizzati, come detto, per portare a termine la maggior parte del lavoro, spesso il primo tentativo di ingresso avviene sfruttando vulnerabilità più comuni come CWE o Phishing email, così da non destare sospetti se individuati.

La difficoltà in fase d’individuazione è quindi una delle insidiosità più critiche dell’APT.

Riconoscere l’inizio di un attacco APT

Partendo dall’assunto che gli hacker APT utilizzano tecniche diverse dalle loro controparti più "mondane", è anche vero lasciano dietro anche "tracce" diverse. Usando le case history di svariati APT provenienti da attori differenti è stato possibile isolare alcuni segnali che potrebbero suggerire l’inizio di una campagna di attacco.

Un consiglio però: ognuno degli esempi elencati, presi singolarmente, potrebbero solo essere regolare attività interna. I KPI di un APT sono legati a tempi e volumi dell’attività che ci ha fatto insospettire più che alla tipologia stessa di questa.

Alcuni esempi:

  • Trojan backdoor: Gli hacker spesso infettano con dei Trojan i computer dell’ambiente bersaglio. Lo fanno per assicurarsi di poter sempre rientrare, anche se le credenziali di accesso precedentemente sottratte vengono cambiate. Una volta scoperti, gli hacker APT non se ne vanno come i normali aggressori, una delle caratteristiche che li rende particolarmente temuti. I Trojan oramai sono distribuiti attraverso metodi come il social engineering, una strada molto semplice per ottenere un primo caposaldo nell’azienda bersaglio;
  • Aumento dei log-on a tarda notte: Gli APT passano rapidamente da un computer all’altro in poche ore. Lo fanno leggendo un database di autenticazione, rubando le credenziali e riutilizzandole, imparano quali account hanno privilegi e permessi elevati, quindi passano attraverso questi account per compromettere le risorse all’interno dell’ambiente. Spesso, un alto volume di accessi elevati si verifica di notte perché gli aggressori vivono dall’altra parte del mondo. Se all’improvviso si nota un elevato volume di connessioni elevate su più server o su singoli computer di alto valore mentre il personale di lavoro legittimo è a casa, iniziare a preoccuparsi;
  • Flussi e pacchetti di informazioni inattesi: Fate attenzione nel caso in cui comincino ad apparire grandi flussi inaspettati di dati da punti di origine interna e diretti ad altri computer interni o esterni. Potrebbe trattarsi di scambi da server a server, da server a client o da rete a rete. Naturalmente, per rilevare un possibile APT, è necessario capire come si comportano i flussi interni di dati prima che il vostro ambiente sia compromesso. Iniziate subito e imparate a conoscere e riconoscere le caratteristiche dei vostri sistemi, solo così sarete in grado di accorgervi in fretta di irregolarità nei flussi. Bisogna anche fare attenzione a grandi (gigabyte, non megabyte) pezzi di dati che appaiono in luoghi dove non dovrebbero essere, specialmente se compressi in formati di archivio non utilizzati di norma dalla vostra azienda. Questo è un segnale inequivocabile di un tentativo di estrusione di dati sensibili verso l’esterno;
  • Campagne di spear phishing mirate: Senza dubbio questo è uno dei migliori indicatori di un primo tentativo di ottenere un punto d’ingresso. È stato appurato infatti che questo sia uno dei metodi preferiti dagli APT Hacker di stabilire una testa di ponte: attenzione, queste campagne hanno sovente un target fortemente mirato e non è raro che queste siano indirizzate ai quadri dell’azienda, possessori di credenziali più alte.

Specific skills are needed, not only tools

Do not misunderstand what has been said so far, even if recognized in time, if the APT attack is directed towards a complex system (think of a corporate network with a large number of devices) and it is already underway, cleaning up its systems from the intrusion can be one of the hardest tasks to perform in Cybersecurity.

It's not a hopeless scenario, however: with the right measures, even APTs can be defeated. But it's not just about technology, we need to evolve not just tactically in how we respond, but strategically as well, especially in the business world.

Cybersecurity needs to make a creative breakthrough. La difesa non può basarsi solo sull’automazione delle risposte, ma deve passare anche dalla professionalità e dall’abilità degli esperti nell’analizzare comportamenti e flussi anomali.

E non dobbiamo fermarci qui, oltre alle skill degli esperti di sicurezza che garantiscono la salvaguardia aziendale, è tempo che le lezioni derivanti dalle best practice di Cybersecurity vengano adottate da tutte le figure che operano nella società.

Approntare una solida difesa

Queste sono le misure più efficaci per prevenire gli attacchi APT:

  • Formare un network collaborativo tra i player della sicurezza: La condivisione di informazioni è uno dei punti di forza dei Criminal hacker. La stessa sinergia non è riscontrabile nel mondo delle aziende, per questo motivo c’è bisogno di un cambio di paradigma: per sconfiggere gli hacker a volte dobbiamo adottare anche le loro misure… trattenere informazioni potenzialmente cruciali per un’altra organizzazione nel lungo periodo rischia di avere effetti catastrofici su tutto il sistema economico e finire per danneggiare anche la società stessa che ha deciso non rendere pubbliche le sue scoperte;
  • Riconoscere la "kill chain": gli APT operano per step: ricognizione, creazione del malware tailor made, consegna, exploit, installazione, command&control e azione. Fortunatamente, anche se flebile, gli aggressori lasciano una scia di "briciole di pane" a ogni passo che può portare direttamente al sistema infetto e permettere di intervenire;
  • Fare attenzione ai segnali: Nessuna organizzazione può fermare ogni attacco, così il team IT ha necessità di sapere come cercare i sintomi, le "briciole". Gli APT spesso personalizzano i loro strumenti in base alle proprie esigenze e utilizzano anche una varietà di programmi comuni come applicazioni desktop remote, proxy o tunnel criptati per comunicare. L’uso insolito di queste e di altre applicazioni può essere la chiave per trovare un vero APT. Questo, naturalmente, richiede che l’IT abbia una base di riferimento molto solida di ciò che non è conforme nelle loro reti;
  • Testare periodicamente i propri sistemi: Testare, testare, testare…è uno dei metodi più utili per rilevare incongruenze e vulnerabilità del proprio sistema. In questo senso non c’è metodo migliore che affidarsi a un’azienda di Cybersecurity come Swascan per effettuare periodiche analisi.

I vantaggi di testare periodicamente

Ma quali tool e servizi sono più utili per blindare i propri network?

Penetration Test: questo esamina i punti deboli relativi ad una infrastruttura IT aziendale e, dopo averli scoperti, prova ad exploitarli in maniera sicura e controllata. Le vulnerabilità che sono oggetto d’esame da parte delle attività di Penetration Testing possono essere presenti nel software stesso in questi punti d’accesso:

  • Flaws non intenzionali nel design del codice del software;
  • Utilizzando il software in un modo per cui non è stato progettato;
  • La non corretta implementazione della gestione della configurazione del software;
  • Backdoor (porte sul retro) nel sistema operativo.

Le attività di Penetration Testing possono essere condotte sia attraverso processi automatici che manuali. Solitamente, il target di questa attività è focalizzato sui seguenti endpoint:

  • Network endpoint;
  • Dispositivi Mobile e Wireless;
  • Network Security Device;
  • Server;
  • Altre aree esposte come il codice che sta dietro alle applicazioni.

Lo scopo di un Penetration Test è quello di andare il più a fondo possibile nell’infrastruttura IT aziendale per arrivare agli asset elettronici di una azienda. L’obiettivo non è quello di colpire duramente il bersaglio al primo tentativo, ma è quelli di colpire anche più duramente nei tentativi seguenti così da esplorare tutti i possibili scenari a cui possono essere soggette le aziende.

Phishing Simulation Attack: Il phishing, di fatto, non si limita al mero invio di un’e-mail contenente link o allegati malevoli. The level of sophistication of these attacks has reached a very high level of complexity, which is only going to increase in the near future.

Phishing Simulation Attack solutions allow companies to combat this phenomenon by testing the human factor and also ensuring effective training and awareness.

The service adopts the same model as a standard attack (simulating it) allowing you to measure the level of exposure to the risk of phishing company and at the same time carries out an effective training and awareness of employees. It's an understatement to say that even the most effective cyber defense measures can be useless if people in the company continue to fall victim to these deceptions.

Network Scan: This is a specific and detailed scan that analyzes the IP of a network in order to identify its vulnerabilities and weaknesses. This tool can be used by anyone, whether it is a multinational company with hundreds and hundreds of computers or a small company with a network of only a few devices.

This procedure is very simple, it is an analysis of all public IPs that an arbitrary IP assigns to us. You will need to scan every single public IP, if possible, trying every public network address on every TCP and UDP port. It may take a while, but it is absolutely recommended to ensure maximum resilience in this area as well.

Vulnerability Assessment: a security analysis that aims to identify all potential vulnerabilities in systems and applications. How? By spotting and evaluating the potential damage that a possible "attacker" can inflict on the production unit through highly automated tools in a first phase, and then by making use of the skills of a highly qualified staff that, in a second phase, integrates and verifies the results through a meticulous manual activity. These activities are intended to refine the research by highlighting any errors made during the process.

One of the key aspects of this type of analysis is the timely isolation of real vulnerabilities. A Vulnerability Assessment tool allows the user to have an up-to-date overview of the security level of IT assets. In short, VA is the first brick to build an up-to-date Security Framework able to withstand even the most violent attacks.

Riccardo Paglia,

Swascan Team