Pegasus: nothing to hide? (1)
It was Sunday evening and I was sitting in front of my computer looking for "nerd" T-shirts. It's really hot these days in perfidious Albion. As I was about to note down the prices - always always too expensive, damn it - a notification arrived from the Guardian. But this time it wasn't about blond Boris looking for inappropriate things to do at the inappropriate moment, but about something else. The title of the article referred to something called Pegasus. But where had I already read that name?
Pegasus
That's where I'd read it. It was back in 2015 and Wikileaks was publishing one of its most famous leaks. It was called SpyFiles and contained more than a million emails from the Italian group HackingTeam which, back in 2013, was discussing this tool sold by NSO and called, precisely, Pegasus (here)
Pegasus is made by NSO, an Israeli company. I'm not sure, but it seems that at the moment it only works on Blackberry (it has a very powerful propagation system) and it has a high price.
According to the analyses carried out by the company Lookout in 2015, this tool was able to install itself without any interaction from the user, perhaps through a push notification, to interact with the device and to leave no trace of its existence. Technically, a program called in the jargon an "agent" is planted on the device, and at the same time it scans, extracts and transmits the data from the attacked to the attacker. But that 2015 gave us another extraordinary thing: a user manual describing how it works. Reading it, for the way it was structured, for the way it interacts, for the way it works as a whole and in its (apparent) simplicity, leaves you literally speechless. First of all it explicitly presents itself as a "cyber intelligence solution to extract any kind of information from a mobile device". In NSO's words the tool was developed by "veterans of the intelligence services to give governments a new way to intercept communications, in a world where the challenge is played out dynamically on cyber battlefields". Roughly speaking, let's see what it can do:
- remote access to information such as contacts, phone calls, passwords etc
- the ability to intercept voip calls - skype viber whatsapp etc... - in real time
- the ability to bypass SSL encryption
- the ability to track the gps position in real time
- self-destruction in case of risk of exposure
There are several layers the system operates on. The first, and perhaps the fundamental one, is the target, where the agent operates, storing data and transmitting it. The second is made up of a WAN - wide area network - with a node inside it that anonymises the traffic. The third is of course the customer, who remotely controls, monitors, commands, searches and manages the information.
Since the system also produces a boundless amount of data, the customer is required to install dedicated hardware, with a cabinet made up like this: 10T of storage, 5 servers, 1 web server 3 switches, 1 backup system, 1 router and, bless them, 1 UPS system to prevent power cuts. Once all this IT architecture is installed, for active monitoring a graphical interface is provided for searching keywords, listening to calls, geolocation and much more. I've decided, they've convinced me: tomorrow I'm buying one. Who knows if they sell it on ebay...
Lookout's analyses
In the report and in the conference held at BlackHat in London in 2016, Lookout explains some interesting things. Pegasus is not the only application and NSO is not the only company capable of doing this kind of thing. Companies like FinFisher or the very Italian HackingTeam have very similar products and aims. Pegasus however, unlike the others, reaches a much higher level of sophistication. The reason it is considered the best spyware around is its ability to attack the kernel silently and to act instantly on the most commonly used installed applications. Over the years many patches have been applied by Android, IOS and by applications like WhatsApp or Skype.
Pegasus, in short, works like this:
- stage1: A hidden javascript code analyses the whole content of the device and launches an rce - remotely executed command. It is in essence an exploit that is normally based on the vulnerabilities of the operating system and kernel you are using
- stage2: Once the system has been acquired, the pegasus code is actually installed. The modification of the internal code of the device and of its applications begins immediately
- stage3: The applications just modified start doing their job and transmit the information to the source. The device is definitively compromised.
What we know about NSO
Citizenlab, a non-profit association made up of journalists and researchers based in Toronto, has been dealing with cybersecurity issues for years. One of the topics it has covered most assiduously over time has been precisely this notorious NSO, and its involvement in more or less lawful operations that brought it into the news. One of the best-known scandals concerns the famous WhatsApp exploit that made it possible, without any "manual" interaction from the user, to infect the target with a simple push notification, a message, or even an unanswered call. The vulnerability CVE-2019-3568 was later "patched" by WhatsApp with an update, but this doesn't mean a similar situation can't happen again.
NSO is a company founded by some cybersecurity experts, with its headquarters in Israel, which specifically produces "best-in-class technology" - high-level technology - to help government agencies prevent and fight crime and terrorism. That's in the intentions, though. The reality instead is that their business is based, like all companies after all, on whoever decides to buy their services and products. Business is business after all, if it weren't that here we are talking, potentially, about the life and privacy of private citizens. Their position has been clear for some time. In an exchange of emails between CitizenLab and NSO we learn the following:
- they claim not to do politics
- they claim to take respect for human rights seriously
- they claim to supply products only to "verified" agencies
- they claim not to have access to their customers' data
If Pinocchio had wings, he would surely be an F-35
The ForbiddenStories scoop
In recent years the journalistic consortium ForbiddenStories, born a few months after the Charlie Hebdo massacre, came into possession of unique material. A leak, perhaps the most important of the year. More than 50,000 phone numbers monitored and spied on through Pegasus for more than 3 years. The amount of data was immense and the work to be done probably inestimable. So ForbiddenStories decides to involve other journalists and other groups to analyse the data, so as to have granular control over the information extracted. That is how the Pegasus Project is born, a journalistic project in which more than 80 reporters and 17 associations scattered around the world take part.
In this extraordinary project, Amnesty International takes care of doing the most important and perhaps most difficult thing of all: the forensic analysis, explaining in detail the technique used. The proof of proofs in short, so as not to allow anyone to say "you got it wrong" or "you are amateurs". So it turns out that the assertion "Pegasus leaves no trace of its presence" is partially false. Not only does it leave traces, but with a detailed analysis you can see how, what, and in what way it operated to modify, receive and send data from the attacked target. Amnesty also provides a toolkit called MVT, released on Github under the Mozilla Public License, which makes it possible to do a forensic analysis directly on your own Android smartphone. And if that weren't enough, it provides a list of domains and links compromised by NSO, again on GitHub, again publicly available.
Snowden's opinion on NSO
In an interview given to the Guardian, Edward Snowden lets himself go with some statements that really make you think:
Their only products are infection vectors. They're not security products. They're not providing any kind of protection, any kind of prophylactic. They don't make vaccines – the only thing they sell is the virus.
What we know so far
Compared with the number of phones intercepted, compared with the governments involved so far, the information leaked is really just a few drops in an ocean. The model of ForbiddenStories and of the network that makes up the Pegasus Project is different from the one Wikileaks adopted. For now in fact they have decided to release only a little information, well documented, keeping aside the sensitive data of the targets involved. A much more journalistic approach, much more careful about the privacy of those who have already seen their privacy violated. What we know for sure is that:
- The phones of relatives and of some friends of the journalist Jamal Khashoggi were infected by Pegasus a few days before his murder. The government of Saudi Arabia seems to be involved in the scandal.
- The phone of princess Haya, ex-wife of the emir of Dubai, was infected by Pegasus for years and monitored even after her move to London. The government of the United Arab Emirates seems to be involved.
- The phone of the founder of Telegram, an end-to-end encrypted application similar to WhatsApp, Pavel Durov, was kept under control by Pegasus. It is not clear who ordered the monitoring.
- In the list, the name of the French president Emmanuel Macron comes up, that of the former president of the European Union Romano Prodi and that of other international politicians.
And then, perhaps the thing that really frightens those who work in news:
- almost 200 journalists around the world were tracked by the NSO tool
- here an initial list confirmed by Forbidden Stories
The upcoming live stream
On Tuesday 27 July 2021 at 20:00 BST, the consortium has organised a live stream where Paul Lewis and Stephanie Kirchgaessner of the Guardian and Agnès Callamard, secretary general of Amnesty International, will talk about the leak received and the information contained in it. It will be very interesting to take part in the conference (even if remotely), and to understand...