Trellix Insights: DriftingCloud APT Targets Zero-Day Sophos Firewall Vulnerability
Technical Articles ID:
KB95861
Last Modified: 2022-08-22 09:16:27 Etc/GMT
Last Modified: 2022-08-22 09:16:27 Etc/GMT
Environment
IMPORTANT: This Knowledge Base article discusses a specific threat that is being automatically tracked by Trellix Insights technology. The content is intended for use by Trellix Insights users, but is provided for general knowledge to all customers. Contact us for more information about Trellix Insights.
Summary
Description of Campaign
The DriftingCloud APT group targeted a vulnerable Sophos Firewall to gain initial access into the targets network. The flaw is covered under CVE-2022-1040 and is due to an authentication bypass vulnerability in the User Portal and Webadmin components. The actor also compromised other systems using session cookies collected during man-in-the-middle attacks, as well as dropped web shells and malware during the operation.
Our ATR team gathers and analyzes information from multiple open and closed sources before disseminating intelligence reports. This campaign was researched by Volexity and shared publicly.
How to use this article:
This Knowledge Base article discusses a specific threat that's being tracked. The list of IOCs will change over time; check Trellix Insights for the latest IOCs.
Campaign IOC
Minimum Content Versions
Detection Summary
Minimum set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Endpoint Security - Advanced Threat Protection:Rule ID: 4 Use GTI file reputation to identify trusted or malicious files
Rule ID: 239 Identify suspicious command parameter execution
Endpoint Security - Exploit Prevention:
Rule ID: 6143 T1003 - Attempt to Dump Password Hash from SAM Database
Rule ID: 8004 Fileless Threat: Malicious PowerShell Behavior Detected
Rule ID: 6127 Suspicious LSASS Access from PowerShell
Rule ID: 6113 T1055 - Fileless Threat: Reflective Self Injection
Host Intrusion Prevention:Rule ID: 6083 PowerShell Command Restriction - NonInteractive
Rule ID: 6081 PowerShell Command Restriction - NoProfile
Rule ID: 6070 Hidden PowerShell Detected
Rule ID: 6113 T1055 - Fileless Threat: Reflective Self Injection
Rule ID: 6135 Unmanaged PowerShell Detected
Aggressive set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Host Intrusion Prevention:Rule ID: 6010 Generic Application Hooking Protection
Rule ID: 1148 CMD Tool Access by a Network Aware Application
Rule ID: 6011 Generic Application Invocation Protection
Rule ID: 1020 Windows Agent Shielding - File Access
The DriftingCloud APT group targeted a vulnerable Sophos Firewall to gain initial access into the targets network. The flaw is covered under CVE-2022-1040 and is due to an authentication bypass vulnerability in the User Portal and Webadmin components. The actor also compromised other systems using session cookies collected during man-in-the-middle attacks, as well as dropped web shells and malware during the operation.
Our ATR team gathers and analyzes information from multiple open and closed sources before disseminating intelligence reports. This campaign was researched by Volexity and shared publicly.
How to use this article:
- If a Threat Hunting table has been created, use the rules contained to search for malware related to this campaign.
- Review the product detection table and confirm that your environment is at least on the specified content version.
To download the latest content versions, go to the Security Updates page. - Scroll down and review the "Product Countermeasures" section of this article. Consider implementing them if they are not already in place.
- Review
KB91836 - Countermeasures for entry vector threats . - Review KB87843 - Dynamic Application Containment rules and best practices.
- Review KB82925 - Identify what rule corresponds to an Adaptive Threat Protection and Threat Intelligence Exchange event.
{ meta: author = "threatintel@volexity.com" description = "Looks for artifacts generated (generally seen in .class files) related to the Behinder framework." date = "2022-03-18" hash1 = "9a9882f9082a506ed0fc4ddaedd50570c5762deadcaf789ac81ecdbb8cf6eff2" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" reference = "https://github.com/MountCloud/BehinderClientSource/blob/master/src/main/java/net/rebeyond/behinder/core/ShellService.java" memory_suitable = 1 strings: $s1 = "CONNECT" ascii fullword $s2 = "DISCONNECT" ascii fullword $s3 = "socket_" ascii fullword $s4 = "targetIP" ascii fullword $s5 = "targetPort" ascii fullword $s6 = "socketHash" ascii fullword $s7 = "extraData" ascii fullword condition: all of them } |
|
{ meta: author = "threatintel@volexity.com" description = "Identifies suspicious java-based files which have all the ingredients required for a webshell." date = "2022-04-07" hash1 = "0d5dc54ef77bc18c4c5582dca4619905605668cffcccc3829e43c6d3e14ef216" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 0 strings: $s1 = "javax.crypto.spec.SecretKeySpec" ascii $s2 = "java/security/SecureClassLoader" ascii $s3 = "sun.misc.BASE64Decoder" ascii condition: filesize < 50KB and all of them } |
|
{ meta: author = "threatintel@volexity.com" description = "Looks for obfuscated PHP shells where create_function() is obfuscated using str_replace and then called using no arguments." date = "2022-04-04" hash1 = "c713d13af95f2fe823d219d1061ec83835bf0281240fba189f212e7da0d94937" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 0 strings: $php = " // $P=str_replace( $s = "=str_replace(" ascii // call it as a function // $S=$P('',$a); $anon_func = "(''," ascii condition: filesize < 100KB and $php at 0 and for any i in (1..#s): ( for any j in (1..#anon_func): ( uint16be(@s[i]-2) == uint16be(@anon_func[j]-2) ) ) } |
|
{ meta: author = "threatintel@volexity.com" description = "Detects PANTEGANA, a Golang backdoor used by a range of threat actors due to its public availability." date = "2022-03-30" hash1 = "8297c99391aae918f154077c61ea94a99c7a339166e7981d9912b7fdc2e0d4f0" reference = "https://github.com/elleven11/pantegana" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 1 strings: $s1 = "RunFingerprinter" ascii $s2 = "SendSysInfo" ascii $s3 = "ExecAndGetOutput" ascii $s4 = "RequestCommand" ascii $s5 = "bindataRead" ascii $s6 = "RunClient" ascii $magic = "github.com/elleven11/pantegana" ascii condition: 5 of ($s*) or $magic } |
|
{ meta: author = "threatintel@volexity.com" description = "Detects the PUPYRAT malware family, a cross-platform RAT written in Python." date = "2022-04-07" hash1 = "7474a6008b99e45686678f216af7d6357bb70a054c6d9b05e1817c8d80d536b4" reference = "https://github.com/n1nj4sec/pupy" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 1 strings: $elf1 = "LD_PRELOAD=%s HOOK_EXIT=%d CLEANUP=%d exec %s 1>/dev/null 2>/dev/null" ascii $elf2 = "reflective_inject_dll" fullword ascii $elf3 = "ld_preload_inject_dll" fullword ascii $pupy1 = "_pupy.error" ascii $pupy2 = "_pupy" ascii $pupy3 = "pupy://" ascii $s1 = "Args not passed" ascii $s2 = "Too many args" ascii $s3 = "Can't execute" ascii $s4 = "mexec:stdin" ascii $s5 = "mexec:stdout" ascii $s6 = "mexec:stderr" ascii $s7 = "LZMA error" ascii condition: any of ($elf*) or all of ($pupy*) or all of ($s*) } |
|
{ meta: author = "threatintel@volexity.com" description = "Look for PHP files which use file_get_contents and then shortly afterwards use an eval statement." date = "2021-06-16" hash1 = "1a34c43611ee310c16acc383c10a7b8b41578c19ee85716b14ac5adbf0a13bd5" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 0 strings: $s1 = "file_get_contents(\"php://input\");" $s2 = "eval(" condition: $s2 in (@s1[1]..@s1[1]+512) } |
|
{ meta: author = "threatintel@volexity.com" description = "Webshells using call_user_func against an object from a file input or POST variable." date = "2021-06-16" hash1 = "40b053a2f3c8f47d252b960a9807b030b463ef793228b1670eda89f07b55b252" reference = "https://zhuanlan.zhihu.com/p/354906657" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 0 strings: $s1 = "@call_user_func(new C()" wide ascii condition: $s1 } |
|
{ meta: author = "threatintel@volexity.com" description = "Detects the IceScorpion webshell." date = "2022-01-17" hash1 = "5af4788d1a61009361b37e8db65deecbfea595ef99c3cf920d33d9165b794972" reference = "https://www.codenong.com/cs106064226/" license = "See license at https://github.com/volexity/threat-intel/blob/main/LICENSE.txt" memory_suitable = 0 strings: $s1 = "[$i+1&15];" $s2 = "openssl_decrypt" condition: all of them and filesize < 10KB } |
This Knowledge Base article discusses a specific threat that's being tracked. The list of IOCs will change over time; check Trellix Insights for the latest IOCs.
Campaign IOC
Type | Value |
Minimum Content Versions
Content Type | Version |
Detection Summary
IOC | Scanner | Detection |
Minimum set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Endpoint Security - Advanced Threat Protection:
Rule ID: 239 Identify suspicious command parameter execution
Endpoint Security - Exploit Prevention:
Rule ID: 8004 Fileless Threat: Malicious PowerShell Behavior Detected
Rule ID: 6127 Suspicious LSASS Access from PowerShell
Rule ID: 6113 T1055 - Fileless Threat: Reflective Self Injection
Host Intrusion Prevention:
Rule ID: 6081 PowerShell Command Restriction - NoProfile
Rule ID: 6070 Hidden PowerShell Detected
Rule ID: 6113 T1055 - Fileless Threat: Reflective Self Injection
Rule ID: 6135 Unmanaged PowerShell Detected
Aggressive set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Host Intrusion Prevention:
Rule ID: 1148 CMD Tool Access by a Network Aware Application
Rule ID: 6011 Generic Application Invocation Protection
Rule ID: 1020 Windows Agent Shielding - File Access