Two Android spyware strains named Hornbill and SunBird were recently discovered with possible connections to the advanced persistent threat (APT) group called Confucius. The group first appeared in 2013 as a hacking group, primarily pursuing Pakistani and other South Asian targets. Confucius has created mainly Windows malware in the past. However, after the spying app ChatSpy came into existence in 2017, the group has extended its mobile malware capabilities.
The two Android malware strains, Hornbill and SunBird, are embedded inside fake Android applications and used as spyware for monitoring and exfiltrating data from the mobile phones of their targets. These fake Android applications were used to spy on Pakistan’s military and nuclear authorities, along with election officials from Kashmir. The counterfeit apps contain advanced capabilities, including capturing photos from the camera, capturing the geolocation, scraping WhatsApp messages and media, and requesting elevated privileges. The data is first collected in SQLite databases, compressed to ZIP files and uploaded to the hacker’s C2 servers.
Counterfeit applications published by the APT group mimic various genuine-looking applications. The SunBird strain has been embedded into fake applications with legitimate-looking names such as “Google Security Framework,” “Falconry Connect,” “Mania Soccer,” and “Quran Majeed.” According to security researchers at Lookout, apps embedded with SunBird have more extensive malicious capabilities than Hornbill.
While Hornbill works as spyware used to extract data of interest from the target device, SunBird additionally works as a remote access trojan (RAT), allowing hackers to execute commands on an infected device. Both malware programs can exfiltrate a wide range of data from target devices.
Data exfiltrated by Hornbill and SunBird:
- Call logs
- Device metadata, including phone number, IMEI/Android ID, model and manufacturer, and Android version details
- Images stored on external storage
- WhatsApp voice notes, if installed
Actions performed on target devices:
- Requesting device administrator privileges
- Taking screenshots and capturing whatever a victim is currently viewing on their device
- Taking photos with the device camera
- Recording environment and call audio
- Scraping WhatsApp messages, contacts, and notifications via accessibility services
The SunBird malware consists of certain additional malicious capabilities when compared with Hornbill. The additional data exfiltrated by SunBird includes:
- List of installed applications
- Browser history
- Calendar information
- BlackBerry Messenger (BBM) audio files, documents, and images
- WhatsApp Audio files, documents, databases, voice notes, and images
- Content sent and received via IMO instant messaging application
Additional actions performed by SunBird include:
- Downloading attacker-specified content from FTP shares
- Running arbitrary commands as root, if possible
- Scraping BBM messages, contacts, and notifications via accessibility services
The Confucius APT malware campaign involves social engineering tactics for luring unsuspecting targets to download these applications from direct links. Multiple malicious applications with the SunBird and Hornbill strains are hosted on third-party app stores. Apps embedded with the Hornbill strain are more passive in nature, target a limited set of data, and are used as a reconnaissance tool. The malware only uploads data to the C2 server when it runs for the first time on the infected device. Hornbill keeps mobile internet and battery usage low by only uploading new data from target devices. On the other hand, the SunBird strain uploads data in fixed intervals. Hornbill actors seem more interested in monitoring the user’s WhatsApp activity, and Hornbill abuses the Android accessibility services to detect an active WhatsApp call and record it.
Researchers believe that the same threat actor is behind both the malware, and neither of these apps were distributed via Google Play or any authorized app stores.
Possible targets of the campaign and exfiltrated data
Security researchers were able to get access to 18GB of exfiltrated data exposed on insecurely configured C2 servers of the SunBird malware. The data also included the location of the infected devices, which helped researchers determine the possible targets of this malware campaign. Some of the targets identified included individuals related to Pakistan Air Force (PAF), Pakistan Atomic Energy Commission, and other departments.
The data exfiltrated by SunBird included information such as SMS messages, contacts, and call logs uploaded at fixed intervals.
Connection to Confucius APT
Similar to fake Android applications, the Confucius APT group also targets Windows systems. We analyzed a Confucius malware sample and observed that the attack kill chain starts with a word document delivered to the target. The document is crafted in a way that encourages the target to open that document. Once the user opens the document, it uses template injection to download the RTF exploit that downloads the final stage payload.
The RTF contains a DLL embedded in an OLE object, as shown in the image below.
The embedded DLL file, bing.dll (SHA-256: 8b535452727edf06280c495b190c10eb0a90522fad1c61cae8bfeef9b84a4879) contains an export “mark” and is responsible for downloading the payload. The name of the released .dll file is linknew.dll.
The malware also checks for the presence of a debugger and whether it is being executed in a virtual environment. The malicious bing.dll connects to “hxxp://mlservices.online/content/upgrade” to download the payload file. An LNK file named update.lnk and pointing to the payload file update.exe is dropped to the startup folders – “%AppData%Microsoft\Windows\Start Menu\Programs\Startup” – for adding persistence. After dropping the payload, it runs in the background and performs spyware activities similar to Hornbill and SunBird. We are sharing indicators of compromise (IOCs) related to Confucius windows malware and fake Android applications.
- Ensure antivirus software and associated files are up to date
- Search for existing signs of the indicated IOCs in your environment
- Consider blocking or setting up detection for all URL and IP-based IOCs
- Download applications from official app stores, such as Google Play Store and Apple App Store
- Avoid websites providing bootleg Android APKs and iOS APPs
- Keep applications and operating systems running at the current released patch level
- Exercise caution while opening attachments and links in emails
- Keep systems fully patched to mitigate vulnerabilities effectively
Indicators of compromise
|SHA-256 Hashes – Confucius|
|Command and Control Infrastructure|
Cyble is a global threat intelligence SaaS provider that helps enterprises protect themselves from cybercrimes and exposure in the darkweb. Cyble’s prime focus is to provide organizations with real-time visibility into their digital risk footprint. Backed by Y Combinator as part of the 2021 winter cohort, Cyble has also been recognized by Forbes as one of the top 20 Best Cybersecurity Startups To Watch In 2020. Headquartered in Alpharetta, Georgia, and with offices in Australia, Singapore, and India, Cyble has a global presence. To learn more about Cyble, visit www.cyble.com.