company logo

Product

Our Product

We are Reshaping the way Developers find and fix vulnerabilities before they get exploited.

Solutions

By Industry

BFSI

Healthcare

Education

IT & Telecom

Government

By Role

CISO/CTO

DevOps Engineer

Resources

Resource Library

Get actionable insight straight from our threat Intel lab to keep you informed about the ever-changing Threat landscape.

Subscribe to Our Weekly Threat Digest

Company

Contact Us

Have queries, feedback or prospects? Get in touch and we shall be with you shortly.

loading..
loading..
loading..
Loading...

BitDefender

Antivirus

Windows

loading..
loading..
loading..

Cobalt Strike disguised as BitDefender Windows Antivirus update circulated across Ukraine

Ukraine CERT is alarmed about an advanced phishing email containing a fake BitDefender Windows update that, if installed, deploys Cobalt Strike malware to the i...

16-Mar-2022
2 min read

Related Articles

loading..

Docker

A new cryptojacking attack exploits Docker Swarm and Kubernetes via exposed APIs...

Cybersecurity researchers have disclosed a new, sophisticated cryptojacking campaign that targets the [Docker](https://www.secureblink.com/cyber-security-news/new-cyberattack-targets-docker-ap-is-with-advanced-cryptojacking-tactics-1) Engine API to hijack cloud resources and create a malicious Docker Swarm botnet. In a detailed Datadog Security Research analysis, attackers exploit unauthenticated and exposed Docker Engine API endpoints to deploy cryptocurrency miners on compromised containers. By leveraging Docker Swarm's orchestration features for command-and-control (C2) purposes, the attackers effectively turn compromised systems into coordinated botnets. This [Threatfeed](https://www.secureblink.com/cyber-security-news) delves into the mechanics of the critical cryptojacking attack, the tools, and scripts leveraged by the threat actors, and provides comprehensive recommendations for safeguarding against such threats. ## Understanding the Attack Vector ### Initial Access via Exposed Docker APIs Attackers initiate the campaign by scanning the internet for exposed Docker Engine API endpoints using tools like **masscan** (a fast port scanner) and **ZGrab** (an application layer scanner). These endpoints, typically listening on ports **2375**, **2376**, **2377**, **4243**, and **4244**, can be unauthenticated and, if misconfigured, provide root-level access to the host. **Quote from Datadog's Report:** > "We have discovered a new cryptojacking campaign targeting Docker Engine API, with the ability to move laterally to Docker Swarm, Kubernetes, and SSH servers." — [Datadog Security Research](https://securitylabs.datadoghq.com/articles/threat-actors-leveraging-docker-swarm-kubernetes-mine-cryptocurrency/) ### Deployment of Malicious Containers Once an exposed API is found, the attackers spawn an Alpine Linux container with the host's filesystem mounted inside. This container retrieves an initialization shell script (`init.sh`) from a remote server (`solscan[.]live`). The script performs several actions: - Ensures data transfer tools like `curl` and `wget` are installed. - Checks for root privileges. - Downloads and executes the **XMRig** miner for cryptocurrency mining. - Installs a custom **libprocesshider** rootkit to hide malicious processes. ### Hiding Malicious Activity The **libprocesshider** rootkit is employed to conceal the **XMRig** miner process from system monitoring tools like `top` and `ps`, making it difficult for administrators to detect unusual activity. ## Lateral Movement and Propagation ### Additional Payloads and Scripts The `init.sh` script also fetches additional scripts for lateral movement: 1. **`kube.lateral.sh`**: Targets Kubernetes environments. 2. **`spread_docker_local.sh`**: Scans local network ranges for other Docker hosts. 3. **`spread_ssh.sh`**: Attempts to spread via SSH by adding authorized keys and creating new users. ### Targeting Kubernetes with `kube.lateral.sh` The script disables security measures like firewalls and SELinux before scanning local network ranges for open **Kubelet API** ports (10250). If vulnerable Kubernetes nodes are found, it can execute commands to deploy the miner on pods running on those nodes. ### Scanning and Exploitation with `spread_docker_local.sh` - Uses `masscan` and `zgrab` to find hosts with open Docker-related ports. - Deploys malicious containers on discovered hosts using images hosted on Docker Hub by user **nmlmweb3**. - The images execute `init.sh`, propagating the malware. ### SSH Backdoors with `spread_ssh.sh` - Scans for SSH servers on the local network. - Adds a new SSH key and creates a new user named **ftp** with root privileges. - Searches for credential files related to SSH, AWS, Google Cloud, and Samba, particularly targeting GitHub Codespaces environments. - Uploads any found credentials to the C2 server. ### Manipulating Docker Swarm with `TDGINIT.sh` - Forces compromised Docker hosts to leave existing Swarms. - Joins them to a new Swarm controlled by the attacker using a predefined token. - Allows attackers to use Docker Swarm's orchestration for C2, issuing commands across all compromised nodes. ## Persistence Mechanisms ### Process Hiding and Dynamic Linker Hijacking - Uses **Dynamic Linker Hijacking** by modifying `/etc/ld.so.preload` to ensure the rootkit is loaded for every new process. - Hides the **XMRig** miner process, preventing detection. ### Cron Jobs and Immutable Files - Installs cron jobs to maintain persistence. - Uses the `chattr +ai` command to make backdoor files immutable, preventing their removal or modification. ## Broader Implications ### Threat to Cloud Infrastructure This campaign highlights significant risks: - **Resource Drain**: Cryptocurrency mining consumes substantial CPU and memory resources, affecting performance and increasing costs. - **Security Risks**: Attackers with root access can exfiltrate data, install additional malware, or use the infrastructure for further attacks. - **Botnets**: Compromised hosts can be coordinated for distributed denial-of-service (DDoS) attacks or other malicious activities. ### Potential Attribution to TeamTNT While some tactics resemble those of **[TeamTNT](https://www.secureblink.com/cyber-security-news/teamtnt-targets-compromised-docker-hub-accounts-to-distribute-crypto-mining-malware)**, a known threat group specializing in cloud-focused attacks, definitive attribution remains uncertain. ## Recommendations for Prevention and Mitigation 1. **Secure Docker API Endpoints**: - Do not expose the Docker Engine API to the internet. - Secure it with TLS authentication and firewall rules. 2. **Regularly Update and Patch Systems**: - Keep Docker, Kubernetes, and associated services updated. - Apply security patches promptly. 3. **Monitor Network Traffic and Logs**: - Use intrusion detection systems (IDS) to monitor for unusual activity. - Be alert for large outbound traffic volumes indicative of cryptomining or data exfiltration. - Regularly check system logs for unauthorized modifications. 4. **Implement Principle of Least Privilege**: - Limit user permissions and avoid running containers as root when possible. - Use role-based access control (RBAC) in Kubernetes. 5. **Use Security Tools and Best Practices**: - Employ tools like Docker Bench Security to assess the security posture. - Utilize cloud security posture management (CSPM) solutions for continuous monitoring. - Enable logging and monitoring features in Docker and Kubernetes. 6. **Educate and Train Staff**: - Ensure that DevOps and IT teams are aware of security best practices for containerized environments. - Conduct regular security awareness training. 7. **Audit and Secure Credentials**: - Regularly audit credentials and keys stored in environments like GitHub Codespaces. - Use secrets management tools to store sensitive information securely. ## Conclusion The discovery of this cryptojacking campaign underscores the critical need for securing containerized environments. Exposed Docker APIs and misconfigured Kubernetes clusters present significant risks, enabling attackers to mine cryptocurrency and establish botnets for broader malicious activities. Organizations must proactively secure their Docker and Kubernetes environments, regularly audit configurations, and stay informed about emerging threats. By implementing robust security measures and educating staff, the risk of such attacks can be significantly mitigated. ## Indicators of Compromise (IOCs) - **Files and Scripts**: - `init.sh`, `kube.lateral.sh`, `spread_docker_local.sh`, `spread_ssh.sh`, `ar.sh`, `TDGINIT.sh`, `pdflushs.sh` - Use of `libprocesshider` rootkit - **Domains and IPs**: - `solscan.live` - `147.75.47.199` - Docker Hub user `nmlmweb3` - **Ports Targeted**: - Docker ports: 2375, 2376, 2377, 4243, 4244 - Kubernetes Kubelet API port: 10250 - SSH port: 22 ## References - [Datadog Security Research Detailed Analysis](https://www.datadoghq.com/blog/threat-actors-leverage-docker-swarm-and-kubernetes-to-mine-cryptocurrency-at-scale/) - [Docker Security Documentation](https://docs.docker.com/engine/security/security/) - [Kubernetes Security Best Practices](https://kubernetes.io/docs/concepts/security/overview/) - [TeamTNT Threat Analysis by Trend Micro](https://www.trendmicro.com/en_us/research/20/j/teamtnt-targeting-docker-systems-using-weak-credentials.html)

loading..   01-Oct-2024
loading..   6 min read
loading..

Iran

Hacking

USA

Three Iranian hackers linked to the IRGC indicted for a "hack-and-leak" campaign...

In a landmark cybercrime case, the U.S. Department of Justice (DOJ) has unsealed an indictment accusing three Iranian hackers of orchestrating a _"hack-and-leak"_ campaign. This cyberattack was strategically aimed at manipulating the outcome of the 2024 U.S. presidential election. ### Identification of Perpetrators Iranian nationals Masoud Jalili, Seyyed Ali Aghamiri, and Yaser Balaghi—affiliated with Iran's Islamic Revolutionary Guard Corps (IRGC)—are accused of hacking into the accounts of U.S. government officials, individuals tied to several U.S. political campaigns, and members of the media. ### Detailing the Attacks As per the [DoJ](https://www.justice.gov/opa/pr/three-irgc-cyber-actors-indicted-hack-and-leak-operation-designed-influence-2024-us), these cyberattacks were part of a larger Iranian effort to steal classified information about U.S. officials and manipulate the outcome of American elections. ### Target Shift to Trump Campaign In May 2024, after years of targeting former U.S. government officials, the hackers allegedly shifted their focus toward individuals associated with the Trump 2024 presidential campaign, as outlined in the [indictment](http://www.justice.gov/opa/media/1371191/dl). ![FBI-IRGC-hackers-wanted-poster.jpg](https://sb-cms.s3.ap-south-1.amazonaws.com/FBI_IRGC_hackers_wanted_poster_f7c0649a13.jpg) ***WANTED POSTER*** ### Unauthorized Access and Theft The hackers successfully infiltrated the personal accounts of campaign officials, illicitly obtaining confidential campaign documents and sensitive emails. ### Hack-and-Leak Campaign Begins By late June, the hackers initiated a _"hack-and-leak"_ operation, attempting to disseminate stolen materials to U.S. media outlets and individuals tied to the Biden campaign, with the intention of undermining Trump's 2024 presidential bid. ### Joint Statement and Timeline Between late June and early July, Iranian cyber actors sent unsolicited emails to individuals associated with President Biden's campaign. These emails contained excerpts from stolen, non-public materials tied to Trump’s former campaign, according to a joint [statement](https://www.fbi.gov/news/press-releases/joint-odni-fbi-and-cisa-statement-091824) released by CISA, the FBI, and the Office of the Director of National Intelligence on September 18. ### Hack-and-Leak Timeline and Tactics This _"hack-and-leak"_ campaign began in January 2020, deploying spear phishing and social engineering techniques to compromise high-profile targets. ### Expanded Operations in 2022 By 2022, their operations expanded, targeting a former U.S. government official to steal personal information that would aid in identifying future victims. ### Concluding Government Actions The U.S. State Department has offered a $10 million reward for [information](https://x.com/RFJ_USA/status/1839704122531987863) on Jalili, Aghamiri, and Balaghi. Concurrently, the Treasury Department's Office of Foreign Asset Control (OFAC) has [designated Jalili](https://home.treasury.gov/news/press-releases/jy2621) for his IRGC involvement, imposing sanctions to thwart foreign interference in U.S. elections. ### Closing Quote from Officials Assistant Attorney General Matthew G. Olsen [stated](https://www.justice.gov/opa/pr/three-irgc-cyber-actors-indicted-hack-and-leak-operation-designed-influence-2024-us), _"Iran's hack-and-leak efforts are a direct assault on the integrity of our democratic processes."_

loading..   30-Sep-2024
loading..   3 min read
loading..

UNIX

CUPS

Linux

Discover how a critical CUPS vulnerability exposes Unix systems to remote code e...

This Threatfeed is the first in a series exploring vulnerabilities in Unix systems, specifically targeting GNU/Linux systems through the Common Unix Printing System (CUPS). As noted by a contributor to the CUPS project: > _"From a generic security point of view, a whole Linux system as it is nowadays is just an endless and hopeless mess of security holes waiting to be exploited."_ This statement underscores the critical need to examine and address these vulnerabilities to enhance system security. --- ## Summary Several vulnerabilities have been identified in CUPS and its associated components, which, when combined, allow for remote code execution (RCE) on affected systems: - **CVE-2024-47176**: `cups-browsed` versions ≤ 2.0.1 bind to UDP `INADDR_ANY:631`, accepting packets from any source, which can trigger a `Get-Printer-Attributes` IPP request to an attacker-controlled URL. - **CVE-2024-47076**: `libcupsfilters` versions ≤ 2.1b1 have a vulnerability where `cfGetPrinterAttributes()` does not validate or sanitize IPP attributes returned from an IPP server, allowing attacker-controlled data into the CUPS system. - **CVE-2024-47175**: `libppd` versions ≤ 2.1b1's `ppdCreatePPDFromIPP2()` function fails to validate or sanitize IPP attributes when writing them to a temporary PPD file, enabling injection of attacker-controlled data. - **CVE-2024-47177**: `cups-filters` versions ≤ 2.0.1 include `foomatic-rip`, which allows arbitrary command execution via the `FoomaticRIPCommandLine` PPD parameter. --- ## Impact A remote, unauthenticated attacker can silently replace existing printers or install new ones by manipulating IPP URLs with malicious ones. This manipulation can lead to arbitrary command execution on the target system when a print job is initiated. --- ## Attack Vectors ### Public Internet (WAN) - An attacker sends a crafted UDP packet to port **631** on the target system. - No authentication is required. - This vector affects systems directly connected to the internet with port 631 exposed. ### Local Network (LAN) - An attacker can spoof Zeroconf, mDNS, or DNS-SD advertisements to achieve the same result. - This method will be elaborated in subsequent write-ups focusing on macOS. --- ## Affected Systems The vulnerabilities affect a wide range of Unix-like systems where CUPS and `cups-browsed` are installed: - **Most GNU/Linux distributions** - **Some BSD variants** - **Oracle Solaris** - **Potentially Google ChromeOS** - **Other Unix-like operating systems** *Note:* The presence and default status of `cups-browsed` may vary across distributions. --- ## Technical Details ### Vulnerability in `cups-browsed` (CVE-2024-47176) - **Issue:** `cups-browsed` listens on UDP port 631 on all network interfaces (`0.0.0.0`), accepting packets from any source. - **Risk:** An attacker can send a specially crafted packet to trigger a `Get-Printer-Attributes` IPP request to an attacker-controlled URL. - **Cause:** Lack of source IP address validation due to default configuration allowing all connections. ### Lack of Input Validation in `libcupsfilters` (CVE-2024-47076) - **Issue:** The function `cfGetPrinterAttributes5()` does not validate or sanitize IPP attributes received from a server. - **Risk:** Attacker-controlled data can be injected into the CUPS system, potentially leading to malicious activities. - **Cause:** Insufficient validation of IPP attributes returned from remote servers. ### Improper Handling in `libppd` (CVE-2024-47175) - **Issue:** The function `ppdCreatePPDFromIPP2()` fails to validate or sanitize IPP attributes when writing to a temporary PPD file. - **Risk:** Allows injection of malicious directives into PPD files, which can be executed by the system. - **Cause:** Lack of proper input sanitization when generating PPD files from IPP attributes. ### Arbitrary Command Execution via `foomatic-rip` (CVE-2024-47177) - **Issue:** The `foomatic-rip` filter allows execution of arbitrary commands through the `FoomaticRIPCommandLine` parameter in PPD files. - **Risk:** An attacker can execute commands with the privileges of the CUPS system, potentially leading to full system compromise. - **Cause:** Historical reliance on `foomatic-rip` for printer compatibility, with challenges in restricting its capabilities without breaking functionality. --- ## Exploitation Overview By chaining the identified vulnerabilities, an attacker can: 1. **Trigger a Malicious IPP Request:** - Send a crafted UDP packet to UDP port 631, causing `cups-browsed` to initiate a connection to an attacker-controlled IPP server. 2. **Inject Malicious IPP Attributes:** - The attacker's IPP server responds with malicious attributes that are not validated by `libcupsfilters` or `libppd`. 3. **Create Malicious PPD File:** - The system generates a PPD file containing injected directives, including potentially harmful commands. 4. **Execute Arbitrary Commands:** - When a user initiates a print job, the CUPS system processes the PPD file, executing the injected commands via `foomatic-rip`. *Note:* User interaction is required (i.e., starting a print job) for the final execution step. --- ## Remediation ### Immediate Actions - **Disable `cups-browsed`:** - If not required, stop and disable the `cups-browsed` service: ```bash sudo systemctl stop cups-browsed sudo systemctl disable cups-browsed ``` - **Update CUPS Packages:** - Apply security updates from your distribution's repositories as they become available. - **Network-Level Mitigation:** - Block incoming traffic on UDP port 631 at the firewall level. - Consider restricting or disabling Zeroconf, mDNS, and DNS-SD services if not in use. ### Long-Term Recommendations - **Audit Installed Packages:** - Remove unnecessary printing services and related packages if printing functionality is not required. - **Implement Access Controls:** - Configure `cups-browsed` to restrict allowed sources by editing `/etc/cups/cups-browsed.conf`. - **Monitor for Updates:** - Stay informed about security advisories related to CUPS and associated libraries. The vulnerabilities in CUPS and its associated components present a significant security risk to Unix-like systems. Exploitation can lead to remote code execution with minimal attacker effort and no initial authentication. It is crucial for system administrators and users to take immediate action to mitigate these risks. --- ## Additional Considerations ### Responsible Disclosure Challenges The process of responsibly disclosing these vulnerabilities highlighted challenges in communication and prioritization between security researchers and software maintainers. Efficient collaboration is essential to address security issues promptly and effectively. ### Legacy Components The continued use of legacy components like `foomatic-rip` poses security challenges due to their inherent vulnerabilities and the difficulty in restricting their capabilities without impacting functionality. ### Future Research Further analysis is being conducted on related vulnerabilities, including potential exploitation on other operating systems such as macOS. Subsequent write-ups will provide additional details. --- ## References - **CUPS Official Documentation:** [cups.org](https://www.cups.org/) - **Internet Printing Protocol (IPP) Specifications:** [IETF RFCs](https://www.ietf.org/standards/rfcs/) - **CVE Details:** - [CVE-2024-47176](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47176) - [CVE-2024-47076](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47076) - [CVE-2024-47175](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47175) - [CVE-2024-47177](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47177)

loading..   27-Sep-2024
loading..   6 min read