text
stringlengths
4
429
s website logs revealed a subsequent
a command & control (C&C) server, including password cap- hit from 89.148.0.41
made however to the site
s home-
ture (from over 20 applications) and recording of screenshots, page, rather than its login page
coming shortly after we had
Skype chat, file transfers, and input from the computer
s micro- infected the VM. Decrypting packet captures of the spyware
phone and webcam. activity, we found that our VM sent the password to the server
To exfiltrate data back to the C&C server, a module encrypts exactly one minute earlier:
and writes it to disk in a special folder. The spyware period-
ically probes this folder for files that match a certain naming INDEX,URL,USERNAME,PASSWORD,USERNAME FIELD,
convention, then sends them to the C&C server. It then over- PASSWORD FIELD,FILE,HTTP 1,
writes the files, renames them several times, and deletes them, http://bahrainwatch.org,bhwatch1,watchba7rain,
username,password,signons.sqlite,,
in an apparent effort to frustrate forensic analysis. Very Strong,3.5/4.x
Analysis of encryption: Because the malware employed
myriad known anti-debugging and anti-analysis techniques, it The URL provided to the server did not include the path
thwarted our attempts to attach debuggers. Since it did not in- to the login page, which was inaccessible from the home-
clude anti-VM code, we ran it in TEMU, an x86 emulator de- page. This omission reflects the fact that the Firefox password
signed for malware analysis [29]. TEMU captures instruction- database stores only domain names, not full login page URLs,
level execution traces and provides support for taint-tracking. for each password. Repeating the experiment again yielded a
We found that FinSpy encrypts data using a custom imple- hit from the same IP address within a minute. We inspected
mentation of AES-256-CBC. The 32 byte AES key and 16 byte Bahrain Watch
s logs, which showed no subsequent (or previ-
IV are generated by repeatedly reading the low-order-4-bytes of ous) activity from that address, nor any instances of the same
the Windows clock. The key and IV are encrypted using an em- User Agent string.
bedded RSA-2048 public key, and stored in the same file as the
data. The private key presumably resides on the C&C server.
The weak AES keys make decryption of the data straightfor- IP spy Campaign. In an IP spy attack, the attacker aims to
ward. We wrote a program that generally can find these keys in discover the IP address of a victim who is typically the opera-
under an hour, exploiting the fact that many of the system clock tor of a pseudonymous social media or e-mail account. The at-
readings occur within the same clock-update quantum. tacker sends the pseudonymous account a link to a webpage or
In addition, FinSpy
s AES code fails to encrypt the last block an e-mail containing an embedded remote image, using one of
of data if less than the AES block size of 128 bits, leaving trail- many freely-available services.2 When the victim clicks on the
ing plaintext. Finally, FinSpy
s wire protocol for C&C commu- link or opens the e-mail, their IP address is revealed to the at-
nication uses the same type of encryption, and thus is subject tacker.3 The attacker then discovers the victim
s identity from
to the same brute force attack on AES keys. While we suspect their ISP. In one case we identified legal documents that pro-
FinSpy
s cryptographic deficiencies reflect bugs, it is also con- vided a circumstantial link between such a spy link and a sub-
ceivable that the cryptography was deliberately weakened to sequent arrest.
facilitate one government monitoring the surveillance of oth- Figure 2 illustrates the larger ecosystem of these attacks. The
ers. attackers appear to represent a single entity, as the activity all
C&C server: The samples communicated with connects back to accounts that sent links shortened using a par-
77.69.140.194, which belongs to a subscriber of ticular user account al9mood4 on the bit.ly URL shortening
Batelco, Bahrain
s main ISP. Analyzing network traffic service.
between our infected VM and the C&C server revealed that Recall Ali Faisal Al-Shufa (discussed in Section 1), who
the server used a global IPID, which allowed us to infer server was accused of sending insulting tweets from an account
activity by its progression. 2 e.g.,
iplogger.org, ip-spy.com, ReadNotify.com.
In response to our preliminary work an executive at Gamma 3 Several webmail providers and e-mail clients take limited steps to
told the press that Bahrain
s FinSpy server was merely a proxy automatically block loading this content, but e-mails spoofed to come
and the real server could have been anywhere, as part of a claim from a trusted sender sometimes bypass these defenses.
that the Bahrain FinSpy deployment could have been associ- 4 A Romanization of the Arabic word for
steadfastness.
4
23rd USENIX Security Symposium
USENIX Association
feb14truth.webs.com
Bit.ly user
iplogger.org Al9mood
Twitter ID
485527587 Bahrain Gov't
Jehad Abdulla Twitter ID
Salman Darwish
(Gov't critic) 987487705
Arrested
Account begins
sending IP spy links
Red Sky
(Translator) Arrested
Twitter ID
485500245
Al Kawarah News Clicked
Ali Al-Shufa
(Village media) link ReadNotify.com
Arrested
ip-spy.com
M Clicked
House raid
(Village media) link Maryam Sayed Yousif
Yokogawa Union Sami Abdulaziz Yokogawa
(Trade union) Fired from job Middle East
Legend
Actor Spyware C&C Domain name Packer Target Infection Targeted Exploit E-Mail Consequence Attacker Bait Document
Figure 2: The ecosystem of Bahrain
IP spy
attacks.
@alkawarahnews (Al Kawarah News in Figure 2). An op- revolved around Tweets that referred to Bahrain
s King as a
erator of the account forwarded us a suspicious private message
cursed one.
Red Sky had earlier targeted other users with IP
sent to the Al Kawarah News Facebook account from Red Sky. spy links shortened using the al9mood bit.ly account.