<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Intezer Research – Ir</title><link>https://research.intezer.com/tags/ir/</link><description>Recent content in Ir on Intezer Research</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 01 Mar 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://research.intezer.com/tags/ir/index.xml" rel="self" type="application/rss+xml"/><item><title>Boost Your SOC Skills: How to Detect Good Apps Gone Bad</title><link>https://research.intezer.com/blog/2022/03/boost-your-soc-skills-how-to-detect-good-apps-gone-bad/</link><pubDate>Tue, 01 Mar 2022 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2022/03/boost-your-soc-skills-how-to-detect-good-apps-gone-bad/</guid><description>
&lt;p&gt;Threat actors have a wide range of tools and techniques they can use in cyber
attacks including: malware-as-a-service, open-source tools and malware code,
red team or admin tools. Besides, there is an extended variety of legitimate
tools and features that can be handy for regular users but extremely dangerous
when used by attackers. Trusted applications and signed binaries are beneficial
for attackers because they provide them with stealthy code execution, sometimes
even with high integrity privileges. For an untrained eye the execution of
trusted applications by attackers might go under the radar and not ring the
alarm.&lt;/p&gt;
&lt;p&gt;It is very challenging to detect the usage of legitimate applications by
attackers while avoiding false positive alerts and alert fatigue. Since these
applications are frequently used by the system and endpoint users, it is harder
to detect when an application is exploited by attackers and issue an alert.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t give up, there is a solution. First, as a SOC analyst you need to be
familiar with how trusted tools are used by attackers. Second, you need to know
which detection methods will be effective in your environment and trigger
alerts when attackers are using legitimate tools.&lt;/p&gt;
&lt;p&gt;In this blog we will present several examples of legitimate Windows
applications and utilities that were exploited by threat actors in real-life
attacks. For each tool we will explain how SOC analysts can detect and identify
the usage of these applications by attackers. For each tool we mention, we
suggest or create a basic detection rule that can be compiled to fit your log
source and SIEM platform. Please note that you may need to slightly modify the
rule to better suit your specific log source or SIEM fields in order to use for
your organization.&lt;/p&gt;
&lt;p&gt;On March 16th, we will host a livestream where we will present these and other
techniques including live examples.
&lt;a href="https://www.twitch.tv/intezerlabs"target="_blank" rel="noopener"&gt;Follow us on Twitch to get notified when the livestream starts.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Legitimate Tools Used in Attacks by Threat Actors&lt;span class="hx:absolute hx:-mt-20" id="legitimate-tools-used-in-attacks-by-threat-actors"&gt;&lt;/span&gt;
&lt;a href="#legitimate-tools-used-in-attacks-by-threat-actors" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Technique Name: PsExec&lt;span class="hx:absolute hx:-mt-20" id="technique-name-psexec"&gt;&lt;/span&gt;
&lt;a href="#technique-name-psexec" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;Analysis&lt;span class="hx:absolute hx:-mt-20" id="analysis"&gt;&lt;/span&gt;
&lt;a href="#analysis" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;PsExec is a command-line utility that is used to execute processes on remote
systems and also redirect the output of console applications. It is part of the
Sysinternals'
&lt;a href="https://docs.microsoft.com/en-us/sysinternals/downloads/pstools"target="_blank" rel="noopener"&gt;PsTools suite&lt;/a&gt;
created by Mark Russinovich. Although intended as a tool to be used only by
administrators. PsExec has been used also by malicious actors. PsExec executes
processes in the following syntax.&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;psexec \RemotePCName [-u username[-p password]] command [arguments]&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;The process connects to the remote computer over the SMB ports 445 (TCP) or 139
(UDP), and copies over a service file that is run to set up data transfer
between the remote machine and the PsExec process. When the action is
completed, PsExec stops the service and removes the file.&lt;/p&gt;
&lt;h4&gt;Real Life Example&lt;span class="hx:absolute hx:-mt-20" id="real-life-example"&gt;&lt;/span&gt;
&lt;a href="#real-life-example" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;&lt;a href="../../../2017/10/notpetya-returns-bad-rabbit"&gt;NotPetya&lt;/a&gt; was a famous
ransomware attack that occurred in 2017. It infected thousands of
organizations, with over 80% of the victims located in Ukraine, causing
billions of dollars worth of damage. NotPetya contained an
&lt;a href="https://www.crowdstrike.com/blog/petrwrap-ransomware-technical-analysis-triple-threat-file-encryption-mft-encryption-credential-theft/"target="_blank" rel="noopener"&gt;embedded modified version&lt;/a&gt;
of PsExec. PsExec was used for remote execution and lateral movement across
networks. The credentials were gathered by a credential theft module that was
able to extract usernames and passwords from the LSASS process.&lt;/p&gt;
&lt;p&gt;The Russian threat group APT29 (Cozy Bear) has also
&lt;a href="https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Operation_Ghost_Dukes.pdf"target="_blank" rel="noopener"&gt;used&lt;/a&gt;
PsExec to laterally move across networks and deploy their custom backdoor
FatDuke.&lt;/p&gt;
&lt;h4&gt;How to Detect&lt;span class="hx:absolute hx:-mt-20" id="how-to-detect"&gt;&lt;/span&gt;
&lt;a href="#how-to-detect" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;One way to detect PsExec is to detect the creation of a new service. A new
service created in Windows will generate an event in the Windows Security logs
with the code of 7045. The default name for the PsExec service is PSEXESVC. We
created a Sigma rule that will alert when an Event ID 7045 will be triggered by
a service with the name PSEXESVC.&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;title: Generic PSEXESVC Service Execution or Creation
author: Intezer
logsource:
product: windows
service: system
detection:
service_installation:
EventID: 7045
Provider_Name: &amp;#39;Service Control Manager&amp;#39;
ServiceName: &amp;#39;PSEXESVC&amp;#39;
ServiceFileName|endswith: &amp;#39;PSEXESVC.exe&amp;#39;
service_execution:
EventID: 7036
Provider_Name: &amp;#39;Service Control Manager&amp;#39;
param1: &amp;#39;PSEXESVC&amp;#39;
param2: &amp;#39;running&amp;#39;
condition: service_installation or service_execution&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;Another way to detect is the creation of named pipes, created by the service,
that is set up to facilitate communication between the PsExec process and the
service on the remote host. There are multiple formats that can be created:&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;PSEXESVC-&amp;lt;computer_name&amp;gt;-&amp;lt;random_digits&amp;gt;-&amp;lt;stdin|stdout|stderr&amp;gt;
PSEXESVC&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;Creation of a PsExec named pipe can be detected through the following Sigma
rule:&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;title: PsExec Service Named Pipe Creation
author: Intezer
logsource:
product: windows
category: pipe_created
detection:
selection_PSEXESVC:
PipeName|contains|all:
- &amp;#39;PSEXESVC&amp;#39;
selection_stdin:
PipeName|endswith: &amp;#39;-stdin&amp;#39;
selection_stdout:
PipeName|endswith: &amp;#39;-stdout&amp;#39;
selection_stderr:
PipeName|endswith: &amp;#39;-stderr&amp;#39;
condition: selection_PSEXESVC and 1 of selection_std*&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;The above rules may help if PsExec is not a tool in use by your organization,
but if it is in common use, there are other rules that may help detect
malicious variants. To detect the use of a renamed or variant of PsExec, you
can use this Sigma rule:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/SigmaHQ/sigma/blob/eb382c4a59b6d87e186ee269805fe2db2acf250e/rules/windows/builtin/security/win_susp_psexec.yml"target="_blank" rel="noopener"&gt;https://github.com/SigmaHQ/sigma/blob/eb382c4a59b6d87e186ee269805fe2db2acf250e/rules/windows/builtin/security/win_susp_psexec.yml&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Technique Name: MSHTA&lt;span class="hx:absolute hx:-mt-20" id="technique-name-mshta"&gt;&lt;/span&gt;
&lt;a href="#technique-name-mshta" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;Analysis&lt;span class="hx:absolute hx:-mt-20" id="analysis-1"&gt;&lt;/span&gt;
&lt;a href="#analysis-1" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;mshta.exe is a Windows-native binary that executes VBScript or JavaScript
embedded within Microsoft HTML Application (HTA) files. Using a legitimate and
signed binary as mshta gives attackers the means to execute arbitrary code
stored on a remote server while bypassing browser security settings. When
mashta is leveraged by attackers it is invoked through files such as lnk files
and the malicious payload is executed using inline command line arguments or
files that are stored on a remote server.&lt;/p&gt;
&lt;h4&gt;Real Life Example&lt;span class="hx:absolute hx:-mt-20" id="real-life-example-1"&gt;&lt;/span&gt;
&lt;a href="#real-life-example-1" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;&lt;a href="https://cdn2.hubspot.net/hubfs/3354902/Cybereason%20Labs%20Analysis%20Operation%20Cobalt%20Kitty.pdf"target="_blank" rel="noopener"&gt;Operation Cobalt Kitty&lt;/a&gt;
(APT 32) used mshta to execute Cobalt Strike beacons for the
reconnaissancereconsense stage and download further payloads.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.fortinet.com/blog/threat-research/phishing-campaign-targeting-korean-to-deliver-agent-tesla-new-variant"target="_blank" rel="noopener"&gt;Agen Tesla&lt;/a&gt;
uses decoy documents containing VBA macro that calls mshta to download the
first stage of the attack. Afterwards the malware creates a scheduled task to
download and execute a new version of the malware using mshta.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://unit42.paloaltonetworks.com/new-babyshark-malware-targets-u-s-national-security-think-tanks/"target="_blank" rel="noopener"&gt;BabyShark&lt;/a&gt;
malware, associated with North Korean threat actors, in the first stage of the
attack they used a decoy document with VBA macro code that used mshta to
download from a remote server HTA file that will execute the first stage of the
attack. Later they used mshta in the persistence logic to execute further
commands from the command and control server (C2).&lt;/p&gt;
&lt;h4&gt;How to detect&lt;span class="hx:absolute hx:-mt-20" id="how-to-detect-1"&gt;&lt;/span&gt;
&lt;a href="#how-to-detect-1" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;When mshta is used by threat actors it can be invoked by different legitimate
applications. For example phishing documents will execute mshta directly or
using other processes such as powershell or cmd.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/03/boost-your-soc-skills-how-to-detect-good-apps-gone-bad/images/fig1.png" title="Screenshot of process hacker when mshta is executed by a malicious Microsoft Word document." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Screenshot of process hacker when mshta is executed by a malicious Microsoft Word document.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;To identify the usage of mshta by threat actors we need to monitor and alert
upon execution of mshta by suspicious processes and execution of suspicious
processes by mshta (such as wscript). You can use the Sigma rule below to
detect this type of execution:&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;title: Suspicious process execution for mshta
author: Intezer
logsource:
category: process_creation
product: windows
detection:
selection1:
Image: &amp;#39;*mshta.exe&amp;#39;
ParentImage|endswith:
- &amp;#39;winword.exe&amp;#39;
- &amp;#39;excel.exe&amp;#39;
- &amp;#39;powerpnt.exe&amp;#39;
- &amp;#39;cmd.exe&amp;#39;
- &amp;#39;powershell.exe&amp;#39;
- &amp;#39;wscript.exe&amp;#39;
- &amp;#39;cscript.exe&amp;#39;
- &amp;#39;sh.exe&amp;#39;
- &amp;#39;bash.exe&amp;#39;
- &amp;#39;reg.exe&amp;#39;
- &amp;#39;regsvr32.exe&amp;#39;
- &amp;#39;BITSADMIN*&amp;#39;
selection2:
ParentImage: &amp;#39;*mshta.exe&amp;#39;
Image:
- &amp;#39;*cmd.exe&amp;#39;
- &amp;#39;*powershell.exe&amp;#39;
- &amp;#39;*wscript.exe&amp;#39;
- &amp;#39;*cscript.exe&amp;#39;
- &amp;#39;*sh.exe&amp;#39;
- &amp;#39;*bash.exe&amp;#39;
- &amp;#39;*reg.exe&amp;#39;
- &amp;#39;*regsvr32.exe&amp;#39;
- &amp;#39;*BITSADMIN*&amp;#39;
condition: selection1 or selection2
fields:
- CommandLine
- ParentCommandLine&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;Attackers masquerade the usage of mshta by
&lt;a href="https://attack.mitre.org/techniques/T1036/003/"target="_blank" rel="noopener"&gt;renaming&lt;/a&gt; the binary to
something less obvious and suspicious, so you should monitor events of changes
in the path or the name of system utilities. In our signature we are using the
process image name.&lt;/p&gt;
&lt;p&gt;Usually mshtaat execution contains command line arguments and url pointing to
remote hosting servers in the signature. Below we look for these suspicious
arguments:&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;title: mshta execution with command line arguments
author: Intezer
logsource:
category: process_creation
product: windows
detection:
selection:
Image: &amp;#39;*mshta.exe&amp;#39;
CommandLine|contains:
- &amp;#39;javascript&amp;#39;
- &amp;#39;*.hta&amp;#39;
- &amp;#39;vbscript&amp;#39;
- &amp;#39;http&amp;#39;
- &amp;#39;https&amp;#39;
condition: selection&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;h3&gt;Technique name: Squiblydoo&lt;span class="hx:absolute hx:-mt-20" id="technique-name-squiblydoo"&gt;&lt;/span&gt;
&lt;a href="#technique-name-squiblydoo" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;MITRE: &lt;a href="https://attack.mitre.org/techniques/T1218/010/"target="_blank" rel="noopener"&gt;https://attack.mitre.org/techniques/T1218/010/&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Analysis&lt;span class="hx:absolute hx:-mt-20" id="analysis-2"&gt;&lt;/span&gt;
&lt;a href="#analysis-2" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Regsvr32 is a command-line utility to manage the registration of DLLs and
ActiveX controls in the Registry. Squiblydoo is a technique that was discovered
by Casey Smith, it allows the usage of Regsvr32 to load and execute COM
scriptlet (JScript or VBScript embedded in XML file) from a remote server.&lt;/p&gt;
&lt;p&gt;This method is very stealthy. It doesn&amp;rsquo;t make any changes to the Registry and
it bypasses application control and allow-lists as the code is executed under
user permissions by Regsvr32.&lt;/p&gt;
&lt;h4&gt;Real Life Example&lt;span class="hx:absolute hx:-mt-20" id="real-life-example-2"&gt;&lt;/span&gt;
&lt;a href="#real-life-example-2" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;&lt;a href="https://www.proofpoint.com/us/threat-insight/post/leviathan-espionage-actor-spearphishes-maritime-and-defense-targets"target="_blank" rel="noopener"&gt;Leviathan&lt;/a&gt;
is an espionage group that uses Squiblydoo to execute malicious Dlls.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.mandiant.com/resources/phished-at-the-request-of-counsel"target="_blank" rel="noopener"&gt;APT19&lt;/a&gt;
uses Squiblydoo to bypass whitelisting and execute arbitrary code on the
victim&amp;rsquo;s machine.&lt;/p&gt;
&lt;h4&gt;How to detect&lt;span class="hx:absolute hx:-mt-20" id="how-to-detect-2"&gt;&lt;/span&gt;
&lt;a href="#how-to-detect-2" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Regsvr32 has several command line
&lt;a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/regsvr32"target="_blank" rel="noopener"&gt;arguments&lt;/a&gt;,
there is a suspicious combination of arguments that can be a good indication
that the binary is invoked by attackers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;/s will silently execute the command without printing messages&lt;/li&gt;
&lt;li&gt;/i passes a command line string to
&lt;a href="https://docs.microsoft.com/en-gb/windows/win32/api/shlwapi/nf-shlwapi-dllinstall?redirectedfrom=MSDN"target="_blank" rel="noopener"&gt;DllInstall&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition, this method uses scrobj.dll to execute COM scriptlet. To detect
these suspicious process execution we made the Sigma rule below that alerts
upon suspicious parent processes.&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;title: detect Squiblydoo
logsource:
product: windows
category: process_creation
detection:
selection:
Image|endswith: &amp;#39;regsvr32.exe&amp;#39;
CommandLine|contains|all:
- &amp;#39;/i:&amp;#39;
- &amp;#39;/s&amp;#39;
CommandLine|contains:
- &amp;#39;http&amp;#39;
- &amp;#39;https&amp;#39;
- &amp;#39;ftp&amp;#39;
CommandLine|endswith: &amp;#39;scrobj.dll&amp;#39;
condition: selection&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;To check if a scriptlet file implements this Squiblydoo, use
&lt;a href="https://github.com/mikesxrs/Open-Source-YARA-rules/blob/master/RSA/Squiblydoo.yar"target="_blank" rel="noopener"&gt;this&lt;/a&gt;
YARA rule to detect files that may potentially use this technique.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/03/boost-your-soc-skills-how-to-detect-good-apps-gone-bad/images/fig2.png" title="Yara rule for detecting possible Squiblydoo scriptlet." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Yara rule for detecting possible Squiblydoo scriptlet.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h3&gt;Technique Name: Windows Management Instrumentation (WMI)&lt;span class="hx:absolute hx:-mt-20" id="technique-name-windows-management-instrumentation-wmi"&gt;&lt;/span&gt;
&lt;a href="#technique-name-windows-management-instrumentation-wmi" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;h4&gt;Analysis&lt;span class="hx:absolute hx:-mt-20" id="analysis-3"&gt;&lt;/span&gt;
&lt;a href="#analysis-3" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;Windows Management Instrumentation (WMI) is an interface through which a
program or script can perform operations or manage data on a Windows operating
&lt;a href="https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page"target="_blank" rel="noopener"&gt;system&lt;/a&gt;.
WMI gives access to many Windows components, and is therefore heavily leveraged
by threat actors to execute behaviors for gathering information, executing
additional payloads, and lateral movement.&lt;/p&gt;
&lt;p&gt;WMI is often used in VBScript. To connect to a WMI namespace in VBScript, the
function GetObject can be used with a WMI object path that specifies the
namespace that holds the desired classes that you wish to use. The most popular
are located in the &lt;code&gt;root\cimv2&lt;/code&gt; namespace.&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;strComputer = &amp;#34;.&amp;#34;
Set objWMIService = GetObject(&amp;#34;winmgmts:\\&amp;#34; &amp;amp; strComputer &amp;amp; &amp;#34;\root\cimv2&amp;#34;)&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>3 Ways to Save Incident Response Time</title><link>https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/</link><pubDate>Mon, 31 Jan 2022 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/</guid><description>
&lt;p&gt;When there is suspicious activity on an endpoint, the incident response team is responsible for investigating it to find out what happened in the network that caused the potential security breach. Is it a fast-spreading malware… or just a false positive? For anyone in digital forensics and incident response, you need to know ASAP if it&amp;rsquo;s the first, but you also don&amp;rsquo;t want to waste time investigating false positives.&lt;/p&gt;
&lt;p&gt;There are several ways to collect files and forensics evidence, which we&amp;rsquo;ll dig into below with tips and free tools to save you time on each during incident response. These are three key areas we&amp;rsquo;ll look at where you can speed up investigations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;HD forensics:&lt;/strong&gt; Collecting suspicious files based on a predefined incident response plan&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory forensics:&lt;/strong&gt; Using tools to get the memory dump of the compromised endpoint&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Live forensics:&lt;/strong&gt; Scanning the runtime of the compromised endpoint&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;First, one of the most time consuming IR processes is determining if the suspicious activity was a false positive or not. If an infection did take place, identifying the endpoint(s) in the network that were compromised and the malicious artifacts used in the attack can also be tedious. This analysis should be done thoroughly to ensure that no information crucial to the investigation is missed. It can often feel like looking for a needle in the haystack.&lt;/p&gt;
&lt;p&gt;Since time is a major factor when handling incidents in order to reduce the potential damage to the environment, the stakes for conducting incident investigation and response processes are high. That means you want efficient procedures and tools on hand, so your team isn&amp;rsquo;t stuck with something taking hours of time when it could have been done in minutes.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Intezer Analyze&lt;/a&gt; is a free tool that can help you quickly classify and analyze files collected by the forensics methods mentioned above. Let&amp;rsquo;s take you through how we&amp;rsquo;ve seen incident response teams use Intezer and other tools to get more information about forensics artifacts in minutes, not hours.&lt;/p&gt;
&lt;h2&gt;HD Forensics and Classifying Collected Files&lt;span class="hx:absolute hx:-mt-20" id="hd-forensics-and-classifying-collected-files"&gt;&lt;/span&gt;
&lt;a href="#hd-forensics-and-classifying-collected-files" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;One of the methods used to collect forensics evidence is taking an image of the compromised endpoint. This essentially makes a copy of the entire filesystem but the extracted output can reach a high volume. Analyzing the extracted data can be very time consuming for incident response teams.&lt;/p&gt;
&lt;p&gt;In many cases, the analysis of extracted data is performed by comparing the signatures to predefined lists of known malicious hashes. While useful for identifying known malware samples, the smallest change made to a file changes its hash completely, making the new variant unrecognizable to signature detection.&lt;/p&gt;
&lt;p&gt;There are millions of trusted and malicious software created each day. Allow lists based on hashes alone are not enough to detect all of the new threats out there.&lt;/p&gt;
&lt;p&gt;Another challenge posed to HD forensics is files with packed payloads. One of the outcomes of an attacker packing a malware sample is it hides the malicious code and creates a new, never-seen-before hash. Since the new hash won&amp;rsquo;t be picked up by existing blocklists, the malware likely won&amp;rsquo;t be detected.&lt;/p&gt;
&lt;p&gt;Intezer Analyze is different from signature detection. Intezer breaks each executable file into binary code patterns, also called code genes. These genes are referenced against Intezer&amp;rsquo;s vast database containing billions of code pieces from both trusted applications and malware. If a file shares code with another malware, it&amp;rsquo;s immediately flagged as malicious, and classified to the malware family it shares code with. This has proven to be very effective for detecting malware variants over time.&lt;/p&gt;
&lt;p&gt;There are two main ways to send files to Intezer Analyze for analysis:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Online:&lt;/strong&gt; Submit a file using the &lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;web interface&lt;/a&gt;, either by hash (SHA256, SHA1, MD5) or uploading a file from your device.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Script:&lt;/strong&gt; Submitting a collection or a folder of files and/or hashes at once can be accomplished using a &lt;a href="https://github.com/intezer/analyze-python-sdk/blob/master/examples/analyze_folder.py"target="_blank" rel="noopener"&gt;script&lt;/a&gt; created with Intezer&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;SDK. The output of the script, shown below, contains the details of all files that were identified as malicious or at least suspicious by Intezer Analyze. This method saves you time that would usually have to spend classifying and analyzing files.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig1.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Using a script based on Intezer&amp;rsquo;s SDK to analyze a folder that contains several files. The output provides links to the analysis reports for all the malicious and suspicious files in question, including their verdict, malware family name and SHA256.&lt;/p&gt;
&lt;p&gt;More detailed information can be found on the web UI. If you open the analysis of the last file from the script, you can see the full &lt;a href="https://analyze.intezer.com/files/339620e7f6f5a2b4c511c76488b19bed21e1015afe4b037a7a1b27e07fba0ec2/iocs?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;analysis report&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig2.png" title="Analysis of a Loki sample (https://analyze.intezer.com/files/339620e7f6f5a2b4c511c76488b19bed21e1015afe4b037a7a1b27e07fba0ec2)" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Analysis of a Loki sample (https://analyze.intezer.com/files/339620e7f6f5a2b4c511c76488b19bed21e1015afe4b037a7a1b27e07fba0ec2)&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;This sample is identified as a Loki variant since it shares code genes with other samples from the same malware family, seen in the process tree resulting from the execution of the file in a sandbox.&lt;/p&gt;
&lt;p&gt;Next, you can view the TTPs with each technique mapped to the MITRE ATT&amp;amp;CK® framework. Also, the IoCs tab provides network information and hashes of the files that were dropped by the malware. All of this information can be downloaded in a CSV format.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig3.png" title="TTPs with MITRE ATT&amp;amp;CK® framework" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;TTPs with MITRE ATT&amp;amp;CK® framework&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Under TTPs, you can see that among the capabilities of this sample are that it collects identification information about the system and has information stealing capabilities. This makes sense considering that the sample shares most of its code with Loki, an information stealing malware. The information presented further supports the classification of the file as Loki.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig4.png" title="IoCs extracted from the Loki sample can be used to detect similar threats which use the same domains." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;IoCs extracted from the Loki sample can be used to detect similar threats which use the same domains.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;Intezer Analyze also provides a code-based vaccine for each threat which can be downloaded in several formats, including YARA, STIX, Stix2, and OpenIOX. Signatures that are based on code are stronger than string-based signatures because they are produced from the specific code that executes a certain functionality in the malware. You can use the vaccine and the information provided in the IoCs and TTPs tabs to detect similar files in the environment using your existing security tools like SIEM, EDR and XDR.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig5.png" title="Generating a code-based vaccine in Intezer Analyze." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Generating a code-based vaccine in Intezer Analyze.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;For new threat variants, the analysis may show a portion of unique code as a result of new capabilities and features added to the malware. In this case, an investigator might want to get more information about the threat. If a deeper analysis of the file is needed, Intezer has plugins for &lt;a href="https://analyze.intezer.com/ida-plugin?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;IDA Pro&lt;/a&gt; and &lt;a href="https://github.com/intezer/analyze-community-ghidra-plugin"target="_blank" rel="noopener"&gt;Ghidra&lt;/a&gt;. Both plugins enrich the assembly code with Intezer&amp;rsquo;s unique code reuse insights. These plugins accelerate the reverse engineering process and allow the analyst to focus solely on the malicious components by filtering out the trusted and library code sections.&lt;/p&gt;
&lt;h2&gt;Analyzing Memory Dumps to Improve Incident Response Time&lt;span class="hx:absolute hx:-mt-20" id="analyzing-memory-dumps-to-improve-incident-response-time"&gt;&lt;/span&gt;
&lt;a href="#analyzing-memory-dumps-to-improve-incident-response-time" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Another source of forensics evidence is based on the volatile memory of the compromised endpoint. This method presents the image of all running processes and produces a smaller amount of files which need to be analyzed. There are several popular tools that are used for memory acquisition of Windows machines such as Dumpit, &lt;a href="https://github.com/Velocidex/WinPmem"target="_blank" rel="noopener"&gt;WinPmem&lt;/a&gt;, and Process Hacker. The most common tool to inspect memory dumps is &lt;a href="https://www.volatilityfoundation.org/"target="_blank" rel="noopener"&gt;Volatility&lt;/a&gt;. By using Intezer with the &lt;a href="https://intezer.com/blog/malware-analysis/accelerate-incident-response-with-intezer-analyze-volatility-plugin/?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Volatility plugin&lt;/a&gt; (available as a free trial), you can get a full code reuse analysis of the memory dump in just a few minutes.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig6.png" title="Executing Intezer&amp;#39;s plugin for Volatility on a memory dump." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Executing Intezer&amp;#39;s plugin for Volatility on a memory dump.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;To run the plugin, use your Intezer Analyze API key, which can be passed as an argument or set in the environment variables of the system. The results of the execution can be viewed in the Endpoint and Memory Scans report page and they will look similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig7.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;The memory scan shows the classification of all running code and processes collected from memory and analyzed using the Volatility plugin.&lt;/p&gt;
&lt;p&gt;As you can see, the incident response team benefits from classifying all threats and their capabilities, which normally takes hours or even days when using EDRs.&lt;/p&gt;
&lt;h2&gt;Scan Compromised Endpoints to Detect Threats Loaded In-Memory&lt;span class="hx:absolute hx:-mt-20" id="scan-compromised-endpoints-to-detect-threats-loaded-in-memory"&gt;&lt;/span&gt;
&lt;a href="#scan-compromised-endpoints-to-detect-threats-loaded-in-memory" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The advantage of scanning the runtime of compromised environments is having the ability to detect malicious processes that are being executed, even if they managed to evade detection and bypass other security tools.&lt;/p&gt;
&lt;p&gt;Scanning the runtime environment of the endpoints can be extremely useful for conducting digital forensics and incident response (DFIR). With this approach, once an alert on an endpoint is triggered, the investigator can obtain the memory dump and scan it for any malicious artifacts, making it possible to find the necessary artifacts and narrowing the scope of the investigation around the presented evidence.&lt;/p&gt;
&lt;p&gt;In this case, the Intezer Analyze &lt;a href="https://analyze.intezer.com/?tab=endpoint&amp;amp;utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;endpoint scanner&lt;/a&gt; can be executed on a compromised Windows endpoint. It collects all of the loaded processes and analyzes them using Intezer&amp;rsquo;s code comparison technology. You can see the result on the Analyze web UI. The scanner saves investigators not only the effort of collecting memory dumps, but also the time spent analyzing them.&lt;/p&gt;
&lt;p&gt;Below is an endpoint infected with Formbook malware:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://research.intezer.com/blog/2022/01/save-incident-response-time-intezer-analyze/images/fig8.png" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;Results from the endpoint scanner show a malicious process that was detected as Formbook information stealer. The scanner quickly picked up the malicious process and identified it without the need for manual investigation.&lt;/p&gt;
&lt;h2&gt;Get the Tools for More Efficient Incident Response&lt;span class="hx:absolute hx:-mt-20" id="get-the-tools-for-more-efficient-incident-response"&gt;&lt;/span&gt;
&lt;a href="#get-the-tools-for-more-efficient-incident-response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The features, tools and plugins mentioned in this blog are aimed at making the lives of incident responders easier and more efficient. All the tools mentioned above are free or have free trials available. Sign up to &lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Intezer Analyze&lt;/a&gt; for a free community account to start taking advantage of these tools and save time the next time you&amp;rsquo;re investigating an incident.&lt;/p&gt;
&lt;p&gt;Tools mentioned in this article:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://analyze.intezer.com/?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;File analysis with Intezer Analyze&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://analyze.intezer.com/ida-plugin?utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;IDA Pro plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/intezer/analyze-community-ghidra-plugin"target="_blank" rel="noopener"&gt;Ghidra plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://analyze.intezer.com/?tab=endpoint&amp;amp;utm_campaign=research-blog&amp;amp;utm_content=save-incident-response-time-intezer-analyze&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;Endpoint scanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/intezer/analyze-python-sdk"target="_blank" rel="noopener"&gt;Intezer&amp;rsquo;s SDK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Conducting Digital Forensics Incident Response (DFIR) on an Infected GitLab Server</title><link>https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/</link><pubDate>Thu, 04 Nov 2021 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/</guid><description>
&lt;h2&gt;GitLab servers are under attack with a now-patched critical vulnerability&lt;span class="hx:absolute hx:-mt-20" id="gitlab-servers-are-under-attack-with-a-now-patched-critical-vulnerability"&gt;&lt;/span&gt;
&lt;a href="#gitlab-servers-are-under-attack-with-a-now-patched-critical-vulnerability" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Earlier this week we investigated an incident that occurred on a user&amp;rsquo;s GitLab
server. After the user installed a sensor on their server, an initial runtime
scan was performed. An alert was immediately triggered on the execution of a
malicious metasploit shellcode named &lt;code&gt;gitlab.elf&lt;/code&gt;, which occurred a few days
prior to the installation of the sensor. Several hours later another alert was
triggered, this time upon the execution of an XMRig Miner. The malware was also
executed several days before the sensor was installed. We notified the user and
began our own investigation with the goal of understanding how the attacker got
into the system and what the scope of the incident was. Consistent with our
findings,
&lt;a href="https://thehackernews.com/2021/11/alert-hackers-exploiting-gitlab.html"target="_blank" rel="noopener"&gt;news broke&lt;/a&gt;
later that day that attackers were exploiting a GitLab unauthenticated remote
code execution (RCE) vulnerability. In this post we describe the investigation
process conducted by Intezer&amp;rsquo;s research and engineering teams using the runtime
security sensor installed on the victim&amp;rsquo;s host.&lt;/p&gt;
&lt;h2&gt;The Incident&lt;span class="hx:absolute hx:-mt-20" id="the-incident"&gt;&lt;/span&gt;
&lt;a href="#the-incident" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The individual was a new user who had just installed the a sensor on a CentOS
host. Immediately after the install, an initial scan was performed and the
sensor identified a running shellcode inside a container on the user&amp;rsquo;s host.
The alert presented important information about the execution of the process
including the process tree, execution path, details about the user&amp;rsquo;s host, and
the files containing malware. Using this information, we were able to get more
details about the malicious process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The process was executed inside a container based on a
&lt;code&gt;gitlab/gitlab-ce:12.10.10-ce.0&lt;/code&gt; Docker image&lt;/li&gt;
&lt;li&gt;The path and filename of the malicious process is
&lt;code&gt;/var/opt/gitlab/gitlab-workhorse/gitlab.elf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;EUID of the process is 998&lt;/li&gt;
&lt;li&gt;The process connected to &lt;code&gt;172.96.190[.]95:904&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The alert also
&lt;a href="https://analyze.intezer.com/files/cd54a34dbd7d345a7fd7fd8744feb5c956825317e9225edb002c3258683947f1?utm_campaign=research-blog&amp;amp;utm_content=dfir-infected-gitlab-server&amp;amp;utm_medium=referral&amp;amp;utm_source=research.intezer.com"target="_blank" rel="noopener"&gt;links&lt;/a&gt;
to Intezer, which identifies the shellcode as a metasploit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;During this time, the second alert appeared, shown below, notifying the user
that an XMRig Miner was executed inside the container. The name of the file
that contains the malware was &lt;code&gt;syslogd64&lt;/code&gt;. Using the parent process ID (PPID)
information from the alert, we were able to determine that it was executed by a
script called &lt;code&gt;okk.sh&lt;/code&gt;. The shellcode in &lt;code&gt;gitlab.elf&lt;/code&gt; provides a reverse TCP
shell that delivers &lt;code&gt;okk.sh&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We inspected the events that occurred on the victim&amp;rsquo;s host and found a curl
command executed inside the container. Shown below are Events which can be
accessed from the sensor dashboard. A curl command is seen which uses the
whoami value as part of the target&amp;rsquo;s hostname.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/images/fig1.png" title="Curl command seen under Events." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Curl command seen under Events.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We were also able to find another script called &lt;code&gt;tmp.sh&lt;/code&gt; under the Events tab.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The scripts install an XMRig Miner and implement persistence by creating a
systemd service while adding the malware to a &lt;code&gt;.profile&lt;/code&gt; file in the user&amp;rsquo;s
home folder.&lt;/li&gt;
&lt;li&gt;Another wallet ID is used in this script:
&lt;code&gt;44wrH5Y3VXn577ZJHAJwZG8pLMNQXURsGKnNfbwUNmv3fJdHcedednZSna9hbFU5ojBkF83beV5CJYnqh9jnZNNdTJ4oXor&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/images/fig2.png" title="View of tmp.sh execution event from the sensor." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;View of tmp.sh execution event from the sensor.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/images/fig3.png" title="Tmp.sh execution event." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Tmp.sh execution event.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;We examined &lt;code&gt;okk.sh&lt;/code&gt; and got the following details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The script removes previously installed cryptominers.&lt;/li&gt;
&lt;li&gt;The script tries to remove the malware that is executed in this attack but it
doesn&amp;rsquo;t seem to work.&lt;/li&gt;
&lt;li&gt;The installation command, Install XMRig miner, is copied from the pool&amp;rsquo;s
setup documentation page, shown in the image below.&lt;/li&gt;
&lt;li&gt;The wallet ID used by the attacker is
&lt;code&gt;45P62r6YsHWagiRZ6K5tGeKPy2tFFwfYvdfatsKHCC7wATRrsKqqSFySocLVtrKFzYj1RzYu2mSD9HXBofYusbfdAiSCkvM&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/images/fig4.png" title="Installation command for the cryptominer" alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Installation command for the cryptominer&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The victim&amp;rsquo;s host exposed the GitLab authentication page on port 8080. We can
assume that the breach happened due to weak credentials picked up by the
attacker, or by abusing the recently discovered RCE vulnerability
(&lt;a href="https://nvd.nist.gov/vuln/detail/CVE-2021-22205"target="_blank" rel="noopener"&gt;CVE-2021-22205&lt;/a&gt;) in GitLab.&lt;/p&gt;
&lt;h2&gt;Looking Inside the Wallets&lt;span class="hx:absolute hx:-mt-20" id="looking-inside-the-wallets"&gt;&lt;/span&gt;
&lt;a href="#looking-inside-the-wallets" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;We were able to view the status of the wallets in the pool&amp;rsquo;s dashboard. Each
wallet was using hundreds of workers at the time of this post. The images below
show details of the wallets including their hash rates and activity of the
cryptominers.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/images/fig5.png" title="Hash rates of the wallet." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Hash rates of the wallet.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;img src="https://research.intezer.com/blog/2021/11/dfir-infected-gitlab-server/images/fig6.png" title="Hash rates of the second wallet." alt="" loading="lazy" /&gt;
&lt;figcaption&gt;Hash rates of the second wallet.&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/p&gt;
&lt;h2&gt;Threat Detection and Response&lt;span class="hx:absolute hx:-mt-20" id="threat-detection-and-response"&gt;&lt;/span&gt;
&lt;a href="#threat-detection-and-response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Attackers are constantly searching for internet-facing instances and
applications that are vulnerable, misconfigured, or have weak credentials.
Users should always install the latest security updates, patch their systems,
avoid exposing applications to the internet when they can, and enforce
multi-factor authentication. While it&amp;rsquo;s important to implement all the right
security policies and to keep systems up to date, zero-days are bound to
happen. Runtime protection solutions come in handy for detecting when the
attacker has already compromised the environment and launched malware. This
post was a joint effort between Intezer&amp;rsquo;s research and engineering teams.
Special thanks to Adir Shemesh.&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;h3&gt;Gitlab.elf&lt;span class="hx:absolute hx:-mt-20" id="gitlabelf"&gt;&lt;/span&gt;
&lt;a href="#gitlabelf" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;cd54a34dbd7d345a7fd7fd8744feb5c956825317e9225edb002c3258683947f1&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Syslogd64&lt;span class="hx:absolute hx:-mt-20" id="syslogd64"&gt;&lt;/span&gt;
&lt;a href="#syslogd64" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;be6ac1ac095545af4a192c55b259f882933269fc7abf06f283b07487b6253ea7&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Okk.sh&lt;span class="hx:absolute hx:-mt-20" id="okksh"&gt;&lt;/span&gt;
&lt;a href="#okksh" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;7d9adc0b7caebe60ab3e5709e1e6de48b6455f352afff61acf53620f9999139f&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Tmp.sh&lt;span class="hx:absolute hx:-mt-20" id="tmpsh"&gt;&lt;/span&gt;
&lt;a href="#tmpsh" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;00fc15eadd33b1055cd3f30869363c6498d2668b8f1e244e82ba1a9abff58bf1&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Wallet IDs&lt;span class="hx:absolute hx:-mt-20" id="wallet-ids"&gt;&lt;/span&gt;
&lt;a href="#wallet-ids" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;44wrH5Y3VXn577ZJHAJwZG8pLMNQXURsGKnNfbwUNmv3fJdHcedednZSna9hbFU5ojBkF83beV5CJYnqh9jnZNNdTJ4oXor&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;45P62r6YsHWagiRZ6K5tGeKPy2tFFwfYvdfatsKHCC7wATRrsKqqSFySocLVtrKFzYj1RzYu2mSD9HXBofYusbfdAiSCkvM&lt;/code&gt;&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>Building Your Bullet Proof Incident Response Plan</title><link>https://research.intezer.com/blog/2018/03/building-your-bullet-proof-incident-response-plan/</link><pubDate>Thu, 15 Mar 2018 00:00:00 +0000</pubDate><guid>https://research.intezer.com/blog/2018/03/building-your-bullet-proof-incident-response-plan/</guid><description>
&lt;p&gt;Cyber security is constantly evolving, and therefore rife with challenges.
Whether hobbyist hackers or state-sponsored threat actors are targeting
organizations, internal security operations center (SOC) teams must proactively
assemble a robust incident response plan in order to strategically manage and
ultimately eradicate attacks.&lt;/p&gt;
&lt;p&gt;Security teams at even the largest organizations can be overwhelmed by the
large number of attacks that need to be investigated. Meanwhile, sensitive
information is at risk of being compromised by the proverbial needle in the
haystack: malware hiding in plain sight among false positives.&lt;/p&gt;
&lt;h2&gt;Malware hiding in plain sight among false positives&lt;span class="hx:absolute hx:-mt-20" id="malware-hiding-in-plain-sight-among-false-positives"&gt;&lt;/span&gt;
&lt;a href="#malware-hiding-in-plain-sight-among-false-positives" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;It’s critical to accurately detect and analyze these threats. However,
discovering and fully understanding attacks continues to be difficult for even
the most experienced and well equipped cyber security professionals.&lt;/p&gt;
&lt;h2&gt;Supercharge your incident response&lt;span class="hx:absolute hx:-mt-20" id="supercharge-your-incident-response"&gt;&lt;/span&gt;
&lt;a href="#supercharge-your-incident-response" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;But what if organizations had a tool in their arsenal that could accomplish all
of this quickly as part of their incident response plan?&lt;/p&gt;
&lt;p&gt;Now they do, with Intezer Analyze™–the only malware analysis solution to apply
code reuse detection.&lt;/p&gt;
&lt;p&gt;Powered by Code Intelligence™ technology, Intezer Analyze™ is a malware
analysis solution built by incident response professionals for incident
response professionals. It easily integrates processes and automations, saving
time and simplifying operations, and most importantly, provides an accurate and
definitive report on the nature of any current attacks on an organization.
Classification is now possible in the same breath, empowering teams to begin
remediation efforts immediately. With nearly 70% of organizations reporting
malware as the root cause of investigated incidents, Intezer Analyze™ is poised
to change the odds for security leaders.&lt;/p&gt;
&lt;p&gt;In any organization, removing the massive distraction of false positives is
only half the battle. The other lies in capitalizing on available time and
staff attention to address attacks before they wreak havoc on businesses.
Intezer Analyze™ equips security professionals to do all of this and more,
intelligently bolstering defenses and providing immunity against future
threats.&lt;/p&gt;</description></item></channel></rss>