<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Cloud_security</title><link>https://research.intezer.com/tags/cloud_security/</link><description>Recent content in Cloud_security on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 26 Oct 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/cloud_security/index.xml" rel="self" type="application/rss+xml"/><item><title>Exposed Prefect Workflows Could Lead to Disruptive Attacks</title><link>https://research.intezer.com/blog/2021/10/exposed-prefect-workflows-could-lead-to-disruptive-attacks/</link><pubDate>Tue, 26 Oct 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/10/exposed-prefect-workflows-could-lead-to-disruptive-attacks/</guid><description>
&lt;h2&gt;Introduction&lt;span class="hx:absolute hx:-mt-20" id="introduction"&gt;&lt;/span&gt;
&lt;a href="#introduction" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Workflow management platforms are powerful tools for automating and managing
complex tasks. Integrating workflow platforms can help companies coordinate and
ease their business processes as well as increase the productivity of their
teams. When the instances are misconfigured, they can expose the systems to
potential attacks and data loss. This is why it&amp;rsquo;s crucial to properly set up
these instances. Companies recently learned this the hard way when
misconfiguring popular open-source workflow platforms
&lt;a href="../../../2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/"&gt;Argo&lt;/a&gt;
and
&lt;a href="../../../2021/10/misconfigured-airflows-leak-credentials/"&gt;Airflow&lt;/a&gt;.
This post will focus on misconfigurations in the Prefect workflow platform. We
have identified hundreds of misconfigured Prefect instances which could be the
target of disruptive attacks. By using Prefect&amp;rsquo;s web UI and API function,
attackers can potentially modify and delete workflows, tasks, and agents,
including the history logs of previous executions, belonging to companies with
exposed instances. Disruptive attacks can cause data loss and business delays
affecting teams that integrate workflows into their daily routines and the
clients that depend on these workflows functioning properly. We did not find
any evidence of Prefect users having their information leaked as of yet.
Prefect users should verify that their instances are not exposed to the
internet and enable multi-factor authentication.&lt;/p&gt;
&lt;h2&gt;What is Prefect?&lt;span class="hx:absolute hx:-mt-20" id="what-is-prefect"&gt;&lt;/span&gt;
&lt;a href="#what-is-prefect" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Prefect is a workflow management platform launched in 2018 and powered by the
open-source Prefect Core workflow engine. It&amp;rsquo;s a popular platform marked by its
7.6K stars on &lt;a href="https://github.com/prefecthq/prefect"target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt;. There are two
ways to set up Prefect: 1) Using the
&lt;a href="https://www.prefect.io/cloud/"target="_blank" rel="noopener"&gt;Prefect Cloud&lt;/a&gt; engine or 2) Setting up a local
&lt;a href="https://github.com/prefecthq/server"target="_blank" rel="noopener"&gt;Prefect server&lt;/a&gt;. The main difference
between the two options is Prefect Cloud has everything already configured and
ready to use while the latter option requires users to put more effort into
configuring the infrastructure. Prefect uses a full
&lt;a href="https://docs.prefect.io/orchestration/ui/interactive-api.html"target="_blank" rel="noopener"&gt;GraphQL API&lt;/a&gt;
for interacting with the platform and easily accessing all of the information
stored in the platform. The API can be accessed using the web UI or through a
Python client. When using Prefect Cloud, authentication is required to access
the platform. However, when using the Prefect server, authentication is not
required by default, meaning that anyone with access to the server can get
information from the Prefect platform. For companies that have instances
exposed to the internet and which don&amp;rsquo;t incorporate authentication, essentially
this means that anyone can view the information stored by those companies on
Prefect. This includes flows, tasks, agents and projects. Unlike
&lt;a href="../../../2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/"&gt;Argo&lt;/a&gt;
and
&lt;a href="../../../2021/10/misconfigured-airflows-leak-credentials/"&gt;Airflow&lt;/a&gt;,
Prefect is a much more secure platform and we did not find any evidence of
companies that use Prefect having their information leaked. We examined the
functions exposed by the API and the actions that users can make in the web UI.
There are several functions in the web UI and GraphQL API that can be used by
attackers to delete elements in the workflow platform and launch disruptive
attacks on the companies that own the exposed instances.&lt;/p&gt;
&lt;h2&gt;How is the Attack Executed?&lt;span class="hx:absolute hx:-mt-20" id="how-is-the-attack-executed"&gt;&lt;/span&gt;
&lt;a href="#how-is-the-attack-executed" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Workflows can be deleted with a single button click in the web UI as shown
below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/exposed-prefect-workflows-could-lead-to-disruptive-attacks/images/fig1.png" title="Deleting a workflow in the web UI." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Deleting a workflow in the web UI.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Another way to delete workflows, as well as projects, tasks and agents, is by
using queries from the GraphQL API, which is available in the web UI or on port
4200 of the server that runs the Prefect platform. Using a simple query, an
attacker can retrieve the ID of the elements they plan to delete and then use
the suitable API functions to delete the elements. Those elements are
&lt;code&gt;delete_task&lt;/code&gt;, &lt;code&gt;delete_flow&lt;/code&gt;, &lt;code&gt;delete_project&lt;/code&gt; or &lt;code&gt;delete_agent&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/exposed-prefect-workflows-could-lead-to-disruptive-attacks/images/fig2.png" title="Obtaining the ID of a task using GraphQL API." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Obtaining the ID of a task using GraphQL API.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/exposed-prefect-workflows-could-lead-to-disruptive-attacks/images/fig3.png" title="Deleting a task which has a specific ID." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Deleting a task which has a specific ID.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;The Risk of Exposed Prefect Instances&lt;span class="hx:absolute hx:-mt-20" id="the-risk-of-exposed-prefect-instances"&gt;&lt;/span&gt;
&lt;a href="#the-risk-of-exposed-prefect-instances" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Prefect instances exposed to the internet don&amp;rsquo;t enable authentication by
default, allowing attackers to delete elements in the platform and disrupt the
everyday work of the organization. This type of attack can affect an
organization in several ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data loss – losing information about workflows, tasks and data from previous
deployments&lt;/li&gt;
&lt;li&gt;Disruption – workflows are a key utility leveraged by different teams to
accomplish tasks. Damage in a company&amp;rsquo;s Prefect instance affects all of the
teams from that company that use the platform and the clients that depend on
the service(s) provided by the victim company. For example, a company that
uses workflows to automate its purchasing process could be blocked from
making transactions until the issue is resolved. Another example is the
disruption of client onboarding processes powered by automated workflows&lt;/li&gt;
&lt;li&gt;Delays in project deployment – teams and customers relying on workflows to
accomplish tasks most likely would experience delays since it takes time to
restore the platform or even set up a new one. For example, a business that
uses automated workflows to send emails to its customers could experience
delays. In addition, disruption of a service could tarnish a company&amp;rsquo;s brand
and reputation resulting in financial loss&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Stay Secure&lt;span class="hx:absolute hx:-mt-20" id="stay-secure"&gt;&lt;/span&gt;
&lt;a href="#stay-secure" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Misconfigurations are the number one cause of security breaches in the cloud
today. Companies exposing their instances to the internet without enforcing
authentication is always a bad idea, especially if the platform provides a
powerful API that can also be leveraged by attackers. While Prefect is more
secure than workflow platforms like Argo and Airflow, exposed Prefect
deployments are still candidates for disruptive attacks in which attackers can
alter the workflow environment and greatly damage the company that uses the
platform. We advise on adding firewall rules to hide the instance from the
internet and ensure that authentication is configured. If the application does
not offer sufficient authentication mechanisms, consider leveraging tools
provisioned by the cloud provider to implement your own authentication such as
GCP&amp;rsquo;s Identity-Aware Proxy or AWS&amp;rsquo;s Session Manager.&lt;/p&gt;</description></item><item><title>Misconfigured Airflows Leak Thousands of Credentials from Popular Services</title><link>https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/</link><pubDate>Mon, 04 Oct 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/</guid><description>
&lt;p&gt;&lt;em&gt;This research refers to misconfigured Apache Airflow managed by individuals or
organizations (&amp;lsquo;users&amp;rsquo;). As a result of the misconfiguration, the credentials
of users are exposed, including their own credentials to the different
platforms, applications and services mentioned in this article. This article
doesn&amp;rsquo;t refer to exposed credentials of the entities behind the development of
the platforms, applications and services themselves.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Apache Airflow is the #1 starred open-source workflows application on GitHub&lt;span class="hx:absolute hx:-mt-20" id="apache-airflow-is-the-1-starred-open-source-workflows-application-on-github"&gt;&lt;/span&gt;
&lt;a href="#apache-airflow-is-the-1-starred-open-source-workflows-application-on-github" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Workflow management platforms are an indispensable tool for automating business
and IT tasks. These platforms make it easier to create, schedule and monitor
workflows. They are typically hosted on the cloud to provide increased
accessibility and scalability. On the flip side, misconfigured instances that
allow internet-wide access make these platforms ideal candidates for
exploitation by attackers.&lt;/p&gt;
&lt;p&gt;While researching a misconfiguration in the popular workflow platform, Apache
Airflow, we discovered a number of unprotected instances. These unsecured
instances expose sensitive information of companies across the media, finance,
manufacturing, information technology (IT), biotech, e-commerce, health,
energy, cybersecurity, and transportation industries. In the vulnerable
Airflows, we see exposed credentials for popular platforms and services such as
Slack, PayPal, AWS and more.&lt;/p&gt;
&lt;h2&gt;Key Findings&lt;span class="hx:absolute hx:-mt-20" id="key-findings"&gt;&lt;/span&gt;
&lt;a href="#key-findings" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;A number of misconfigured Airflow instances have exposed the credentials of
popular services including cloud hosting providers, payment processing, and
social media platforms.&lt;/li&gt;
&lt;li&gt;Exposing secrets such as user credentials can cause data leakage or provide
attackers with the ability to spread further in the system.&lt;/li&gt;
&lt;li&gt;Customer data exposed as a result of a data leak can lead to violation of
data protection laws and the possibility of legal action.&lt;/li&gt;
&lt;li&gt;There is also the possibility that malicious code execution and malware can
be launched on the exposed production environments and even on Apache Airflow
itself.&lt;/li&gt;
&lt;li&gt;We have notified the identified entities to fix their misconfigured Airflow
instances as part of the responsible disclosure policy.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All Apache Airflow users are urged to update to the latest version immediately
and make sure their deployments are only accessible to authorized users. In
addition, adopt &lt;a href="#secure-coding-practices"&gt;secure coding practices&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What is Apache Airflow?&lt;span class="hx:absolute hx:-mt-20" id="what-is-apache-airflow"&gt;&lt;/span&gt;
&lt;a href="#what-is-apache-airflow" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Apache Airflow is an open-source workflow management platform. The platform
simplifies the process of creating and managing complex workflows. Airflow
provides plug-and-play integrations with many technologies. Its
&lt;a href="https://github.com/apache/airflow/"target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt; repository has 22.8K stars, making
it the world&amp;rsquo;s most
&lt;a href="https://www.datarevenue.com/en-blog/airflow-vs-luigi-vs-argo-vs-mlflow-vs-kubeflow"target="_blank" rel="noopener"&gt;popular&lt;/a&gt;
open-source workflow project.&lt;/p&gt;
&lt;p&gt;Airflow uses standard Python to create and schedule workflows, providing users
with a dynamic and convenient way to work with the platform. There are several
concepts and features in Airflow that make it flexible and popular among users:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Directed Acyclic Graph (DAG) – the primary concept in Airflow that represents
a collection of tasks with defined dependencies and relationships.&lt;/li&gt;
&lt;li&gt;Task – the basic unit of execution in Airflow, with each node in the DAG
represented by a task.&lt;/li&gt;
&lt;li&gt;Variables – a way to store content and settings in a key value storage,
including passwords and API keys that are stored as masked strings. Airflow
also supports variable encryption using
&lt;a href="https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html#security-fernet"target="_blank" rel="noopener"&gt;Fernet&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Connections – A feature that stores parameters (username, password, host)
needed to connect to external systems.&lt;/li&gt;
&lt;li&gt;Logs – Airflow supports logging mechanisms as well as the ability to emit
metrics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Version 1 of Airflow was released in
&lt;a href="https://github.com/apache/airflow/releases/tag/1.0.0"target="_blank" rel="noopener"&gt;2015&lt;/a&gt;. From the new web
server UI from version 1.10.0 many security changes were included, for
instance, removing the dangerous Ad Hoc query. In December 2020, version 2.0.0
was released and included many changes in functionality, performance, UI, and
security of the platform.&lt;/p&gt;
&lt;p&gt;Version 2 presents a new REST API that requires authentication for all
operations, including logging into the platform. Additionally, the logs do not
not contain sensitive information and specification of the Fernet key is
required for variable encryption. Finally, the configuration is adapted. This
means that several fields are deprecated and other settings require explicit
values rather than using default values. Most of our research is focused on the
older, less secure versions of Apache Airflow, which also emphasizes the risks
associated with procrastinating on making software updates.&lt;/p&gt;
&lt;h2&gt;Misconfiguration Risk&lt;span class="hx:absolute hx:-mt-20" id="misconfiguration-risk"&gt;&lt;/span&gt;
&lt;a href="#misconfiguration-risk" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Credential Exposure&lt;span class="hx:absolute hx:-mt-20" id="credential-exposure"&gt;&lt;/span&gt;
&lt;a href="#credential-exposure" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;One of the main risks of a misconfigured Airflow instance is the credentials
that are exposed with it. These credentials can give a threat actor access to
legitimate accounts and databases, with the ability to perform lateral
movement. If a large number of passwords are visible, a threat actor can also
use this data to detect patterns and common words to infer other passwords.
These can be leveraged in dictionary or brute-force-style attacks against other
platforms. Popular platforms that we found with exposed credentials as a result
of misconfigured Airflow instances include database passwords, API keys, and
cloud credentials. These include but are not limited to:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Most of these credentials are exposed through insecure coding practices. We
document some of the ways in which the credentials have been exposed below.&lt;/p&gt;
&lt;h4&gt;Insecure Coding Practices&lt;span class="hx:absolute hx:-mt-20" id="insecure-coding-practices"&gt;&lt;/span&gt;
&lt;a href="#insecure-coding-practices" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The most common way to leak credentials in Airflow is through insecure coding
practices. We discovered many instances with hardcoded passwords inside the
Python DAG code. An example of a hardcoded password for a production PostgreSQL
database is shown below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig2.png" title="Hardcoded PostgreSQL password in DAG code." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Hardcoded PostgreSQL password in DAG code.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;Variables&lt;span class="hx:absolute hx:-mt-20" id="variables"&gt;&lt;/span&gt;
&lt;a href="#variables" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The next most common way for credentials to be leaked is through the
&amp;lsquo;variables&amp;rsquo; feature in Airflow. The variables feature allows a user to define a
variable value that is able to be globally used across all DAG scripts. It is
very common to see hardcoded passwords in these variables. An example of a
Slack token used in a variable is shown below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig3.png" title="Hardcoded Slack token in variables." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Hardcoded Slack token in variables.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;Connections&lt;span class="hx:absolute hx:-mt-20" id="connections"&gt;&lt;/span&gt;
&lt;a href="#connections" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Connections are the correct way to store credentials in Airflow. When a
connection with a password or token is added to Airflow, the password is
&lt;a href="https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html#securing-connections"target="_blank" rel="noopener"&gt;securely encrypted&lt;/a&gt;
in a database using the Fernet key. In some cases, this feature is misused and
the credentials are stored in the &lt;code&gt;Extra&lt;/code&gt; field of the connection in plaintext.
This means that they are not encrypted and can be viewed by anyone. An example
with an AWS key stored in the extra field is shown below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig4.png" title="AWS key located in misused connection." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;AWS key located in misused connection.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;Logs&lt;span class="hx:absolute hx:-mt-20" id="logs"&gt;&lt;/span&gt;
&lt;a href="#logs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;In versions of Airflow prior to 1.10.13, credentials added via the
&lt;a href="https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html#creating-a-connection-from-the-cli"target="_blank" rel="noopener"&gt;command line interface (CLI)&lt;/a&gt;
would be logged in plaintext in the logs section; now registered as
&lt;a href="https://www.cvedetails.com/cve/CVE-2020-17511/"target="_blank" rel="noopener"&gt;CVE-2020-17511&lt;/a&gt;. Below shows a
log entry for a SQL Lakehouse platform.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig5.png" title="Password located in logs." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Password located in logs.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h4&gt;Configuration&lt;span class="hx:absolute hx:-mt-20" id="configuration"&gt;&lt;/span&gt;
&lt;a href="#configuration" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;The configuration file (airflow.cfg) is created when Airflow is first started.
It contains Airflow&amp;rsquo;s configuration and it is able to be changed. This file can
contain sensitive information such as passwords and keys. If the setting in the
file &lt;code&gt;expose_config&lt;/code&gt; is set to &lt;code&gt;True&lt;/code&gt;, anyone can access the configuration from
the web server UI. Accessing from the UI can expose credentials. It is common
to see plaintext fernet keys in these files as shown below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig6.png" title="Key located in exposed configuration file." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Key located in exposed configuration file.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Leakage of Sensitive Data&lt;span class="hx:absolute hx:-mt-20" id="leakage-of-sensitive-data"&gt;&lt;/span&gt;
&lt;a href="#leakage-of-sensitive-data" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Many Airflow instances contain sensitive information. When these instances are
exposed to the internet the information becomes accessible to everyone, since
the authentication is disabled.&lt;/p&gt;
&lt;p&gt;Leakage of sensitive data essentially means that attackers have access to
information on the organization that owns the exposed server. They can steal
and use the information in many ways. For example, attackers can use leaked
information to gather more information about the organization (reconnaissance
stage as defined in
&lt;a href="https://www.lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html"target="_blank" rel="noopener"&gt;The Cyber Kill Chain®&lt;/a&gt;)
and launch an attack that is tailored towards that organization. Leaked
information can also reveal details about the compromised organization&amp;rsquo;s
clients. The consequences of data leakage can lead to serious reputational
damage for the company and the potential loss of existing and potential new
clients.&lt;/p&gt;
&lt;p&gt;In versions prior to v1.10 of Airflow, there is a feature that lets users run
Ad Hoc database queries and get results from the database. While this feature
can be handy, it is also very dangerous because on top of there being no
authentication, anyone with access to the server can get information from the
database.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig7.png" title="Screenshot of the Ad Hoc Query feature in Airflow UI." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Screenshot of the Ad Hoc Query feature in Airflow UI.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Many exposed Airflow instances that we found revealed information about the
services and platforms that companies are using in their software development
environments. For example, several instances included the private names of
Docker images or internal dependencies used in the workflow. Exposing
information about tools and packages used in the organization&amp;rsquo;s infrastructure
can jeopardize the organization and also be leveraged by threat actors in
supply chain attacks. This can lead to attacks that leverage dependency or
image short names to deliver malicious code instead of the intended code. A
really good example of this type of attack is covered
&lt;a href="https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610"target="_blank" rel="noopener"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig8.png" title="Private container registry." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Private container registry.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Legal Action&lt;span class="hx:absolute hx:-mt-20" id="legal-action"&gt;&lt;/span&gt;
&lt;a href="#legal-action" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Exposing customer information can also lead to violation of data protection
laws and the possibility of legal action. One such data protection law is
General Data Protection Regulation (GDPR), which applies to organizations
handling the data of European citizens or any entities located in the European
Union (EU). Violating this law by leaking sensitive customer information can
lead to sizable administrative fines.&lt;/p&gt;
&lt;p&gt;Disruption of clients&amp;rsquo; operations through poor cybersecurity practices can also
result in legal action such as class action lawsuits. In the May 2021 Colonial
Pipeline hack, consumers that had their business disrupted
&lt;a href="https://www.washingtonpost.com/technology/2021/07/25/ransomware-class-action-lawsuit/"target="_blank" rel="noopener"&gt;filed class action lawsuits&lt;/a&gt;
against Colonial Pipeline.&lt;/p&gt;
&lt;h3&gt;Malware&lt;span class="hx:absolute hx:-mt-20" id="malware"&gt;&lt;/span&gt;
&lt;a href="#malware" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;There is also the possibility that Airflow plugins or features can be abused to
run malicious code. An example of how an attacker can abuse a native
&amp;lsquo;Variables&amp;rsquo; feature in Airflow is if any code or images placed in the variables
form is used to build evaluated code strings.&lt;/p&gt;
&lt;p&gt;Variables are able to be edited by any visiting user which means that malicious
code could be injected. One entity we observed was using variables to store
internal container image names to execute. These container image variables
could be edited and swapped out with an image containing and running
unauthorized or malicious code.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig9.png" title="Image name variables vulnerable to exploitation." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Image name variables vulnerable to exploitation.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Another possible route for malicious code execution can come through unofficial
third-party plugins. In some instances, we noticed that the plugin
&lt;a href="https://github.com/andreax79/airflow-code-editor"target="_blank" rel="noopener"&gt;&lt;code&gt;airflow-code-editor&lt;/code&gt;&lt;/a&gt; was
being used. This can be leveraged to edit DAGs to include malicious code that
can then be triggered from the UI. Of all the exposed instances, we noted only
a small percentage using these types of vulnerable plugins.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/10/misconfigured-airflows-leak-credentials/images/fig10.png" title="Vulnerable code editor plugin." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Vulnerable code editor plugin.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Mitigation&lt;span class="hx:absolute hx:-mt-20" id="mitigation"&gt;&lt;/span&gt;
&lt;a href="#mitigation" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Versioning&lt;span class="hx:absolute hx:-mt-20" id="versioning"&gt;&lt;/span&gt;
&lt;a href="#versioning" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Airflow made great progress in terms of security features implemented in
version 2.0. The changes included the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The dangerous Ad Hoc query was removed from the GUI.&lt;/li&gt;
&lt;li&gt;The logs do not leak information.&lt;/li&gt;
&lt;li&gt;Enforced login and authentication required for all operations in the REST
API.&lt;/li&gt;
&lt;li&gt;Security tab was added to the dashboard. It provides information about users
and the permissions they have for each menu in the dashboard.&lt;/li&gt;
&lt;li&gt;The configuration file is more strict and requires explicit specifications of
configuration values rather than using default values.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In light of the major changes made in version 2, it is strongly recommended to
update the version of all Airflow instances to the latest version. Make sure
that only authorized users can connect.&lt;/p&gt;
&lt;h3&gt;Secure Coding Practices&lt;span class="hx:absolute hx:-mt-20" id="secure-coding-practices"&gt;&lt;/span&gt;
&lt;a href="#secure-coding-practices" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Secure coding practices should be adopted whenever possible. Passwords should
not be hardcoded and the long names of images and dependencies should be
utilized. You will not be protected when using poor coding practices even if
you believe the application is firewalled off to the internet.&lt;/p&gt;
&lt;p&gt;The connections should be utilized in the proper way specified by Airflow for
maximum security. That process for managing connections is documented
&lt;a href="https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html"target="_blank" rel="noopener"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If there is sensitive information that can not be placed within the
connections, consider using environment variables instead.&lt;/p&gt;
&lt;h2&gt;Detecting Attackers Exploiting Misconfigurations&lt;span class="hx:absolute hx:-mt-20" id="detecting-attackers-exploiting-misconfigurations"&gt;&lt;/span&gt;
&lt;a href="#detecting-attackers-exploiting-misconfigurations" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Misconfigurations and broken access control are among the top reasons for
access to unauthorized functionality and data. If you don&amp;rsquo;t believe us, check
out our research about misconfigurations in another popular workflow platform
called
&lt;a href="../../../2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/"&gt;Argo Workflows&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the event that an attacker has already exploited a misconfiguration or
vulnerability, you will need to detect and terminate the malicious or
unauthorized code in your production environment as soon as it is executed.&lt;/p&gt;</description></item><item><title>Guide to Digital Forensics Incident Response in the Cloud</title><link>https://research.intezer.com/blog/2021/08/guide-to-digital-forensics-incident-response-in-the-cloud/</link><pubDate>Wed, 11 Aug 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/08/guide-to-digital-forensics-incident-response-in-the-cloud/</guid><description>
&lt;p&gt;Enterprises today rely on a wide range of cloud services—infrastructure as a
service (IaaS), platform as a service (PaaS), software as a service (SaaS), and
more—to meet their business needs. But the growing popularity of cloud has also
led to an increase in attacks on cloud infrastructure, and thus the need for
companies to develop strong security and incident response skills. Before we
dive into incident response in the cloud, however, it&amp;rsquo;s important to
distinguish between the responsibility of the cloud service provider (CSP) and
that of the cloud consumer. According to the &amp;ldquo;shared responsibility model,&amp;rdquo; the
CSP is responsible for securing the cloud, while security in the cloud falls on
the customer. This means it&amp;rsquo;s the client&amp;rsquo;s job to protect their workloads
(including applications, systems, and code) running on the CSP&amp;rsquo;s platform. With
this responsibility placed on the customer, how they respond to an attack can
have a significant impact on the mitigation of security breaches. But incidents
in the cloud, such as those involving your EC2s, differ from those occurring
on-premises (e.g., involving endpoints). This poses new challenges for incident
response teams and requires different approaches. In this blog, we cover the
differences between cloud forensics and forensics in on-premises systems. We
also take a look at the incident response process for a real attack that was
spotted in the wild.&lt;/p&gt;
&lt;h2&gt;Incident Response: Cloud vs. Endpoint&lt;span class="hx:absolute hx:-mt-20" id="incident-response-cloud-vs-endpoint"&gt;&lt;/span&gt;
&lt;a href="#incident-response-cloud-vs-endpoint" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The incident response process involves a skilled response or security team
gathering the information needed in order to conduct a thorough investigation
of the incident. But incident response in the cloud presents obstacles that
don&amp;rsquo;t exist when investigating standard endpoints. The main difference between
cloud and on-premises systems is the degree of access and control a user has
over resources. On-premises systems provide users full access to both hardware
and software, while access in the cloud is limited depending on the type of
service being used and the service provider. Because cloud systems are
distributed, the forensic evidence may be spread out across the globe, making
it difficult to gather all of the information needed to investigate. These
factors need to be taken into consideration. The challenges of incident
response in the cloud can be divided into six categories, each of which are
covered below.&lt;/p&gt;
&lt;h3&gt;Collecting Forensic Evidence&lt;span class="hx:absolute hx:-mt-20" id="collecting-forensic-evidence"&gt;&lt;/span&gt;
&lt;a href="#collecting-forensic-evidence" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;When investigating incidents on endpoint or on-premises systems, the
investigator has full access to all of the resources, including logs, memory
dumps, hard drives, and more. But this isn&amp;rsquo;t the case in a cloud environment.
First, access to the forensics data depends on the cloud model. For instance,
IaaS customers will have access to more data relative to SaaS customers. For
example, let&amp;rsquo;s assume attackers gained access to a messaging application (SaaS)
used by company employees and stole sensitive data. In order to obtain the
compromised/malicious account information (e.g., IP addresses and logs), the
company would have to contact the messaging application and ask them to provide
this information. On the other hand, if attackers gained access to an EC2
(IaaS) instance, as long as you have basic logging and monitoring capabilities,
you&amp;rsquo;d be able to access more information on your own, without the help of the
CSP.
&lt;a href="https://link.springer.com/content/pdf/10.1007%2F978-3-319-07881-6_19.pdf"target="_blank" rel="noopener"&gt;CSPs are not inclined to provide logs and data&lt;/a&gt;
for fear of exposing sensitive information that could compromise them or their
customers. In other cases, they may be reluctant to do so because they simply
don&amp;rsquo;t know how to handle the event. If customers of service models like PaaS
and SaaS depend on their CSP for logs, they may not have access to important
information needed in order to conduct a thorough investigation. On the other
hand, customers using IaaS have greater control and the ability to set up
different logs. Customers should therefore configure logs and especially what
to log. But logging everything isn&amp;rsquo;t the best solution, since this results in a
huge amount of information that needs to be filtered, analyzed, and stored.
Sifting through such large amounts of data during an investigation can be
overwhelming and time-consuming. While CSPs provide logging services, the more
logs your system produces, the more expensive it will be. The cost will also
depend on whether you&amp;rsquo;re using
&lt;a href="https://aws.amazon.com/cloudwatch/pricing/"target="_blank" rel="noopener"&gt;AWS&lt;/a&gt;,
&lt;a href="https://azure.microsoft.com/en-us/pricing/details/monitor/"target="_blank" rel="noopener"&gt;Azure&lt;/a&gt;, or
&lt;a href="https://cloud.google.com/stackdriver/pricing"target="_blank" rel="noopener"&gt;GCP&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Data is Volatile or Not Saved&lt;span class="hx:absolute hx:-mt-20" id="data-is-volatile-or-not-saved"&gt;&lt;/span&gt;
&lt;a href="#data-is-volatile-or-not-saved" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The incident response process is based on collecting information, including
events that happened prior to the incident. CSPs provide clients with many
tools that need to be configured according to your organization&amp;rsquo;s needs. This
means the amount of data you can collect depends on what you choose to log and
store, as well as the time period for which the data is stored. In an IaaS like
AWS, the data stored on the instances is lost after termination of the machine.
As a result,
&lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/recovery-terminated-instance/"target="_blank" rel="noopener"&gt;important evidence is lost&lt;/a&gt;,
including commands, scripts, processes, and files. Attackers can take advantage
of this data loss to hide their malicious activity once they&amp;rsquo;ve completed their
task.&lt;/p&gt;
&lt;h3&gt;No Physical Evidence&lt;span class="hx:absolute hx:-mt-20" id="no-physical-evidence"&gt;&lt;/span&gt;
&lt;a href="#no-physical-evidence" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;In the cloud, systems are distributed, and the physical components on which the
data is stored may be in different geographic locations. This can make it
nearly impossible to acquire the physical evidence or to perform physical
forensics. Since each country has different laws, the process of seizing
hardware involves collaboration between different governing legal authorities,
which is a long and complicated process, with no guarantee the drives can be
retrieved. Without access to the physical drives, investigators need to ensure
they&amp;rsquo;re using the appropriate forensics tools, since many rely on access to
hardware. This has created a real need for new tools developed specifically for
cloud forensics.&lt;/p&gt;
&lt;h3&gt;Chain of Custody and Privacy Laws&lt;span class="hx:absolute hx:-mt-20" id="chain-of-custody-and-privacy-laws"&gt;&lt;/span&gt;
&lt;a href="#chain-of-custody-and-privacy-laws" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Due to the nature of cloud computing and the way data is stored, a single
physical hard drive may contain the information of multiple customers. CSPs
must notify clients that their data is protected and logically segmented from
other tenants so they know other tenants can&amp;rsquo;t access their information—and
vice versa. This makes collecting data from the hard drive complicated, and
ultimately, only the CSP will be able to do so. If evidence is presented in a
court of law, the investigators must maintain the chain of custody of that
evidence throughout the investigation. This becomes a major challenge due to
multi-jurisdictional laws, further compounded when CSPs and other third-party
companies join in the evidence collection process.&lt;/p&gt;
&lt;h3&gt;CSP Limitations&lt;span class="hx:absolute hx:-mt-20" id="csp-limitations"&gt;&lt;/span&gt;
&lt;a href="#csp-limitations" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;When an incident occurs, especially in SaaS and PaaS infrastructures,
investigators must rely on the CSP to assist in the investigation. Another
challenge is the dependency between CSPs and third parties. For example, a
provider of email services may use a third-party platform to host its
infrastructure. In the event of an incident, the investigators would have to
collaborate with all of the entities in this chain of dependencies, each with
their own incident response approaches and methods. Once again, this
prolongates the
&lt;a href="../../../2022/01/save-incident-response-time-intezer-analyze/"&gt;incident response time&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Service-Level Agreement (SLA)&lt;span class="hx:absolute hx:-mt-20" id="service-level-agreement-sla"&gt;&lt;/span&gt;
&lt;a href="#service-level-agreement-sla" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;When it comes to SLAs, important terms related to forensics are often missing.
This is due to both the failure of CSPs to provide full transparency in this
regard as well as a lack of customer awareness on the matter. In the case of an
incident, this creates an additional barrier for customers attempting to
collect all the evidence needed for the investigation process.&lt;/p&gt;
&lt;h2&gt;Overcoming the Challenges of Incident Response in the Cloud&lt;span class="hx:absolute hx:-mt-20" id="overcoming-the-challenges-of-incident-response-in-the-cloud"&gt;&lt;/span&gt;
&lt;a href="#overcoming-the-challenges-of-incident-response-in-the-cloud" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The
&lt;a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-61r2.pdf"target="_blank" rel="noopener"&gt;incident response lifecycle&lt;/a&gt;
can be broken down into four phases, as outlined by the National Institute of
Standards and Technology (NIST). As visible from Figure 1, the process is
cyclical, meaning it is an ongoing learning process whereby organizations can
continue to improve their prevention and response methods.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/08/guide-to-digital-forensics-incident-response-in-the-cloud/images/fig1.png" title="Figure 1: Cycle of incident response (Source: The National Institute of Standards and Technology)" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 1: Cycle of incident response (Source: The National Institute of Standards and Technology)&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The challenges of incident response in the cloud are complex, and not all can
be solved at once. However, there are actions that can be taken in the various
stages of the process to help you better handle and investigate incidents.&lt;/p&gt;
&lt;h3&gt;Preparation Stage&lt;span class="hx:absolute hx:-mt-20" id="preparation-stage"&gt;&lt;/span&gt;
&lt;a href="#preparation-stage" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Preparation is the most important stage. When your systems are well configured
and your software is up to date, your response team will be prepared. This
reduces incident handling time and even prevents attacks from happening in the
first place.&lt;/p&gt;
&lt;h4&gt;Setting Logs&lt;span class="hx:absolute hx:-mt-20" id="setting-logs"&gt;&lt;/span&gt;
&lt;a href="#setting-logs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Logging events in the cloud is the key to proper incident handling. If your
cloud provider offers logging options, you should use them. Just remember,
logging everything isn&amp;rsquo;t ideal; instead, carefully choose which events and
resources should be logged. For example, in order to set notifications for
suspicious activities such as unusual access to secrets in your company&amp;rsquo;s cloud
account, you can configure
&lt;a href="https://docs.aws.amazon.com/cloudtrail/index.html"target="_blank" rel="noopener"&gt;CloudTrail&lt;/a&gt; to log these
events. Each provider has its own set of recommendations, so be sure to follow
the CIS benchmark best practices for the CSP you are using, whether
&lt;a href="https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-cis_aws_benchmark_level_1.html"target="_blank" rel="noopener"&gt;AWS&lt;/a&gt;,
&lt;a href="https://docs.microsoft.com/en-us/azure/security/fundamentals/operational-best-practices"target="_blank" rel="noopener"&gt;Azure&lt;/a&gt;,
or &lt;a href="https://cloud.google.com/security/best-practices"target="_blank" rel="noopener"&gt;GCP&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Rules and Permissions&lt;span class="hx:absolute hx:-mt-20" id="rules-and-permissions"&gt;&lt;/span&gt;
&lt;a href="#rules-and-permissions" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Set permissions and rules for each user and group based on the principle of
least privilege policy, where a user is given the minimum level of access and
permissions they need to do their job. For example, each development team
should only have access to the repositories and servers relevant to their
specific departments, and developers should have permissions to add new code
only to projects they are currently working on. But members of the finance
department—or any other department that doesn&amp;rsquo;t require it—shouldn&amp;rsquo;t have
access to any of these resources.&lt;/p&gt;
&lt;h4&gt;Zero Trust&lt;span class="hx:absolute hx:-mt-20" id="zero-trust"&gt;&lt;/span&gt;
&lt;a href="#zero-trust" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Use the zero trust approach when configuring your network. Based on this
concept, no device is trusted until its integrity and identity are verified.
There are many ways to apply this model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implement a network and logical segmentation on the VPC in
&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"target="_blank" rel="noopener"&gt;AWS&lt;/a&gt;,
&lt;a href="https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview"target="_blank" rel="noopener"&gt;Azure Virtual Network&lt;/a&gt;
(VNet), or &lt;a href="https://cloud.google.com/vpc"target="_blank" rel="noopener"&gt;GCP&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For access control:
&lt;ul&gt;
&lt;li&gt;Identify all of the company&amp;rsquo;s employees and configure roles for each of
them.&lt;/li&gt;
&lt;li&gt;Manage company devices (e.g., laptops) and verify their integrity using
&lt;a href="https://www.manageengine.com/mobile-device-management/what-is-mdm.html"target="_blank" rel="noopener"&gt;MDM&lt;/a&gt;
solutions such as
&lt;a href="https://jumpcloud.com/blog/hosted-mdm-solution"target="_blank" rel="noopener"&gt;JumpCloud&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Map permissions for each asset to each role in the company.&lt;/li&gt;
&lt;li&gt;Map the application employees need to use and implement SSO authentication.&lt;/li&gt;
&lt;li&gt;Implement two-factor authentication (2FA).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Notifications&lt;span class="hx:absolute hx:-mt-20" id="notifications"&gt;&lt;/span&gt;
&lt;a href="#notifications" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Add alarms and notifications for specific events, but try to minimize false
positive alerts. There are two types of alerts; those that are triggered by a
user&amp;rsquo;s actions and those that come from system and metrics events. It&amp;rsquo;s
important to configure both types, but the configuration of events that will
trigger alerts also depends on your company&amp;rsquo;s organizational behavior. Examples
include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User alerts: If all of your company employees use the same VPN configuration,
setting a geolocation login alert will notify you of any suspicious login
attempts that do not originate from your VPN.&lt;/li&gt;
&lt;li&gt;System alerts: If your cloud infrastructure doesn&amp;rsquo;t typically require high
CPU and memory usage, setting an alert for high usage will allow you to
address any anomalies in the system.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Prepare in Advance for Different Types of Attacks&lt;span class="hx:absolute hx:-mt-20" id="prepare-in-advance-for-different-types-of-attacks"&gt;&lt;/span&gt;
&lt;a href="#prepare-in-advance-for-different-types-of-attacks" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Make sure you&amp;rsquo;re ready for whatever type of attack comes your way:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Backup and recovery: Develop a recovery plan and maintain up-to-date backups
of your organization&amp;rsquo;s most valuable data. Using cloud backups, which employs
versioning to make copies of all your files, will ensure continuous backup
and make it easier to restore data after any attacks.&lt;/li&gt;
&lt;li&gt;Playbooks: Prepare a playbook of routines and the actions for different
incident scenarios.&lt;/li&gt;
&lt;li&gt;Recovery drills: Prepare a recovery drill to test your backups so you&amp;rsquo;re
fully prepared to use them when they are most needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These preparations can help with many different incidents, such as DDoS attacks
that prevent customers from accessing your system, or ransomware attacks that
encrypt all the files in your environment. Following the principles of chaos
engineering, you can use automated tools like
&lt;a href="https://github.com/Netflix/chaosmonkey"target="_blank" rel="noopener"&gt;Chaos Monkey&lt;/a&gt; to test your system&amp;rsquo;s
resilience. Last, define the impacts and prioritize risks for every component
in your environment, so you know where to put your best efforts during an
incident.&lt;/p&gt;
&lt;h4&gt;Know Your Runtime&lt;span class="hx:absolute hx:-mt-20" id="know-your-runtime"&gt;&lt;/span&gt;
&lt;a href="#know-your-runtime" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Knowing what code is being executed in your environment makes it easy to detect
any unauthorized code that could be part of an attack. A cloud workload
protection platform (CWPP) that monitors your runtime and alerts you on the
execution of code that deviates from your known code baseline will help you
identify and stop attacks in their earliest stages.&lt;/p&gt;
&lt;h4&gt;Fix Misconfigurations&lt;span class="hx:absolute hx:-mt-20" id="fix-misconfigurations"&gt;&lt;/span&gt;
&lt;a href="#fix-misconfigurations" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Cloud infrastructure can be complex, with many components and services that
need to be configured. This increases your opportunity for error. Scanning your
cloud environment for misconfigurations is important, because attackers are
scanning as well. And if they find it before you do, the consequences can be
catastrophic. There are many cloud security posture management (CSPM) tools
that can be used for misconfiguration scanning. A few examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GCP&amp;rsquo;s
&lt;a href="https://cloud.google.com/security-command-center/"target="_blank" rel="noopener"&gt;Security Command Center&lt;/a&gt;
(SCC).&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloudsploit.com/opensource"target="_blank" rel="noopener"&gt;CloudSploit&lt;/a&gt;, an open-source project
that finds security misconfigurations in cloud infrastructures.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/OpenCSPM/opencspm"target="_blank" rel="noopener"&gt;OpenCSPM&lt;/a&gt;, an open-source project that
provides visibility over the configuration of the cloud infrastructure.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Patch Vulnerabilities and Install System Updates&lt;span class="hx:absolute hx:-mt-20" id="patch-vulnerabilities-and-install-system-updates"&gt;&lt;/span&gt;
&lt;a href="#patch-vulnerabilities-and-install-system-updates" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Keeping all the components of your cloud environment updated and patched can
prevent attacks from happening in the first place. There are several
open-source projects, such as &lt;a href="https://github.com/future-architect/vuls"target="_blank" rel="noopener"&gt;Vuls&lt;/a&gt;,
&lt;a href="https://www.openvas.org/"target="_blank" rel="noopener"&gt;OpenVAS&lt;/a&gt;, and
&lt;a href="https://github.com/XTLS/Xray-core"target="_blank" rel="noopener"&gt;Xray&lt;/a&gt;, that can be used for vulnerability
scanning.&lt;/p&gt;
&lt;h3&gt;Detection and Analysis&lt;span class="hx:absolute hx:-mt-20" id="detection-and-analysis"&gt;&lt;/span&gt;
&lt;a href="#detection-and-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;So if you&amp;rsquo;ve done everything you can to reduce the likelihood of an attack,
where do you start when one happens? First, collect all of the information that
indicates that an incident is occurring in the system, including logs, IP
addresses, affected accounts, virtual images of the victim hosts, commands and
scripts that are being executed, and so on. Next, analyze the evidence to
better understand the incident and how you should respond to it. For example,
let&amp;rsquo;s assume you got an alert on the creation of several new AWS instances. The
first thing to check is the CloudTrial logs, where you&amp;rsquo;ll find RunInstances
events as shown in Figure 2 below.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/08/guide-to-digital-forensics-incident-response-in-the-cloud/images/fig2.png" title="Figure 2: AWS CloudTrail logs showing RunInstances events" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Figure 2: AWS CloudTrail logs showing RunInstances events&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;After you isolate the instances and connect securely (not from your personal
computer), you find a suspicious file in the &lt;code&gt;/tmp/kdevtmpfsi&lt;/code&gt; directory. After
extracting the file from the machine either you or the threat analysis team
will analyze the file and the events that led to the execution of the malware
in an attempt to understand the threat and the damage to the environment. This
process may take a long time especially for sophisticated threats.&lt;/p&gt;
&lt;h3&gt;Containment, Eradication, and Recovery&lt;span class="hx:absolute hx:-mt-20" id="containment-eradication-and-recovery"&gt;&lt;/span&gt;
&lt;a href="#containment-eradication-and-recovery" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;The next stage in the process involves:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Identifying and isolating the hosts or containers that were attacked to
prevent the attack from spreading in the network.&lt;/li&gt;
&lt;li&gt;Making a snapshot/copy of the instance and the volume that was attacked to
preserve the evidence. Preserving the evidence is important for investigation
of the incident. It will help you learn how the attackers got into the
system, find compromised hosts, and understand the attack flow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Post Incident&lt;span class="hx:absolute hx:-mt-20" id="post-incident"&gt;&lt;/span&gt;
&lt;a href="#post-incident" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Once the incident is over:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Complete an incident response report and share it with relevant stakeholders
in the organization so they can read and understand it. It&amp;rsquo;s important to
document the investigation and findings to prevent similar events in the
future, improve the incident response process, and to fix and add security
measures.&lt;/li&gt;
&lt;li&gt;Learn the kill chain of the attack based on the evidence you gathered, and
monitor your systems for post-incident activity.&lt;/li&gt;
&lt;li&gt;If the incident was caused by misconfigurations or vulnerabilities, make sure
to patch and fix them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Getting Started&lt;span class="hx:absolute hx:-mt-20" id="getting-started"&gt;&lt;/span&gt;
&lt;a href="#getting-started" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Developing a reliable incident response process in cloud environments is a
complicated and challenging task, with many factors that need to be taken into
account. Even with the precautions detailed in this blog, breaches still
happen—whether due to unknown vulnerabilities/misconfigurations, unauthorized
access, or supply chain attacks. Having strong runtime threat detection and
response capabilities is crucial.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Special thanks to Aner Izraeli for contributing to this post.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>New Attacks on Kubernetes via Misconfigured Argo Workflows</title><link>https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/</link><pubDate>Tue, 20 Jul 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/</guid><description>
&lt;h2&gt;Key Points&lt;span class="hx:absolute hx:-mt-20" id="key-points"&gt;&lt;/span&gt;
&lt;a href="#key-points" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Intezer has detected a new attack vector against Kubernetes (K8s) clusters
via misconfigured Argo Workflows instances.&lt;/li&gt;
&lt;li&gt;Attackers are already taking advantage of this vector as we detected
operators dropping cryptominers using this method in the wild.&lt;/li&gt;
&lt;li&gt;We have identified infected nodes and there is the potential for larger scale
attacks due to hundreds of misconfigured deployments. We have detected
exposed instances of Argo Workflows that belong to companies from different
sectors including technology, finance and logistics.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/argoproj/argo-workflows"target="_blank" rel="noopener"&gt;Argo Workflows&lt;/a&gt; is an
open-source, container-native workflow engine designed to run on K8s
clusters.&lt;/li&gt;
&lt;li&gt;Argo Workflows instances with misconfigured permissions allow threat actors
to run unauthorized code on the victim&amp;rsquo;s environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Overview&lt;span class="hx:absolute hx:-mt-20" id="overview"&gt;&lt;/span&gt;
&lt;a href="#overview" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kubernetes (K8s) is revolutionizing the cloud computing environment, having
become the most popular platform for container orchestration. It is also one of
the most popular repositories on
&lt;a href="https://github.com/kubernetes/kubernetes"target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt;, with over 100,000 commits
and over 3,000 contributors. Each year there is a steady increase in
enterprises using Kubernetes and the number of clusters they deploy. According
to the Cloud Native Computing Foundation (CNCF)
&lt;a href="https://www.cncf.io/wp-content/uploads/2020/11/CNCF_Survey_Report_2020.pdf"target="_blank" rel="noopener"&gt;2020 survey&lt;/a&gt;,
91% of respondents are using Kubernetes, compared to 78% in 2019 and 58% in
2018. In the same survey, it was reported that among the top challenges of
using and deploying containers were complexity, security and lack of training.&lt;/p&gt;
&lt;p&gt;With these challenges that enterprises face using containers and K8s clusters,
there has never been a greater opportunity for attackers to exploit weaknesses
in security. Applications such as &amp;ldquo;Argo Workflows&amp;rdquo; orchestrate parallel jobs in
Kubernetes by providing a friendly user interface and the ability to run CI/CD
pipelines without having to configure &amp;ldquo;complex software development products.&amp;rdquo;
The application is &lt;a href="https://argoproj.github.io/argo-workflows/"target="_blank" rel="noopener"&gt;marketed&lt;/a&gt; to
&amp;ldquo;Easily run compute intensive jobs for machine learning or data processing in a
fraction of the time using Argo Workflows on Kubernetes.&amp;rdquo; Even with products
like Argo helping to reduce the complexity of deployment, there is still always
the possibility of misconfiguration or exploitation.&lt;/p&gt;
&lt;p&gt;Recently, while studying the impact of exposed Argo Workflows instances, we
discovered a number of unprotected instances, operated by companies in several
industries including technology, finance and logistics. Exposed instances can
contain sensitive information such as code, credentials and private container
image names. We also discovered that in many instances, permissions are
configured which allow any visiting user to deploy workflows. We also detected
that some misconfigured nodes are being targeted by threat actors. An example
of an attack found in the wild, launching a popular cryptocurrency miner
container, is described later in this blog.&lt;/p&gt;
&lt;h2&gt;Argo Overview&lt;span class="hx:absolute hx:-mt-20" id="argo-overview"&gt;&lt;/span&gt;
&lt;a href="#argo-overview" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The core resource in Argo is the &amp;ldquo;Workflow.&amp;rdquo; The workflow is defined using a
YAML file containing a &lt;code&gt;spec&lt;/code&gt; for the type of work to be performed. Most
commonly, each step in an Argo workflow is a container. An example &amp;ldquo;Hello
World&amp;rdquo; workflow is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;These workflows are executed from a template or submitted directly through the
Argo user interface, as shown below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;How Argo is Abused by Attackers&lt;span class="hx:absolute hx:-mt-20" id="how-argo-is-abused-by-attackers"&gt;&lt;/span&gt;
&lt;a href="#how-argo-is-abused-by-attackers" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In instances when permissions are misconfigured, it is possible for an attacker
to access an open Argo dashboard and submit their own workflow. In one cluster,
we noticed that a popular cryptocurrency mining container,
&lt;code&gt;kannix/monero-miner&lt;/code&gt;, was being deployed. An example of an in the wild attack,
still running on an exposed cluster for nine months, is shown below.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;kannix/monero-miner&lt;/code&gt; (now removed from Docker Hub) was a popular image
which used XMRig to mine for Monero cryptocurrency. Its ease of use allowed it
to be conveniently used by threat actors of any skill level to conduct
cryptojacking; since all that was required was to change the address of who the
mined cryptocurrency would be deposited to. This same container was mentioned
in a blog post by
&lt;a href="https://azure.microsoft.com/en-us/blog/detect-largescale-cryptocurrency-mining-attack-against-kubernetes-clusters/"target="_blank" rel="noopener"&gt;Azure Security Center&lt;/a&gt;,
which stated that this container was used in a large-scale cryptocurrency
mining attack against Kubernetes clusters.&lt;/p&gt;
&lt;p&gt;In Docker Hub there are still a number of options for Monero mining that
attackers can use. With a simple search it shows that there are at least 45
other containers with millions of downloads.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Using another popular container, &lt;code&gt;giansalex/monero-miner&lt;/code&gt;, we detected an XMRig
Miner running on the cluster via Argo Workflows.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Mitigation Advice&lt;span class="hx:absolute hx:-mt-20" id="mitigation-advice"&gt;&lt;/span&gt;
&lt;a href="#mitigation-advice" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;For a quick check that an instance is misconfigured, try accessing the Argo
Workflows dashboard from an unauthenticated incognito browser outside your
corporate environment. Another option is to query the API of your instance and
check the status code. Make a HTTP GET request to
&lt;code&gt;[your.instance:port]/api/v1/info&lt;/code&gt;. A returned HTTP status code of
&lt;code&gt;401 Unauthorized&lt;/code&gt; while being an unauthenticated user will indicate a
correctly configured instance, whereas a successful status code of
&lt;code&gt;200 Success&lt;/code&gt; could indicate that an unauthorized user is able to access the
instance.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2021/07/new-attacks-on-kubernetes-via-misconfigured-argo-workflows/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;It is critical to ensure that best practices for permissions are followed in
order to prevent unauthorized activity in your environments. Methodologies such
as the
&lt;a href="https://www.cyberark.com/what-is/least-privilege/"target="_blank" rel="noopener"&gt;principle of least privilege&lt;/a&gt;
(PoLP) should be followed and always refer to the
&lt;a href="https://argoproj.github.io/argo-workflows/security/"target="_blank" rel="noopener"&gt;application documentation&lt;/a&gt;
for best practices on security.&lt;/p&gt;
&lt;p&gt;Even if your cluster is deployed on a
&lt;a href="https://intezer.com/blog/container-security/do-you-really-need-kubernetes/?utm_campaign=research-blog&amp;amp;utm_content=new-attacks-on-kubernetes-via-misconfigured-argo-workflows&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;managed cloud Kubernetes service&lt;/a&gt;
such as Amazon Web Services (AWS), EKS or Azure Kubernetes Service (AKS), the
shared responsibility model still states that the cloud customer, not the cloud
provider, is responsible for taking care of all necessary security
configurations for the applications they deploy.&lt;/p&gt;
&lt;p&gt;If you suspect that your Argo instance has been misconfigured and exposed to
the internet with excessive permissions, check for any suspicious activity in
the logs and in the workflow timeline. Make sure that there are no workflows
that have been running for an excessive amount of time. This might be an
indicator of a cryptominer running on your cluster. You can also check out our
article on
&lt;a href="https://intezer.com/blog/cloud-security/best-practices-for-securing-a-kubernetes-environment/?utm_campaign=research-blog&amp;amp;utm_content=new-attacks-on-kubernetes-via-misconfigured-argo-workflows&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;best practices for securing your Kubernetes environment&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Runtime Protection for Kubernetes Security&lt;span class="hx:absolute hx:-mt-20" id="runtime-protection-for-kubernetes-security"&gt;&lt;/span&gt;
&lt;a href="#runtime-protection-for-kubernetes-security" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;It is impossible to completely remove all vulnerabilities or misconfigurations
in cloud applications deployed by any entity. New attack vectors,
vulnerabilities and misconfigurations are being detected and exploited all the
time. Therefore, it is important to have a safety net that can always ensure
that only trusted code is running in your environment. In the event that an
attacker has exploited a misconfiguration or vulnerability in your K8s cluster
or applications running on clusters, runtime protection solutions give
immediate visibility over all code running on your pods, nodes, and clusters,
and help you detect and respond to attacks in your environment.&lt;/p&gt;</description></item><item><title>Why Relying on the Cloud Provider for Security is Not Enough</title><link>https://research.intezer.com/blog/2021/05/why-relying-on-the-cloud-provider-for-security-is-not-enough/</link><pubDate>Thu, 20 May 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/05/why-relying-on-the-cloud-provider-for-security-is-not-enough/</guid><description>
&lt;p&gt;&lt;a href="https://blog.paloaltonetworks.com/2020/06/cloud-native-security-genome/"target="_blank" rel="noopener"&gt;73% of organizations&lt;/a&gt;
using the cloud are not sure which parts of security fall
under their responsibility. Ultimately, the customer is responsible for
security in the cloud, meaning protecting the workloads (applications and code)
hosted on top of the virtual resources created in the cloud provider&amp;rsquo;s
platform. Whereas the cloud provider is responsible for the security of the
cloud, meaning the physical infrastructure (e.g., data centers, network and
server equipment) and for operating that infrastructure (e.g., physical
security, power redundancy, connectivity between facilities). The big three
cloud providers, Amazon Web Services (AWS), Microsoft Azure and Google Cloud
Platform (GCP), offer various built-in tools and services designed to prevent a
wide range of attacks and reduce the attack surface. Yet, breaches still
happen. Let&amp;rsquo;s examine some cases where the security tools provided by the cloud
provider were not enough to fully secure the customer&amp;rsquo;s environment.&lt;/p&gt;
&lt;h2&gt;Security in the Cloud&lt;span class="hx:absolute hx:-mt-20" id="security-in-the-cloud"&gt;&lt;/span&gt;
&lt;a href="#security-in-the-cloud" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Before we get started, it&amp;rsquo;s important to note that most cloud monitoring tools
are based on one or more of the following categories:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Network security&lt;/strong&gt; – Firewalls, networking segmentation and protection
against DDoS attacks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerability management&lt;/strong&gt; – Scanning and patching vulnerabilities in the
cloud system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud Workload Protection Platforms (CWPP)&lt;/strong&gt; – Focus on securing the
workloads themselves with runtime visibility and protection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud Security Posture Management (CSPM)&lt;/strong&gt; – Find misconfigurations and
security risks based on predefined security policies in the cloud
infrastructure. In some cases, remediation can be automated to terminate an
attack.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SIEM capability&lt;/strong&gt; – A combination of security event management (SEM) and
security information management (SIM). The goal is to collect logs from
different sources and take the appropriate action when an incident happens.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The security tools provided by the cloud providers are not bulletproof though.
Certain attack vectors, such as unknown vulnerabilities and supply chain
backdoors, are not preventable.&lt;/p&gt;
&lt;h2&gt;Cloud Snooper Attack Bypasses Firewall&lt;span class="hx:absolute hx:-mt-20" id="cloud-snooper-attack-bypasses-firewall"&gt;&lt;/span&gt;
&lt;a href="#cloud-snooper-attack-bypasses-firewall" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The
&lt;a href="https://news.sophos.com/en-us/2020/02/25/cloud-snooper-attack-bypasses-firewall-security-measures/"target="_blank" rel="noopener"&gt;Cloud Snooper&lt;/a&gt;
attack bypassed the on-premise
&lt;a href="https://aws.amazon.com/network-firewall/?whats-new-cards.sort-by=item.additionalFields.postDateTime&amp;amp;whats-new-cards.sort-order=desc"target="_blank" rel="noopener"&gt;AWS Network Firewall&lt;/a&gt;
using a rootkit. The rootkit hid the communication with the Command and control
(C2) server by disguising it as &amp;ldquo;innocent&amp;rdquo; packets and then dropped a RAT. The
attackers had control over the victims and a safe channel to communicate with
the C2. Despite having a well-configured firewall the attackers still managed
to infiltrate the system, meaning the security tools of AWS couldn&amp;rsquo;t stop this
attack. Having runtime visibility is an important last line of defense, since
it detects the execution of any unauthorized code or commands which are
critical for an attacker to carry out a successful attack. AWS doesn&amp;rsquo;t support
this capability, therefore the cloud customer should leverage third party tools
for workload-centric security and runtime protection.&lt;/p&gt;
&lt;h2&gt;Security Tools Have Vulnerabilities Too&lt;span class="hx:absolute hx:-mt-20" id="security-tools-have-vulnerabilities-too"&gt;&lt;/span&gt;
&lt;a href="#security-tools-have-vulnerabilities-too" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cloud services
&lt;a href="../../../2021/05/cve-2021-27075-microsoft-azure-vulnerability-allows-privilege-escalation-and-leak-of-data"&gt;have their own vulnerabilities&lt;/a&gt;
which can be exploited as an initial attack vector. The problem is it&amp;rsquo;s nearly
impossible to eliminate all software vulnerabilities, especially for large
deployments spread across multiple clouds and when using third parties.
Consider that not every software has a fix and not every vulnerability is
known. Not to mention, fixing vulnerabilities takes time and third party
vulnerable software also exists. Relying only on the cloud provider&amp;rsquo;s tools is
not enough because once a vulnerability in the tool is exploited by an
attacker, the only way to detect and stop the attack is by detecting
unauthorized code or commands in runtime. This capability is not natively
supported by AWS and GCP. Azure offers
&lt;a href="https://intezer.com/blog/incident-response/autonomous-soc-for-microsoft-defender/?utm_campaign=research-blog&amp;amp;utm_content=why-relying-on-the-cloud-provider-for-security-is-not-enough&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Microsoft defender&lt;/a&gt;
however it has limited support for Linux which runs 90% of the cloud.&lt;/p&gt;
&lt;h2&gt;Misconfigurations are the Leading Cause of Attacks&lt;span class="hx:absolute hx:-mt-20" id="misconfigurations-are-the-leading-cause-of-attacks"&gt;&lt;/span&gt;
&lt;a href="#misconfigurations-are-the-leading-cause-of-attacks" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;A whopping 99% of
&lt;a href="https://www.cio.com/article/3529426/posture-management-cloud-security-tools-rise-in-wake-of-breaches.html"target="_blank" rel="noopener"&gt;cloud security failures&lt;/a&gt;
are expected to be the fault of the customer through 2025. Despite the variety
of tools and policies, setting up and maintaining a secured environment relies
on skilled and experienced professionals. Yet, people can make mistakes that
can compromise information or expose the infrastructure to attacks. For
example:
&lt;a href="https://www.infosecurity-magazine.com/news/fedex-s3-bucket-exposes-private/"target="_blank" rel="noopener"&gt;FedEx exposed information by leaving an exposed storage server&lt;/a&gt;.
The
&lt;a href="https://money.cnn.com/2017/11/17/technology/centcom-data-exposed/"target="_blank" rel="noopener"&gt;Pentagon&lt;/a&gt;
exposed &lt;a href="https://www.bbc.com/news/technology-42166004"target="_blank" rel="noopener"&gt;100 GB of data&lt;/a&gt; from a
joint intelligence program with the U.S. Army and National Security Agency. The
data had been available for years in a publicly exposed S3 bucket. The attack
using a
&lt;a href="../../../2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/"&gt;misconfigured Docker port&lt;/a&gt;
drops the Doki malware which installs a backdoor on the victim&amp;rsquo;s machine and
executes a cryptomining malware. 73% of companies leave SSH ports
&lt;a href="https://www.eweek.com/security/misconfiguration-of-aws-services-by-users-exposes-cloud-security-risks/"target="_blank" rel="noopener"&gt;publicly exposed&lt;/a&gt;.
Sometimes the user is not aware of the misconfiguration only until a breach
occurs and the damage is done. In this case, a runtime protection solution can
stop the attack before it causes more damage.&lt;/p&gt;
&lt;h2&gt;Unauthorized Access to Cloud Workloads&lt;span class="hx:absolute hx:-mt-20" id="unauthorized-access-to-cloud-workloads"&gt;&lt;/span&gt;
&lt;a href="#unauthorized-access-to-cloud-workloads" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Credentials and permissions have an important role in securing the
infrastructure and cloud providers offer dedicated tools like Identity and
Access Management (IAM). However, when attackers or malicious insiders gain or
steal credentials to cloud assets they
&lt;a href="https://www.darkreading.com/attacks-breaches/compromised-credentials-show-that-abuse-happens-in-multiple-phases/d/d-id/1340179"target="_blank" rel="noopener"&gt;can cause extensive damage&lt;/a&gt;
to the entire cloud environment. Attackers used
&lt;a href="https://arstechnica.com/information-technology/2018/02/tesla-cloud-resources-are-hacked-to-run-cryptocurrency-mining-malware/"target="_blank" rel="noopener"&gt;Tesla&amp;rsquo;s Kubernetes dashboard&lt;/a&gt;
that was exposed to the public internet and not password protected. One of the
pods contained access credentials for Tesla&amp;rsquo;s AWS environment which included an
Amazon S3 bucket that stored sensitive information and telemetry. The attackers
ran
&lt;a href="../../../2021/01/a-rare-look-inside-a-cryptojacking-campaign-and-its-profit/"&gt;cryptomining malware&lt;/a&gt;
on the server and took measures to hide the activity of the miner. The
attackers used atypical ports for communicating with the mining pools and they
also did not use well-known mining pool hosts. When an attacker bypasses all
security measures, having clear visibility into what code is running on your
systems enables you to identify and stop the attack before the attacker gains
remote access to other assets. Having runtime security measures in the
environment will help to identify and mitigate attacks on cloud workloads. But
not all cloud vendors have these tools, specifically for Linux.&lt;/p&gt;
&lt;h2&gt;You Need Runtime Protection&lt;span class="hx:absolute hx:-mt-20" id="you-need-runtime-protection"&gt;&lt;/span&gt;
&lt;a href="#you-need-runtime-protection" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Currently, AWS and GCP do not offer a runtime Cloud Workload Protection
Platform (CWPP) focused on what is running &amp;ldquo;inside the machine.&amp;rdquo; Azure has a
CWPP but it&amp;rsquo;s mostly focused on Windows threats, which means you still need a
third party tool to secure your Linux workloads. Runtime visibility and
protection for your cloud-hosted applications is a critical control that is not
supported by the cloud providers. At Intezer, we recommend protecting the
runtime environment as a key security control. Most research shows that nearly
all successful attacks are based on running unauthorized code or commands,
regardless of how the attacker got in. Risk reduction programs like
vulnerability scanning and misconfiguration management are very important but
they take a lot of time. If you take an assume breach mentality, an attacker
will eventually get through, making the last line of defense a priority.
Protecting the runtime environment buys you time to do larger programs to
reduce risk and have a more holistic cloud security. Runtime protection is also
needed to detect and respond to attacks. If an attacker exploits an unknown
vulnerability or a backdoor in the supply chain you must be able to detect it.&lt;/p&gt;</description></item><item><title>Attackers Abusing Legitimate Cloud Monitoring Tools to Conduct Cyber Attacks</title><link>https://research.intezer.com/blog/2020/09/attackers-abusing-legitimate-cloud-monitoring-tools-to-conduct-cyber-attacks/</link><pubDate>Tue, 08 Sep 2020 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2020/09/attackers-abusing-legitimate-cloud-monitoring-tools-to-conduct-cyber-attacks/</guid><description>
&lt;h2&gt;Introduction&lt;span class="hx:absolute hx:-mt-20" id="introduction"&gt;&lt;/span&gt;
&lt;a href="#introduction" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;TeamTNT is a cybercrime group that targets cloud environments including Docker
and Kubernetes instances. The group has been
&lt;a href="https://www.cadosecurity.com/2020/08/17/teamtnt-the-first-crypto-mining-worm-to-steal-aws-credentials/"target="_blank" rel="noopener"&gt;previously documented&lt;/a&gt;
using several tools including crypto-miners and Amazon Web Services (AWS)
credential stealing worms.&lt;/p&gt;
&lt;p&gt;TeamTNT has also been spotted using a malicious Docker image which can be found
on Docker Hub to infect its victims&amp;rsquo; servers. Now the group is evolving. In a
recent attack observed by Intezer, TeamTNT uses a new technique by abusing
&lt;a href="https://www.weave.works/oss/scope/"target="_blank" rel="noopener"&gt;Weave Scope&lt;/a&gt;, a trusted tool which gives
the user full access to their cloud environment and is integrated with Docker,
Kubernetes, the Distributed Cloud Operating System (DC/OS), and AWS Elastic
Compute Cloud (ECS). The attackers install this tool in order to map the cloud
environment of their victim and execute system commands without deploying
malicious code on the server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To our knowledge, this is the first time attackers have been caught using
legitimate third party software to target cloud infrastructure&lt;/strong&gt;. When abused,
Weave Scope gives the attacker full visibility and control over all assets in
the victim&amp;rsquo;s cloud environment, essentially functioning as a backdoor.&lt;/p&gt;
&lt;p&gt;Below we will describe the attack flow and the use of Weave Scope by the
attacker.&lt;/p&gt;
&lt;h2&gt;Attack Flow&lt;span class="hx:absolute hx:-mt-20" id="attack-flow"&gt;&lt;/span&gt;
&lt;a href="#attack-flow" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;TeamTNT&amp;rsquo;s attacks typically involve the use of malicious Docker images from the
Docker Hub in addition to crypto-miners and malicious scripts. The uniqueness
of the recent attack observed by Intezer is the group abuses a legitimate open
source tool called Weave Scope to gain full control over the victim&amp;rsquo;s cloud
infrastructure.&lt;/p&gt;
&lt;p&gt;Weave Scope is an open source tool from
&lt;a href="https://www.weave.works/oss/scope/"target="_blank" rel="noopener"&gt;Weave Works&lt;/a&gt;, a company that offers
automation tools for working with containerized applications. It provides
monitoring, visualization, and control over Docker and Kubernetes. Using a
dashboard accessible from the browser the user gains full control over the
infrastructure including all information and metadata about containers,
processes, and hosts.&lt;/p&gt;
&lt;p&gt;Weave Scope is a powerful utility, giving the attackers access to all
information about the victim&amp;rsquo;s server environment with the ability to control
them including: installed applications, connection between the cloud workloads,
use of the memory and CPU, and a list of existing containers with the ability
to start, stop, and open interactive shells in any of these containers. By
installing a legitimate tool such as Weave Scope the attackers reap all the
benefits as if they had installed a backdoor on the server, with significantly
less effort and without needing to use malware.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/09/attackers-abusing-legitimate-cloud-monitoring-tools-to-conduct-cyber-attacks/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The image above is a Weave Scope visualization of a Linux server. On the left
is the open terminal of a Nginx-based container. On the right is a view of all
the containers on the server.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To install Weave Scope on the server the attackers use an exposed Docker API
port and create a new privileged container with a clean Ubuntu image. The
container is configured to mount the file system of the container to the
filesystem of the victim server, thus gaining the attackers access to all files
on the server. The initial command given to the container is to download and
execute several cryptominers.&lt;/p&gt;
&lt;p&gt;The attackers then attempt to gain root access to the server by setting up a
local privileged user named &amp;lsquo;hilde&amp;rsquo; on the host server and use it in order to
connect back via SSH.&lt;/p&gt;
&lt;p&gt;Next the attackers download and install Weave Scope. As described in the
installation guide in &lt;a href="https://github.com/weaveworks/scope"target="_blank" rel="noopener"&gt;Weave Scope&amp;rsquo;s git&lt;/a&gt;,
it takes only a few commands to complete installation of the tool.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/09/attackers-abusing-legitimate-cloud-monitoring-tools-to-conduct-cyber-attacks/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Once installed, the attackers can connect to the Weave Scope dashboard via HTTP
on port 4040 and gain full visibility and control over the victim&amp;rsquo;s
infrastructure.&lt;/p&gt;
&lt;p&gt;From the dashboard the attackers can see a visual map of the Docker runtime
cloud environment and give shell commands without needing to deploy any
malicious backdoor component. Not only is this scenario incredibly rare, to our
knowledge this is the first time an attacker has downloaded legitimate software
to use as an admin tool on the Linux operating system.&lt;/p&gt;
&lt;h2&gt;Mitigation Recommendations&lt;span class="hx:absolute hx:-mt-20" id="mitigation-recommendations"&gt;&lt;/span&gt;
&lt;a href="#mitigation-recommendations" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Precise and correct configuration of cloud workloads and services can prevent
many attacks which is why it&amp;rsquo;s important to take the time and effort to check
them. To protect yourself from this attack we recommend to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Close exposed Docker API ports: This attack takes advantage of a common
misconfiguration of the Docker API which gives the attacker full control over
the Docker service. Therefore, Docker API ports should be closed or contain
restricted access policies in the firewall.&lt;/li&gt;
&lt;li&gt;Block incoming connections to port 4040: Weave Scope uses default port 4040
to make the dashboard accessible and anyone with access to the network can
view the dashboard. Similar to the Docker API port, this port should be
closed or restricted by the firewall.&lt;/li&gt;
&lt;li&gt;Block the IOCs provided below.&lt;/li&gt;
&lt;li&gt;Check out our article
&lt;a href="https://intezer.com/blog/best-practices-for-securing-a-docker-runtime-environment/?utm_campaign=research-blog&amp;amp;utm_content=attackers-abusing-legitimate-cloud-monitoring-tools-to-conduct-cyber-attacks&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Best Practice for Securing a Docker Runtime environment&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Apply Zero Trust Execution to Your Workloads&lt;span class="hx:absolute hx:-mt-20" id="apply-zero-trust-execution-to-your-workloads"&gt;&lt;/span&gt;
&lt;a href="#apply-zero-trust-execution-to-your-workloads" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Zero Trust Execution is viewed by market research firms as the best practice
for securing cloud workloads for reasons like the nature of this TeamTNT
attack. ZTE creates a trusted baseline of your workloads and monitors for any
new process or injected code. Any unauthorized code or applications that drift
from the pre-approved baseline are blocked from running in your cloud
environment, allowing you to retain a trusted state.&lt;/p&gt;
&lt;p&gt;In this scenario, although Weave Scope is a legitimate administration tool
(it&amp;rsquo;s not malware and therefore doesn&amp;rsquo;t contain malicious code), the
application was still flagged by ZTE because it&amp;rsquo;s unauthorized code that
deviates from the trusted baseline.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://intezer.com/blog/cloud-workload-protection/what-is-zero-trust-execution-definition-adoption-more/?utm_campaign=research-blog&amp;amp;utm_content=attackers-abusing-legitimate-cloud-monitoring-tools-to-conduct-cyber-attacks&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;This article&lt;/a&gt;
explains how you can adopt a genetic-based ZTE approach to alleviate some of
the high overhead caused by traditional implementations.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;A special thank you to Idan Katz for his contribution to this research.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;Update from Weave Works&lt;span class="hx:absolute hx:-mt-20" id="update-from-weave-works"&gt;&lt;/span&gt;
&lt;a href="#update-from-weave-works" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Weave Works has since provided this
&lt;a href="https://www.weave.works/blog/preventing-malicious-use-of-weave-scope/"target="_blank" rel="noopener"&gt;in-depth article&lt;/a&gt;
on how to prevent malicious attacks using Weave Scope. The article covers both
how Scope is used and how you can prevent it being misused by securing it in
any Kubernetes installation.&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;85[.]214.149.236
https://iplogger[.]org/2Xvkv5
24d7d21c3675d66826da0372369ec3e8
8c6681daba966addd295ad89bf5146af
656eca480e2161e8645f9b29af7e4762
8ffdba0c9708f153237aabb7d386d083
45385f7519c11a58840931ee38fa3c7b&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Watch Your Containers: Doki Infecting Docker Servers in the Cloud</title><link>https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/</link><pubDate>Tue, 28 Jul 2020 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/</guid><description>
&lt;h2&gt;Key Findings&lt;span class="hx:absolute hx:-mt-20" id="key-findings"&gt;&lt;/span&gt;
&lt;a href="#key-findings" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.netlab.360.com/a-new-mining-botnet-blends-its-c2s-into-ngrok-service/"target="_blank" rel="noopener"&gt;Ngrok Mining Botnet&lt;/a&gt;
is an active campaign targeting exposed Docker servers in AWS, Azure, and
other cloud platforms. It has been active for at least two years.&lt;/li&gt;
&lt;li&gt;We have detected a recent attack which includes a completely undetected Linux
malware and a previously undocumented technique, using a blockchain wallet
for generating C&amp;amp;C domain names.&lt;/li&gt;
&lt;li&gt;Anyone with publicly open Docker API access is at high risk to be hacked
within the span of just a few hours. This is probable due to the hackers'
automated and continuous internet-wide scanning for vulnerable victims.&lt;/li&gt;
&lt;li&gt;The new malware, dubbed &amp;ldquo;Doki&amp;rdquo;, hasn&amp;rsquo;t been detected by any of the 60 malware
detection engines in VirusTotal since it was first analyzed on January 14,
2020.&lt;/li&gt;
&lt;li&gt;The attacker is using the infected victims to search for additional
vulnerable cloud servers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Introduction&lt;span class="hx:absolute hx:-mt-20" id="introduction"&gt;&lt;/span&gt;
&lt;a href="#introduction" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Linux threats are becoming more common. A contributing factor to this is the
increasing shift and reliance on cloud environments, which are mostly based on
Linux infrastructure. Hence, attackers have been adapting accordingly with new
tools and techniques designed specifically for this infrastructure.&lt;/p&gt;
&lt;p&gt;A technique that has become popular is the abuse of misconfigured Docker API
ports, where attackers scan for publicly accessible Docker servers and exploit
them in order to set up their own containers and execute malware on the
victim&amp;rsquo;s infrastructure.&lt;/p&gt;
&lt;p&gt;One of the longest ongoing attack campaigns exploiting Docker API ports is the
Ngrok Botnet, previously reported on by researchers at
&lt;a href="https://blog.netlab.360.com/a-new-mining-botnet-blends-its-c2s-into-ngrok-service/"target="_blank" rel="noopener"&gt;Netlab&lt;/a&gt;
and
&lt;a href="https://blog.trendmicro.com/trendlabs-security-intelligence/exposed-docker-control-api-and-community-image-abused-to-deliver-cryptocurrency-mining-malware/"target="_blank" rel="noopener"&gt;Trend Micro&lt;/a&gt;.
As part of the attack, the attackers abuse Docker configuration features in
order to elude standard container restrictions and execute various malicious
payloads from the host. They also deploy a network scanner and use it to scan
the cloud providers&amp;rsquo; IP ranges for additional potentially vulnerable targets.
Our evidence shows that it takes only a few hours from when a new misconfigured
Docker server is up online to become infected by this campaign.&lt;/p&gt;
&lt;p&gt;Recently, we have detected a new malware payload that is different from the
standard cryptominers typically deployed in this attack. The malware is a fully
undetected backdoor which we have named Doki.&lt;/p&gt;
&lt;p&gt;Doki uses a previously undocumented method to contact its operator by abusing
the Dogecoin cryptocurrency blockchain in a unique way in order to dynamically
generate its C2 domain address. The malware has managed to stay under the radar
for over six months despite samples being publicly available in VirusTotal.&lt;/p&gt;
&lt;p&gt;In this article we will cover the attack and provide a detailed analysis of the
techniques that were implemented by the undetected Doki backdoor.&lt;/p&gt;
&lt;h2&gt;The Attack&lt;span class="hx:absolute hx:-mt-20" id="the-attack"&gt;&lt;/span&gt;
&lt;a href="#the-attack" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The threat is targeting misconfigured containerized environments in the cloud.
The attackers scan for publicly accessible Docker API ports and exploit them in
order to set up their own containers and execute malware on the victims'
infrastructure. The attackers are spawning and deleting a number of containers
during this attack.&lt;/p&gt;
&lt;p&gt;Each container that is created during the attack is based on an alpine image
with curl installed. The image is available on the
&lt;a href="https://hub.docker.com/r/byrnedo/alpine-curl/tags/"target="_blank" rel="noopener"&gt;Docker hub&lt;/a&gt;. The image is
not malicious but rather it&amp;rsquo;s being abused to carry out malicious activities.
By using an image that contains the curl software, curl commands are executed
as soon as the container is up and running.&lt;/p&gt;
&lt;p&gt;The advantage of using a publicly available image is the attacker doesn&amp;rsquo;t need
to hide it on Docker hub or other hosting solutions. Instead, the attackers can
use an existing image and run their own logic and malware on top of it.&lt;/p&gt;
&lt;p&gt;As mentioned above, attackers can create any container, however, to execute
code from the hosting machine they must use a container escape method. The
technique is based on the creation of a new container, accomplished by posting
a
‘&lt;a href="https://docs.docker.com/engine/api/v1.40/#operation/ContainerCreate"target="_blank" rel="noopener"&gt;create&lt;/a&gt;'
API request. The body of the request contains configuration parameters for the
container. One of the parameters is
&lt;a href="https://docs.docker.com/storage/bind-mounts/"target="_blank" rel="noopener"&gt;bind&lt;/a&gt; which lets the user
configure which file or directory on the host machine to mount into a
container.&lt;/p&gt;
&lt;p&gt;Containers that are created during the attack are configured to bind
&lt;code&gt;/tmpXXXXXX&lt;/code&gt; directory to the root directory of the hosting server. This means
every file on the server&amp;rsquo;s filesystem can be accessed and even modified, with
the correct user permissions, from within the container.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://ngrok.com/"target="_blank" rel="noopener"&gt;Ngrok&lt;/a&gt; is a service which provides secure tunnels to
connect between local servers and the public internet. The attacker abuses
Ngrok to craft unique URLs with a short lifetime and uses them to download
payloads during the attack by passing them to the curl based image. The
downloaded payload is saved in &lt;code&gt;/tmpXXXXXX&lt;/code&gt; directory in the container.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/images/fig1.png" title="The command that created the container as seen on the syslog of the attacked server" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;The command that created the container as seen on the syslog of the attacked server&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;By using the bind configuration the attacker can control the cron utility of
the host. The attacker modifies the host&amp;rsquo;s cron to execute the downloaded
payload every minute. We observed two types of payloads, one is a network
scanner script and the other is a downloader script.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The network scanner uses zmap, zgrap, and jq to scan ports associated with
Redis, Docker, SSH, and HTTP.&lt;/p&gt;
&lt;p&gt;Using a list of hardcoded ranges of IP addresses, which belong mostly to cloud
servers such as AWS and local cloud providers in foreign regions (we have seen
providers from China, Austria, and the United Kingdom), the script gathers the
information and uploads it to another Ngrok URL.&lt;/p&gt;
&lt;p&gt;The downloader script is responsible for downloading and installing various
malware binaries, often one of several well known cryptominers. We have noticed
it can also install a fully undetected malware component. We named this malware
Doki and will provide a technical analysis in the next section.&lt;/p&gt;
&lt;p&gt;The attacker has full control over the configuration of the container he
creates and the files that are dropped into the container. By using legitimate
API commands, the attacker is able to escape from the container he created and
execute any code from within the server itself.&lt;/p&gt;
&lt;h2&gt;The Doki Malware&lt;span class="hx:absolute hx:-mt-20" id="the-doki-malware"&gt;&lt;/span&gt;
&lt;a href="#the-doki-malware" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Doki is a backdoor for Linux which function is to execute code received from
its operators. The malware utilizes the
&lt;a href="https://account.dyn.com/"target="_blank" rel="noopener"&gt;DynDNS service&lt;/a&gt; and a unique Domain Generation
Algorithm (DGA) based on the Dogecoin cryptocurrency blockchain in order to
find the domain of its C2 in real time.&lt;/p&gt;
&lt;p&gt;The malware is a fully undetected backdoor. It has managed to stay undetected
for over six months despite having
&lt;a href="https://www.virustotal.com/gui/file/4aadb47706f0fe1734ee514e79c93eed65e1a0a9f61b63f3e7b6367bd9a3e63b/detection"target="_blank" rel="noopener"&gt;been uploaded to VirusTotal&lt;/a&gt;
on January 14, 2020 and scanned multiple times since.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Doki is multi-threaded and uses the embedTLS library for cryptographic
functions and network communication. When executed, the malware will create a
seperate thread in order to handle all C2 communications.&lt;/p&gt;
&lt;p&gt;The malware starts by generating a C2 domain using its unique DGA. In order to
construct the C2 address the malware performs the following steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query dogechain.info API, a Dogecoin cryptocurrency block explorer, for the
value that was sent out (spent) from a hardcoded wallet address that is
controlled by the attacker. The query format is:
&lt;code&gt;https://dogechain.info/api/v1/address/sent/{address}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Perform SHA256 on the value returned under &amp;ldquo;sent&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Save the first 12 characters from the hex-string representation of the SHA256
value, to be used as the subdomain.&lt;/li&gt;
&lt;li&gt;Construct the full address by appending the subdomain to ddns.net. An example
domain would be: &lt;code&gt;6d77335c4f23[.]ddns[.]net&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using this technique the attacker controls which address the malware will
contact by transferring a specific amount of Dogecoin from his or her wallet.
Since only the attacker has control over the wallet, only he can control when
and how much dogecoin to transfer, and thus switch the domain accordingly.
Additionally, since the blockchain is both immutable and decentralized, this
novel method can prove to be quite resilient to both infrastructure takedowns
from law enforcement and domain filtering attempts from security products.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth noting that once the domain is generated, the malware ensures it&amp;rsquo;s
not &amp;ldquo;46927e019820&amp;rdquo;, which is what&amp;rsquo;s generated for &amp;ldquo;0.000000&amp;rdquo;, meaning when no
Dogecoin was ever transferred from the wallet. In the case that this domain is
generated, the malware will exit without continuing any further.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Otherwise, the malware continues to download a shell script by contacting its
C2 via HTTPS, using the URL &lt;code&gt;&amp;lt;c2_address&amp;gt;/update.sh&lt;/code&gt; and saving the returned
data as &lt;code&gt;/tmp/update.sh&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It will then resolve the current process&amp;rsquo;s PID and path to be used as script
arguments, and proceeds to execute the script by running:
&lt;code&gt;/bin/sh -c ./update.sh &amp;lt;process_id&amp;gt; &amp;lt;process_path&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Meanwhile, the main thread of the malware reads from STDIN, expecting to
receive binary data from that shell script. The arguments are passed to the
script in order to allow it to communicate with the malware in this way and
receive code to execute.&lt;/p&gt;
&lt;p&gt;If data is received via STDIN, the malware saves it as a file under /tmp,
choosing its name randomly from a predefined list of Linux kernel modules.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2020/07/watch-your-containers-doki-infecting-docker-servers-in-the-cloud/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;While it&amp;rsquo;s a very basic deception method, it&amp;rsquo;s not something commonly seen in
Linux malware, which often don&amp;rsquo;t bother disguising as system files.&lt;/p&gt;
&lt;p&gt;Finally, the malware proceeds to fork so the child process executes the file
and the main process loops to repeat the malware&amp;rsquo;s logic flow.&lt;/p&gt;
&lt;h2&gt;Bottom Line&lt;span class="hx:absolute hx:-mt-20" id="bottom-line"&gt;&lt;/span&gt;
&lt;a href="#bottom-line" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The Ngrok Botnet campaign has been ongoing for over two years and is rather
effective, infecting any misconfigured Docker API server in a matter of hours.
The incorporation of the unique and undetected Doki malware indicates the
operation is continuing to evolve.&lt;/p&gt;
&lt;p&gt;This attack is very dangerous due to the fact the attacker uses container
escape techniques to gain full control of the victim&amp;rsquo;s infrastructure. Our
evidence shows that it takes only a few hours from when a new misconfigured
Docker server is up online to become infected by this campaign.&lt;/p&gt;
&lt;h3&gt;Immediate Action Required by Container Server Owners&lt;span class="hx:absolute hx:-mt-20" id="immediate-action-required-by-container-server-owners"&gt;&lt;/span&gt;
&lt;a href="#immediate-action-required-by-container-server-owners" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Both companies and individuals who own container servers in the cloud must
immediately fix configuration to prevent exposure. This includes: Checking for
any exposed ports, verifying there are no foregin or unknown containers among
the existing containers, and monitoring excessive use of resources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;We recommend you read our article,
&lt;a href="https://intezer.com/blog/best-practices-for-securing-a-docker-runtime-environment/?utm_campaign=research-blog&amp;amp;utm_content=watch-your-containers-doki-infecting-docker-servers-in-the-cloud&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Best Practices for Securing a Docker Runtime Environment&lt;/a&gt;.
You can also run our
&lt;a href="https://github.com/intezer/yara-rules/blob/master/Doki_Attack.yar"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
on your cloud servers to check if you have been infected by this campaign.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;6d77335c4f23[.]ddns[.]net
36b397f0da96fa0639a1e60f56af8be1a3060c4d1b98f108b7dc8e3c572b3337
4aadb47706f0fe1734ee514e79c93eed65e1a0a9f61b63f3e7b6367bd9a3e63b
9907eaa1b487306c43b1352369f0409ba59a9aa0f5590fbd60e8825999db1f14&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Technical Analysis: Pacha Group Competing against Rocke Group for Cryptocurrency Mining Foothold on the Cloud</title><link>https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/</link><pubDate>Thu, 09 May 2019 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/</guid><description>
&lt;p&gt;Pacha Group is a crypto-mining threat actor we at Intezer discovered and
profiled in a &lt;a href="../../../2019/02/technical-analysis-pacha-group"&gt;blog post&lt;/a&gt;
published on February 28, 2019. This threat actor targeted Linux servers dating
back to September 2018 and implemented advanced evasion and persistence
techniques.&lt;/p&gt;
&lt;p&gt;We have continued to monitor this threat actor and new findings show that Pacha
Group is also targeting cloud-based environments and conducting great efforts
to disrupt other crypto-mining groups, namely
&lt;a href="https://unit42.paloaltonetworks.com/malware-used-by-rocke-group-evolves-to-evade-detection-by-cloud-security-products/"target="_blank" rel="noopener"&gt;Rocke Group&lt;/a&gt;
who is also known to target cloud environments.&lt;/p&gt;
&lt;p&gt;We believe that these findings are relevant within the context of bringing
awareness about cloud-native threats and our research may imply that cloud
environments are increasingly becoming a common target for adversaries.&lt;/p&gt;
&lt;h2&gt;Technical Analysis&lt;span class="hx:absolute hx:-mt-20" id="technical-analysis"&gt;&lt;/span&gt;
&lt;a href="#technical-analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In monitoring Pacha Group we have identified new, undetected Linux.GreedyAntd
variants that share code with previous variants.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Despite sharing nearly 30% of code with previous variants, detection rates of
the new Pacha Group variants are low:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig2.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The main malware infrastructure appears to be identical to previous Pacha Group
campaigns, although there is a distinguishable effort to detect and mitigate
Rocke Group’s implants. Rocke Group was first reported by
&lt;a href="https://blog.talosintelligence.com/2018/08/rocke-champion-of-monero-miners.html"target="_blank" rel="noopener"&gt;Cisco Talos&lt;/a&gt;
researchers and has deployed sophisticated crypto-mining campaigns in Linux
servers and cloud-based environments as reported by
&lt;a href="https://unit42.paloaltonetworks.com/malware-used-by-rocke-group-evolves-to-evade-detection-by-cloud-security-products/"target="_blank" rel="noopener"&gt;Palo Alto Unit 42&lt;/a&gt;.
The following image is a blacklist of miners in which Linux.GreedyAntd searches
to eradicate. We have recognized several file names in this blacklist known to
be used for Rocke Group’s implants:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig3.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, there are other strings within this file path blacklist which are
used to search for and disable cloud protection solutions, such as Alibaba
Server Guard Agent. Strings of malware
&lt;a href="https://www.reddit.com/r/linuxquestions/comments/bknurg/is_is_exploit_or_what/"target="_blank" rel="noopener"&gt;implants&lt;/a&gt;
known to have abused the
&lt;a href="https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html?_ga=2.116436864.700072651.1557244235-1322709726.1557244235"target="_blank" rel="noopener"&gt;Atlassian vulnerability&lt;/a&gt;
were also found. Rocke Group is known to hunt for similar security products and
to have
&lt;a href="https://community.atlassian.com/t5/Confluence-questions/How-come-my-confluence-installation-was-hacked-by-Kerberods/qaq-p/1054605#M141274"target="_blank" rel="noopener"&gt;abused&lt;/a&gt;
the same vulnerability.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig4.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Another interesting update in Pacha Group’s infrastructure in comparison to
previous campaigns is that further implants would only be able to be downloaded
from Pacha Group’s servers if the HTTP GET request was completed with a
specific User-Agent. In the following screenshot we can see how files can not
be downloaded unless the correct User-Agent is used:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig5.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;In addition, Pacha Group’s component update seems to include a lightweight
user-mode rootkit known as Libprocesshider, which is an open source project
hosted on &lt;a href="https://github.com/gianlucaborello/libprocesshider"target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt; and has
also been used by Rocke Group.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig6.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The malware updates &lt;code&gt;/etc/ld.preload&lt;/code&gt; to include the path of the dropped
library masquerading libconv.so, a unicode conversion library.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;This shared object will export customized versions of readdir and readdir64
functions that will attempt to hide a process name from /proc filesystem of one
of the main components of the malware’s infrastructure, in charge to download
further implants in intervals along with enforcing process, file path and IP
blacklisting:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Along with process and file path blacklisting measures seen in previous
variants, we also observed that newer variants implement IP blacklisting using
an interesting technique.&lt;/p&gt;
&lt;p&gt;Right after process and file path black listing has been accomplished, we find
the following code:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig9.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Each of the IPs in the blacklist IP table is decoded and then added to the
system routing table with host scope via ioctl.&lt;/p&gt;
&lt;p&gt;This is more conveniently shown by observing the following system call trace:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig10.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;When we check the routing table of a compromised system we see the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig11.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Each of the decoded IPs have been added to the routing table with host scope.
This implies that when any of these IPs will be requested, each request will be
routed back to the host to be resolved instead of redirecting them to the
gateway, causing a failure in the routing process.&lt;/p&gt;
&lt;p&gt;In the following screenshot we can see the effect of this methodology by using
the ping utility:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig12.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After analyzing the IP blacklist we discovered that some of these IPs, even
though they may not necessarily be malicious, are known to have been used by
Rocke Group in the past. As an example, systemten.org is in this blacklist and
it is known that Rocke Group has &lt;a href="https://imgur.com/a/H7YuWuj"target="_blank" rel="noopener"&gt;used this&lt;/a&gt;
domain for their crypto-mining operations. The following are some domains that
correspond to their hardcoded IPs in Linux.GreedyAntd’s blacklist that have
Rocke Group correlations:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2019/05/technical-analysis-cryptocurrency-mining-war-on-the-cloud/images/fig13.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;span class="hx:absolute hx:-mt-20" id="conclusion"&gt;&lt;/span&gt;
&lt;a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We have presented evidence that Pacha Group is targeting cloud-based
environments and being especially aggressive towards Rocke Group. We have based
this conclusion on the process blacklist used by Pacha Group and the newly
added IP blacklist which contains Rocke Group correlated artifacts.&lt;/p&gt;
&lt;p&gt;We have also provided a
&lt;a href="https://github.com/intezer/yara-rules/blob/master/GreedyAntd.yar"target="_blank" rel="noopener"&gt;YARA rule&lt;/a&gt;
in order to detect Pacha Group’s Linux.GreedyAntd implants based on reused code
among the implants.&lt;/p&gt;
&lt;p&gt;Cloud infrastructure is quickly becoming a common target for threat actors,
particularly on vulnerable Linux servers. Unfortunately the detection rates of
Linux-based malware remain low and the security community needs more awareness
in order to more effectively mitigate these threats.&lt;/p&gt;
&lt;h2&gt;IOCs&lt;span class="hx:absolute hx:-mt-20" id="iocs"&gt;&lt;/span&gt;
&lt;a href="#iocs" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;195.154.187[.]169
165.227.140[.]184
f46a9d2c3c9bfcc409534e0856f4614d6b42e792134dcf0f40df7295a777c879
d2e373c1341a28e18158272208a15decfa397640b6092b56158e0f52e4ff73a4
c098d5aeef316c3564b0b40a8a102147dae9c606fa92a2e2f0ad5c94cfe30222
42612f41befc57619646da5e91e7758dcc83cbaafbe5fdfa19d9f43a71f2504f
ce10e7a0fb517309b1e1141b44d3f9f7759e0f8889c0392774a5869f41006a3f
d94a6537adcea2f8ef3ed5ed41a548bc2b26b3acdeca9aaf6da4c933e7f47174
f83d75ab09634a7b818ef87c6509cca2c6f26f5f65b8d3448ebc86b52be62253
e5f6fbeb3981c9dfa126dc0a71a0aa41b56a09a89228659a7ea5f32aff4b2058&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;GreedyAntd Embedded IP Blacklist The following are IPs that the Pacha Group
attempts to block to prevent operation of other crypto-mining implants (notice
not to block these IPs. See the IPs to block in the above IOCs section):&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;pre&gt;&lt;code&gt;139.99.120[.]73
47.95.85[.]22
62.210.75[.]99
113.55.8[.]24
62.210.75[.]99
42.56.76[.]104
198.204.231[.]250
47.90.213[.]21
116.62.232[.]226
134.209.104[.]20
198.12.156[.]218
207.148.76[.]229
188.165.254[.]85
58.56.187[.]66
89.35.39[.]78
37.139.22[.]136
37.44.212[.]223
54.36.137[.]146
139.99.120[.]50
37.120.131[.]220
104.20.209[.]21
198.12.156[.]218
34.196.173[.]143
34.193.88[.]221
35.168.52[.]211
104.248.4[.]162
130.61.54[.]136
139.99.120[.]50
198.12.156[.]218
166.62.38[.]167
185.193.125[.]146
132.148.148[.]79
188.165.254[.]85
104.20.208[.]21
37.187.95[.]110
158.69.25[.]62
104.31.93[.]26
104.25.140[.]10
60.191.25[.]101
104.248.53[.]213
60.191.13[.]119
104.130.210[.]206
193.56.28[.]207
37.187.95[.]110
89.35.39[.]78
81.4.122[.]134
37.44.212[.]223
148.251.133[.]246
52.41.214[.]241
52.25.124[.]181
54.68.226[.]153
136.243.89[.]164
104.20.209[.]21
176.9.2[.]144
37.59.43[.]136
78.46.89[.]102
37.59.45[.]174
91.121.2[.]76
176.9.53[.]68
37.59.55[.]60
178.63.48[.]196
37.187.154[.]79
37.59.44[.]93
78.46.91[.]134
37.59.54[.]205
23.175.0[.]142
104.140.244[.]186
136.243.102[.]157
5.254.96[.]150
51.15.56[.]161&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
aria-label="Copy code"
data-copied-label="Copied!"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item></channel></rss>