OceanLotus: New watering hole attack in Southeast Asia

ESET researchers identified 21 distinct websites that had been compromised including some particularly notable government and media sites

ESET researchers identified 21 distinct websites that had been compromised including some particularly notable government and media sites

ESET researchers have discovered a new watering hole campaign targeting several websites in Southeast Asia, and that is believed to have been active since September 2018. This campaign stands out because of its large scale, as we were able to identify 21 compromised websites, some of which are particularly notable. Among the compromised websites were the Ministry of Defense of Cambodia, the Ministry of Foreign Affairs and International Cooperation of Cambodia and several Vietnamese newspaper or blog websites.

After thorough analysis, we are highly confident that this campaign is run by the OceanLotus group [1], also known as APT32 [2] and APT-C-00. OceanLotus is an espionage group active since at least 2012 [3], mainly interested in foreign governments and dissidents.

This campaign is believed to be an evolution of what Volexity researchers called OceanLotus Framework B, a watering hole scheme they documented in 2017 [4]. However, the attackers have stepped up their game to complicate and slow down analysis of their malicious framework. Among the various improvements, they started using public key cryptography to exchange an AES session key, used to encrypt further communications, thus preventing security products from intercepting the final payload. They also switched from HTTP to WebSocket to hide their malicious communications.

ESET researchers identified 21 distinct websites that had been compromised, each redirecting to a separate domain controlled by the attackers.

Figure 1 shows the region targeted by this campaign.

Figure 1 – Location of the compromised websites

Most of the compromised domains are related to news media or the Cambodian government. The following table details the different victims. We notified all of them in October but most are still serving malicious script injections at the time of writing, two months after the first compromise. Thus, we encourage you not to visit these websites.

Compromised domainDescription
baotgm[.]netMedia in Vietnamese (based in Arlington, Texas)
cnrp7[.]orgCambodia National Rescue Party
conggiaovietnam[.]netRelated to Religion – In Vietnamese
daichungvienvinhthanh[.]comRelated to Religion – In Vietnamese
danchimviet[.]infoMedia in Vietnamese
danviet[.]vnMedia in Vietnamese
danviethouston[.]comMedia in Vietnamese
fvpoc[.]orgFormer Vietnamese Prisoners of Conscience
gardencityclub[.]comGolf club in Phnom Penh, Kingdom of Cambodia
lienketqnhn[.]orgMedia in Vietnamese
mfaic.gov[.]khMinistry of Foreign Affairs and International Cooperation of Cambodia
mod.gov[.]khMinistry of Defense of Cambodia
mtgvinh[.]netRelated to Religion – In Vietnamese
nguoitieudung.com[.]vnMedia in Vietnamese
phnompenhpost[.]comCambodian newspaper in English
raovatcalitoday[.]comUnknown – In Vietnamese
thongtinchongphandong[.]comOpposition media in Vietnamese
tinkhongle[.]comMedia in Vietnamese
toithichdoc.blogspot[.]comBlog in Vietnamese
trieudaiviet[.]comUnknown – In Vietnamese
triviet[.]newsMedia in Vietnamese

Table 1 – Description of the compromised websites

Generally, in a watering hole attack, the adversaries compromise websites that are regularly visited by potential targets. However, in this attack, OceanLotus was also able to compromise some websites that attract large numbers of visitors in general, not just their presumed targets. The following table shows the Alexa rank at the time of writing (the lower the rank, the more visited) of the compromised websites. For instance, they compromised the Dan Viet newspaper website (danviet[.]vn), which is the 116th most visited website in Vietnam.

DomainAlexa rank (global)Alexa rank (in the most popular country)
triviet[.]news2,767,289Not available
raovatcalitoday[.]com8,180,358Not available
cnrp7[.]org8,411,693Not available
mtgvinh[.]net8,415,468Not available
danviethouston[.]com8,777,564Not available
lienketqnhn[.]org16,109,635Not available
gardencityclub[.]com16,109,635Not available
trieudaiviet[.]com16,969,048Not available
fvpoc[.]orgNot availableNot available

Table 2 – Alexa rank of the compromised websites


The modus operandi is similar on all compromised websites. The attackers add a small piece of JavaScript code either in the index page or in a JavaScript file hosted on the same server. The piece of code in Figure 2, slightly obfuscated, then loads another script from a server controlled by the attackers. The following code, added in https://www.mfaic.gov[.]kh/wp-content/themes/ministry-of-foreign-affair/slick/slick.min.js, will load the file from https://weblink.selfip[.]info/images/cdn.js?from=maxcdn.

Figure 2 – Piece of JavaScript code added to mfaic.gov[.]kh

In order to evade detection, they take the following measures:

  • They obfuscate the scripts to prevent static extraction of the final URL.
  • The URL looks like a real JavaScript library used by the website.
  • They use one different domain and URI per compromised website.
  • The script is different per compromised website. The following piece of code is the script inserted into another compromised website:

Figure 3 – Another piece of JavaScript inserted in a targeted website

First stage

Depending on the location of the IP address of the visitor, the first stage server, e.g. weblink.selfip[.]info for mfaic.gov[.]kh, delivers either a decoy script (a random legitimate JavaScript library) or the first stage script (SHA-1: 2194271C7991D60AE82436129D7F25C0A689050A for example). Not all the servers have a location check but when it is enabled, only visitors from Vietnam and Cambodia actually receive the malicious script.

The first stage script contains several checks to evade detection, as shown in Figure 4.

Figure 4 – First stage JavaScript payload

The script will wait until the victim scrolls on the page. It also checks the resolution of the window and whether Firebug, a browser extension used to analyze webpages, is enabled. If either of the checks fails, it stops the execution.

Then, it decrypts the Command & Control domain using a custom algorithm. For instance, 3B37371M1B1B382R332V1A382W36392W2T362T1A322T38 will be decrypted to wss://tcog.thruhere[.]net. For each first stage domain, the attackers also register a different second stage domain, each one being hosted on a different server. The code in Figure 5 is an equivalent, in Python, of the decryption function.

Figure 5 – Python code to decrypt the C&C servers

Once the C&C address is decrypted, the script sends a unique string of 15 digits, then receives and executes a second-stage script. All communications are performed through WebSocket over SSL. This protocol allows full duplex communication between a client and a server. It means that, once the client establishes a connection, a server can send data to the client even if the client did not send a request. However, in this particular case, the principal goal of using web sockets seems to be to evade detection.

Second stage

The second stage script is actually a reconnaissance script. The OceanLotus developers reused Valve’s fingerprintjs2 library, available on GitHub, slightly modifying it in order to add network communication and a custom report.

Figure 6 describes the different actions executed by the script. All the communications go through the WebSocket session opened by the first stage.

Figure 6 – Flow of the second stage payload

The communication is encrypted using an AES session key, generated by the server. It is encrypted with an RSA 1024-bit public key and sent to the client. Thus, it is not possible to decrypt the communications between the client and the server.

In comparison to the previous iterations of their watering hole framework, this will make it much more difficult for defenders, because the data sent over the network cannot be detected then decrypted. This will prevent network detection of the data. The public key sent by the server is always the same and is available in the IoCs section.

This recon script builds a report, similar to the one shown below, and sends it to the second stage C&C server.

Figure 7 – Fingerprint report

This report is nearly identical to the report generated from OceanLotus Framework B, documented by Volexity researchers in 2017. The different sections are similar and they include identical typos. Thanks to these similarities and the location of the targets, we are highly confident that OceanLotus runs this campaign.

The report generated contains detailed information about the victim browser and the website visited: the user-agent, the HTTP Referer, the local and external IP address, the browser plugins the browser’s configured language preferences.

Also, there are two unique identifiers per machine, called client_zuuid and client_uuid. They are probably used to identify users and track them across visits. These identifiers were actually already present in the 2017 version of the framework and client_uuid was computed in a similar way.

The client_zuuid is the concatenation of the different deviceId values contained in navigator.mediaDevices.enumerateDevices. The devices are the external devices accessible to the browser, such as cameras or microphones. Thus, this value should be the same for a given user during their different visits from the same computer.

The client_uuid is a MD5 hash of some fingerprint information extracted by fingerprintjs2. Among the collected information are the browser user-agent, the language, the time zone, the browser plugins, and the fonts available in the browser. Again, this value should be identical across visits, unless, for example, the user updates the browser or uses a different device.

Finally, the server can send additional JavaScript code to the victimized computer, probably the actual payload. Unfortunately, due to the use of an AES session key to encrypt the communications, we were not able to identify in-the-wild examples of payloads sent by the attackers. In addition, the payloads are only delivered to specific targets. Thus, it was not possible to get them using a test machine. However, according to previous reports, these OceanLotus watering hole campaigns aim to phish its victims. For example, Volexity reported that users were shown a pop-up asking to approve OAuth access to the victim’s Google account for an OceanLotus Google App. Using this technique, attackers can get access to the victim’s contacts and emails.

Network infrastructure

In order to be as stealthy as possible, the OceanLotus operators registered one first stage and one second stage domain per compromised website. Each domain is hosted on a separate server with a distinct IP address. They registered at least 50 domains and 50 servers for this campaign.

While most of the first-stage domains were registered on free domain name services, most of the second stage domains are paid domain names. They also mimic genuine websites in order to seem legitimate. Table 3 shows some services mimicked by the attackers.

C&C domainLegitimate domain
bootstraplink [.]comgetbootstrap.com

Table 3 – Legitimate websites mimicked by the attackers

The number of domains used and their similarity to legitimate websites probably makes them harder to detect for a human eye looking at the network traffic.


Despite being actively tracked by many researchers, the OceanLotus group is still very busy attacking targets in Southeast Asia. They also regularly improve their toolset, including their watering hole framework and their Windows and MacOS malware. The recent updates to their watering hole framework, highlighted in this blog, show a level of sophistication never before seen for OceanLotus. This is yet another reminder that this APT group should be closely tracked.

In order to limit the number of victims, we notified each compromised website owner and explained how to remove the malicious JavaScript code although some seem very resistant to being informed or helped.

ESET Researchers will continue tracking any development of the OceanLotus toolset. Indicators of Compromise can also be found on GitHub. For any inquiries, or to make sample submissions related to the subject, contact us at threatintel@eset.com


[1]         ESET Research, “OceanLotus: Old techniques, new backdoor,” 03 2018. [Online]. Available: https://www.welivesecurity.com/wp-content/uploads/2018/03/ESET_OceanLotus.pdf.

[2]         N. Carr, “Cyber Espionage is Alive and Well: APT32 and the Threat to Global Corporations,” FireEye, 14 05 2017. [Online]. Available: https://www.fireeye.com/blog/threat-research/2017/05/cyber-espionage-apt32.html.

[3]         Sky Eye Lab, “OceanLotus APT Report Summary,” 29 05 2015. [Online]. Available: http://blogs.360.cn/post/oceanlotus-apt.html.

[4]         S. K. S. A. Dave Lassalle, “OceanLotus Blossoms: Mass Digital Surveillance and Attacks Targeting ASEAN, Asian Nations, the Media, Human Rights Groups, and Civil Society,” Volexity, 06 11 2017. [Online]. Available: https://www.volexity.com/blog/2017/11/06/oceanlotus-blossoms-mass-digital-surveillance-and-exploitation-of-asean-nations-the-media-human-rights-and-civil-society/.

Indicators of Compromise (IoCs)


DescriptionSHA-1SHA-256Detection name
First stage script2194271C7991D60AE82436129D7F25C0A689050A1EDA0DE280713470878C399D3FB6C331BA0FADD0BD9802ED98AE06218A17F3F7JS/Agent.NYQ
Second stage script996D0AC930D2CDB16EF96EDC27D9D1AFC2D89CA88B824BE52DE7A8723124BAD5A45664C574D6E905F300C35719F1E6988887BD62JS/Agent.NYR

Network IoCs

Compromised website1st stageIP address2nd stageIP address
tinkhongle[.]com cdn1.shacknet[.]us142.93.127.120scdn-cxense[.]com142.93.75.161

RSA Public Key sent by the server







Sign up to receive an email update whenever a new article is published in our Ukraine Crisis – Digital Security Resource Center