Categories: MalwareSecurity

How Coremex malware monetizes search engine Hijacking

F-Secure has identified a malware dubbed Coremex that takes advantage of plugin functionality provided by browsers to hijack search engine results.

Search engine are a strategic component in the successful execution of any attacks, we saw in the past Black SEO campaigns conducted with the primary intent to provide results that help the attackers to spread the malicious agents.

The security community in the past has detected numerous malware that was specifically designed to target search engine results, many of them work as browser extensions and are able to modify realtime the results. Recently security experts at F-Secure has detected a new family of malware, named Coremex, which exploits plugin functionality provided by common browsers to hijack the results proposed by principal search engine.

The Coremex malware uses a single NullsoftInstaller executable file which performs the dual function dropper and downloader that was used by attackers also to collect basic information (e.g. username, computer name, processor, memory) from the infected machine. The experts discovered within the source code of Coremex the IP address of the C&C server (178.86.17.32), the information gathered by the malicious agent is encrypted with RC4 with a key of “2AJQ8NA4” and the final result will be encoded with Base64.

The authors of the Coremex have also implemented anti-sandbox features to prevent the execution of the malware in virtual environment to study its composition and behavior.

“There are some anti-sandbox features implemented by Coremex that prevents it from downloading the main payloads, such as the browser extension scripts, from the C&C server. These features consist of checking blacklisted process names and looking for well-known sandbox fingerprints such as a “VMware” string on the infected machine by using Windows Management Instrumentation (WMI).”

The expert at F-Secure noted that the malware once in execution download additional payloads from the multiple C&C servers:

•  178.250.245.198
•  174.127.82.213
•  192.154.94.253

Once the malicious payload is installed, the Coremex browser extension will reside in the browser process, the malware uses highly obfuscated JavaScript making hard its analysis. JavaScript code is used to register a couple of events using the API provided by the browser, the first one to contact fake search engines, the second one to parse the URL victims visit.

Coremex used to hijack victims to the following bogus search engine websites:

•  onlinetrack.org
•  zvtracker.com

The callback function triggered by the second listener analyzes search queries entered by the victims using the following search engines:

•  Google
•  Bing
•  Yahoo
•  ASK
•  AOL
•  AVG
•  MyWebSearch
•  Search-Results
•  Comcast
•  Delta-Search

The malware analyzes the requests made by victims and uses a JSON structure to compose the query that it encrypts with RC4 algorithm with key “http”, encoding the results with Base64. The Base64 encoded string will be sent to a search engine platform managed by attackers:

esearchpage.com/s?q=<RC4_Base64_Encoded_search_query>
esearchpage.org/s?q=<RC4_Base64_Encoded_search_query>

The platform responds with an encrypted JSON structure containing the destination websites that will determine where a webpage that has ads-like URL will be redirected to.

The decrypted JSON object might look like:

 

The following screenshot shows Coremex script in action when an ad’s URL is clicked by the victim, which leads to the ad’s page being hijacked and redirected to author’s intended destination website.

The attacker also used IFRAME injection to the hijacked ad’s page, the intent of malware authors was to take advantage of popular online advertising services.

Pierluigi Paganini

(Security Affairs –  search engine, malware)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

4G Calling (VoLTE) flaw allowed to locate any O2 customer with a phone call

A flaw in O2 4G Calling (VoLTE) leaked user location data via network responses due…

9 hours ago

China-linked UnsolicitedBooker APT used new backdoor MarsSnake in recent attacks

China-linked UnsolicitedBooker used a new backdoor, MarsSnake, to target an international organization in Saudi Arabia.…

15 hours ago

UK’s Legal Aid Agency discloses a data breach following April cyber attack

The UK’s Legal Aid Agency suffered a cyberattack in April and has now confirmed that…

18 hours ago

Sarcoma Ransomware Unveiled: Anatomy of a Double Extortion Gang

Cybersecurity Observatory of the Unipegaso's malware lab published a detailed analysis of the Sarcoma ransomware.…

20 hours ago

Mozilla fixed zero-days recently demonstrated at Pwn2Own Berlin 2025

Mozilla addressed two critical Firefox vulnerabilities that could be potentially exploited to access sensitive data…

1 day ago

Japan passed a law allowing preemptive offensive cyber actions<gwmw style="display:none;"></gwmw>

Japan passed a law allowing preemptive offensive cyber actions, shifting from its pacifist stance to…

2 days ago