Tag: security bulletin

  • TekStream Security Bulletin: TellYouThePass Ransomware

    TekStream Security Bulletin: TellYouThePass Ransomware

    By Julian Bermudez, Senior Splunk Consultant

    Introduction

    On June 8th, 2024, the TellYouThePass ransomware gang began exploiting the recently patched CVE-2024-4577.

    This vulnerability for remote code execution in PHP has been exploited to deliver webshells and execute encryptor payloads on exposed devices.

    Imperva researchers have determined that the bug is using the Windows mshta.exe binary to execute arbitrary PHP code to run malicious HTML app files.

    In short, it has been stated that the vulnerability can be seen being exploited with the following chain of events:

    1. The Windows mshta.exe binary contains a VBScript that loads a .NET variant of the ransomware into memory.
    2. The malware then fires off an HTTP request to what is perceived to be a CSS resource but is actually a command-and-control server that encrypts files on the target host.
    3. The final step is to place a README ransom note with instructions on how to recover data.

    Additional details can be found here: BleepingComputer Post about the PHP Exploit

    Mitigation Strategies

    The vulnerability has been acknowledged by WatchTowr Labs and they have suggested various mitigation steps to prevent its exploitation.

    These steps include:

    1. Immediately patching PHP installations with the patched versions 8.1.29, 8.2.20, and 8.3.8.
    2. For servers that cannot be quickly upgraded, there are temporary mitigation steps that can be taken such as alerting Apache rewrite rules or disabling the PHP-CGI feature. Steps for this potential remediation can be found here: Remediation Steps

    This is not a blog post to fully explain or give recommendations on remediating the vulnerability, this has been discussed at length by various resources such as:

    GitHub Link with CVE details

    DEVCORE blog post about CVE-2024-4577

    Detection with Splunk

    So far, we have seen many good detection options and would like to present a few more specific cases using everyone’s favorite SIEM Splunk.  

    The goal here is to aggregate the detections to maximize your chances of detecting this critical attack. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the CVE-2024-4577 vulnerability being exploited. Here at TekStream, we have several security engineers that are intimate with cybersecurity knowledge and especially the logs of our clients.

    We go through the various steps in CVE-2024-4577 vulnerability exploitation and detection. With this format, we are providing a more generic data model “tstats” command. This is taking advantage of the data model to quickly find data that may match our IOC list. We then provide examples of a more specific search that will add context to the first find. There will be a wide variety of specific searches as each client has their own specific technologies. To get help building detection for your specific client, fill in the form below and get access to our Splunk/security expertise.

    Note: The follow-up of the initial access attack is normally the execution of a specific script that establishes a connection to a rogue server. Detecting this part is not covered in this blog post. Reach out to TekStream by filling out the form below if you’d like specific guidance on that aspect.

    The following detection steps mirror the stages and TTP-related indicators used in the attack:

    1. Detect initial malicious file spawning: mshta.exe
    2. Search for potential beaconing web traffic containing specific parameters.
    3. Detect ancillary signs of malicious script activity: VBScript
    4. Persistent malicious file install.
    5. Detect data exfiltration.
    6. Scan for related known malicious IPs.
    7. Scan for related known malicious web domain.

    SPL

    LEVERAGING ENDPOINT DATA TO SEARCH FOR MALICIOUS FILES (EDR, AV, OS, etc.)

    | tstats `summariesonly` latest(_time) as _time, 
    latest(Filesystem.file_create_time) as file_create_time, 
    latest(Filesystem.file_modify_time) as file_modify_time, 
    latest(Filesystem.file_access_time) as file_access_time, values(Filesystem.dest) as 
    dest, values(Filesystem.action) as action, values(Filesystem.file_name) as 
    file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) 
    as file_path, values(Filesystem.file_size) as file_size from 
    datamodel="Endpoint"."Filesystem" where (Filesystem.file_name = "* mshta.exe" 
    OR Filesystem.file_name = "* d.hta") by Filesystem.src | fields _time, dest, action, 
    file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, 
    file_access_time | fieldformat Time = strftime(_time,"%m/%d/%Y %T")

    LEVERAGING ENDPOINT DATA TO SEARCH FOR MALICIOUS HASH (EDR, AV, OS, etc.)

    | tstats `summariesonly` latest(_time) as _time, values(Processes.user) as user, 
    values(Processes.process) as process, latest(Processes.parent_process) as 
    parent_process, latest(Processes.parent_process_exec) as parent_process_exec, 
    latest(Processes.parent_process_guid) as parent_process_guid, 
    latest(Processes.parent_process_id) as parent_process_id, 
    latest(Processes.parent_process_path) as parent_process_path, 
    latest(Processes.process_path) as process_path, latest(Processes.process_exec) 
    as process_exec, latest(Processes.process_guid) as process_guid, 
    latest(Processes.process_id) as process_id, latest(Processes.process_hash) as 
    process_hash from datamodel="Endpoint"."Processes" where 
    (Processes.process_hash IN(
    “9562AD2C173B107A2BAA7A4986825B52E881A935DEB4356BF8B80B1EC6D41C53”,
    “5a2b9ddddea96f21d905036761ab27627bd6db4f5973b006f1e39d4acb04a618”,
    “95279881525d4ed4ce25777bb967ab87659e7f72235b76f9530456b48a00bac3”) 
    by Processes.dest, Processes.process_name, Processes.parent_process_name | 
    head 10000 | `drop_dm_object_name("Processes")` | fields _time, dest, user, 
    process_name, process, process_hash, process_path, process_exec, process_id, 
    process_guid, parent_process, parent_process_name, parent_process_path, 
    parent_process_exec, parent_process_guid, parent_process_id

    LEVERAGING NETWORK TRAFFIC DATA TO DETECT MALICIOUS CONNECTIONS (Firewall, IDS/IPS, DNS, etc.)

    | tstats `summariesonly` values(_time) as _time, sum("All_Traffic.bytes") as bytes, 
    values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as 
    transport, values("All_Traffic.dest_port") as dest_port from 
    datamodel="Network_Traffic"."All_Traffic", values("All_Traffic.action") as action 
    where All_Traffic.src="88.218.76.13” AND All_Traffic.action !=blocked AND 
    All_Traffic.dest_category !=internal AND All_Traffic.bytes > 1000  by  "All_Traffic.dest" , "All_Traffic.user", "All_Traffic.src", _time span=1h
    | rename "All_Traffic.dest" as dest, "All_Traffic.user" as user, "All_Traffic.src" as 
    src
    | table_time, action, src, src_port, dest, transport, dest_port, user, bytes
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    

    LEVERAGING AUTH DATA TO ATTEMPT TO DETECT UNAUTHORIZED ACCESS (OS, MFA/SSO, application, etc.)

    | tstats `summariesonly` latest(_time) as _time, 
    values(Authentication.src_user_id) as src_user_id, 
    values(Authentication.src_user_role) as src_user_role, 
    values(Authentication.user_id) as user_id, values(Authentication.user_role) as 
    user_role, values(Authentication.vendor_account) as vendor_account, 
    values(Authentication.authentication_method) as authentication_method from 
    datamodel="Authentication"."Authentication" where 
    (Authentication.src="88.218.76.13" OR Authentication.dest="88.218.76.13") by 
    "Authentication.action", "Authentication.app", "Authentication.src", 
    "Authentication.src_user", "Authentication.dest", "Authentication.user" 
    | head 10000 
    | `drop_dm_object_name("Authentication")` 
    | fields _time, action, app, src, src_user, src_user_id, src_user_role, dest, user, 
    user_id, user_role, vendor_account, authentication_method
    
    

    LEVERAGING WEB DATA TO DETECT MALICIOUS URLs (Firewall, Proxy, DNS, etc.)

    Note: replace hxxp with http when searching. This search shows hxxp to prevent an accidental click.

    | tstats `summariesonly` sum("Web.bytes") as 
    bytes,values("Web.http_content_type") as 
    http_content_type,values("Web.http_method") as 
    http_method,values("Web.http_user_agent") as 
    http_user_agent,values("Web.status") as status from datamodel="Web"."Web" 
    where Web.url IN (“hxxp://88.218.76.13/dd3.hta”) by "Web.src", "Web.dest", 
    "Web.user", "Web.http_referrer", "Web.url", _time | 
    `drop_dm_object_name("Web")` | fields _time src, dest, user, http_referrer, url, 
    http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = 
    src . " - " . dest | stats values(_time) as Time values(ip_pair) AS src_dest, 
    values(user) as user, values(http_referrer) as http_referrer, 
    values(http_user_agent) as http_user_agent, values(http_method) as 
    http_method, values(status) as status, values(bytes) as bytes count by url| 
    fieldformat Time = strftime(Time,"%m/%d/%Y %T")

    IoCs

    URL: hxxp:/88.218.76[.]13/dd3.hta

    C2 IP: 88.218.76[.]13

    Hash (HTA sample): 95279881525d4ed4ce25777bb967ab87659e7f72235b76f9530456b48a00bac3

    Hash (HTA sample): 5a2b9ddddea96f21d905036761ab27627bd6db4f5973b006f1e39d4acb04a618

    Hash Extracted .NET binary: 9562AD2C173B107A2BAA7A4986825B52E881A935DEB4356BF8B80B1EC6D41C53

    Bitcoin Wallet address: bc1qnuxx83nd4keeegrumtnu8kup8g02yzgff6z53l

    Conclusion

    Ideally, you could make scheduled searches like what is shown above with lookup tables for matching more specific and new detections. These can be set to run on a continuous schedule to ensure the monitoring of your assets from new vulnerabilities. For questions on how to build such a process that is dynamic and customizable for your environment, ask one of our consultants by filling in the form below. Also, subscribe to the TekStream blog to catch the next monthly security bulletin and apply the latest detections to protect your systems. Happy Splunking!

    References

    Articles referenced and used for this Blog Post:

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary in nature and come without any certification of efficacy.

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM, Splunk. We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability or exploit – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency.

  • TekStream Security Bulletin: A Clear Path to Detecting Fog Ransomware

    TekStream Security Bulletin: A Clear Path to Detecting Fog Ransomware

    By David Cheever, Team Lead, Advance Services

    Introduction

    Fog is a new ransomware variant that encrypts files and appends a “.fog” or “.flocked” extension to them. The attackers behind Fog have exploited compromised virtual private network (VPN) credentials to deploy their ransomware. Their primary targets are educational institutions across the United States, with 80% of victims from the education sector and the remaining 20% from the recreation sector.

    The attackers appear financially motivated, focusing on quickly encrypting data without exfiltrating information. After encrypting the files, Fog leaves a ransom note in the form of a text file called “readme.txt”. This highlights the necessity of secure off-site backups and a robust, multi-layered security strategy to promptly detect and mitigate such threats. This bulletin provides a method of detecting Fog Ransomware using Splunk.

    Indicators of Compromise (IoCs) of Fog Ransomware

    TypeIndicator
    Hashes617d79c02ebac68b613d5b7cdbf001fd
    f7c8c60172f9ae4dab9f61c28ccae7084da90a06
    507b26054319ff31f275ba44ddc9d2b5037bd295
    e1fb7d15408988df39a80b8939972f7843f0e785
    83f00af43df650fda2c5b4a04a7b31790a8ad4cf
    44a76b9546427627a8d88a650c1bed3f1cc0278c
    eeafa71946e81d8fe5ebf6be53e83a84dcca50ba
    763499b37aacd317e7d2f512872f9ed719aacae1
    3477a173e2c1005a81d042802ab0f22cc12a4d55
    90be89524b72f330e49017a11e7b8a257f975e9a
    e11e7db705a11f8ca250d8d6826371e550b3214757f5bb9b648c7b0fad09294b
    8b9c7d2554fe315199fae656448dc193accbec162d4afff3f204ce2346507a8a
    d0c1662ce239e4d288048c0e3324ec52962f6ddda77da0cb7af9c1d9c2f1e2eb
    e67260804526323484f564eebeb6c99ed021b960b899ff788aed85bb7a9d75c3
    HostnamesDESKTOP-7G1IC87
    Kali
    VPS65CCB8B75352
    PACKERP-VUDV41R
    File Names*.flocked
    *.fog
    readme.txt
    DBgLog.sys
    Veeam-Get-Creds.ps1
    psexesvc.exe
    netscan.exe
    lck.exe
    locker_out.exe
    fs.exe
    locker_out.exe
    mon.dll
    advanced_port_scanner.exe
    advanced_port_scanner_2.5.3869.exe
    sharpshares(1).exe
    IP Addresses5[.]230[.]33[.]176
    77[.]247[.]126[.]200
    107[.]161[.]50[.]26

    Leveraging Enterprise Security’s Threat Intelligence Framework

    Uploading Threat Intelligence hinges significantly on correctly formatting your CSV file. The framework requires specific header field values to be utilized, ensuring the CSV contains the necessary columns and headers for effective threat matching. Prior to uploading, ensure IP addresses are stripped of brackets added for inadvertent navigation protection.

    To begin, navigate to Enterprise Security -> Configure -> Data Enrichment -> Threat Intelligence Management -> Sources. From here, select “New” to upload the below CSV file containing relevant Fog IoCs.

    <Fog_Ransomware_IoCs.csv>

    After uploading, navigate to Security Intelligence -> Threat Intelligence -> Threat Artifacts to view your uploaded values in the Threat Overview section. Filter for Fog_Ransomware_IoCs under Threat Group to confirm successful updates for both endpoint and network artifacts.

    Matches identified through various Threat Gen searches populate the threat_activity index and tag events for the Threat Intelligence data model, which security analysts can review on the Threat Activity dashboard. Notable events are generated by the Threat Activity Detected correlation search based on matches from threat sources, which in turn adjust risk scores for relevant assets and identities. Analysts can review these notable events on the Incident Review dashboard, alongside the updated risk scores displayed on the Risk Analysis dashboard.

    Detecting Fog with Data Models

    If you do not have Enterprise Security, you can still generate searches to detect these IoCs using standard data models, which are beneficial since they normalize fields across different data sources. Various data models may exhibit these IoCs; below are two excellent starting points:

    Network Traffic DM -The Network Traffic data model monitors flows of data across network infrastructure components.

    | tstats `summariesonly` latest(_time) as _time, values(All_Traffic.user) as user, sum("All_Traffic.bytes") as bytes, values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as transport, values("All_Traffic.dest_port") as dest_port from datamodel="Network_Traffic"."All_Traffic" where All_Traffic.src IN ("5[.]230[.]33[.]176","77[.]247[.]126[.]200","107[.]161[.]50[.]26") OR All_Traffic.src_ip IN ("5[.]230[.]33[.]176","77[.]247[.]126[.]200","107[.]161[.]50[.]26") OR All_Traffic.dest IN ("5[.]230[.]33[.]176","77[.]247[.]126[.]200","107[.]161[.]50[.]26") OR All_Traffic.dest_ip IN ("5[.]230[.]33[.]176","77[.]247[.]126[.]200","107[.]161[.]50[.]26") ```remember to remove brackets between octets``` by All_Traffic.action All_Traffic.src_ip All_Traffic.dest_ip
    | `drop_dm_object_name("All_Traffic")`

    Endpoint DM -The Endpoint data model monitors endpoint clients, such as end user machines, laptops, and BYOD devices.

    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size from datamodel="Endpoint"."Filesystem" where Filesystem.file_name IN ("readme.txt","DBgLog.sys","Veeam-Get-Creds.ps1","psexesvc.exe","netscan.exe","lck.exe","locker_out.exe","fs.exe","mon.dll","advanced_port_scanner.exe","advanced_port_scanner_2.5.3869.exe","sharpshares(1).exe","*.flocked","*.fog") OR Filesystem.file_hash IN ("f7c8c60172f9ae4dab9f61c28ccae7084da90a06","507b26054319ff31f275ba44ddc9d2b5037bd295","e1fb7d15408988df39a80b8939972f7843f0e785","83f00af43df650fda2c5b4a04a7b31790a8ad4cf","44a76b9546427627a8d88a650c1bed3f1cc0278c","eeafa71946e81d8fe5ebf6be53e83a84dcca50ba","763499b37aacd317e7d2f512872f9ed719aacae1","3477a173e2c1005a81d042802ab0f22cc12a4d55","90be89524b72f330e49017a11e7b8a257f975e9a","e11e7db705a11f8ca250d8d6826371e550b3214757f5bb9b648c7b0fad09294b","8b9c7d2554fe315199fae656448dc193accbec162d4afff3f204ce2346507a8a","d0c1662ce239e4d288048c0e3324ec52962f6ddda77da0cb7af9c1d9c2f1e2eb","e67260804526323484f564eebeb6c99ed021b960b899ff788aed85bb7a9d75c3","617d79c02ebac68b613d5b7cdbf001fd") by Filesystem.dest

    Recommendations

    To enhance your organization’s security posture, begin by ensuring all threat indicators are effectively blocked through appropriate controls. Utilize your security tools to actively search for IoCs within your environment and maintain strong cyber hygiene practices by regularly updating anti-virus software and implementing a comprehensive patch management lifecycle.

    Additionally, enhance access security by implementing two-factor authentication across all relevant systems. In the event of a ransomware attack, protect against data loss by maintaining offline, encrypted backups which are regularly tested for recovery effectiveness.  Exercise caution with emails from unfamiliar sources, as they can often serve as entry points for malicious actors. By adopting these practices, you can significantly enhance your organization’s resilience against ransomware and other cyber threats.

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary in nature and come without any certification of efficacy.

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM, Splunk. We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability or exploit – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency.

  • TekStream Security Bulletin: Splunk Takes Out SysJoker Variant Written in Rust

    TekStream Security Bulletin: Splunk Takes Out SysJoker Variant Written in Rust

    By Bryan Bollou, Team Lead, Cybersecurity Engineering

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM, Splunk. We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency.

    Introduction

    SysJoker is a backdoor malware that was first discovered in December 2021 by Intezer. This malware is a backdoor that targets multiple operating systems. It was initially discovered on a Linux-based web server belonging to a large educational institution. Recently, there has been a resurgence of its use, specifically a variant written in Rust, which suggests the malware code was completely rewritten. The use of this variant has been associated with some APTs (Advanced Persistent Threats) known to operate regions involved in the curre

    nt geopolitical climate in the Middle East. Indicators of compromise (IOCs) associated with the malware have been identified in the infrastructure of companies located in countries involved in the conflict.

    Threat Overview

    Due to the flexibility of the malware and the way its APT uses it, the recommendations are generic.

    These steps include:

    • Training and mitigations for phishing attacks – the most common way victims are exposed to this malware on workstations versions
    • Good security practice to ensure software updates and downloads only come from trusted vendors as it is believed this RAT is also spread via malicious NPM packages for server versions.
    • Ensure all devices on a network have an updated endpoint security system
    • Ensure the principle of least privilege has been used when setting up the production servers in an environment
    • At the proxy level, block unwanted connections to non-enterprise file-sharing domains 

    So far, we have seen many good options and would like to present a few more specific cases using everyone’s favorite SIEM, Splunk.

    This is not a blog post to fully explain or give recommendations on remediating the vulnerability, this has been discussed at length by various resources such as VMWare SysJoker Analysis.

    The goal here is to aggregate the detections to maximize your chances of detecting this critical attack. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the presence of the SysJoker malware. Here at TekStream, we have several security engineers that are intimate with cybersecurity knowledge and especially the logs of our clients.

    In this blog post, we go through the various steps used by the SysJoker RAT in its exploitation and detection. With this format, we are providing a more generic data model “tstats” command. This is taking advantage of the data model to quickly find data that may match our IOC list. We then provide examples of a more specific search that will add context to the first find. There will be a wide variety of specific searches as each client has their own specific technologies. To get help building detection for your specific client, fill in the form below and get access to our Splunk/security expertise.

    Note: The SysJoker RAT may masquerade and gather victim information in various ways not covered in this blog. An anomaly analysis tailored to your environment would be needed to discover this. Reach out to TekStream by filling out the form below if you’d like specific guidance on that aspect.

    The following detection steps mirror the stages and TTP-related indicators used in the attack:

    1. Detect persistence attempt of the malware [Windows]
    2. Detect persistence attempt of the malware [Linux]
    3. Detect persistence attempt of the malware [MacOs]
    4. Detect the connection to a malicious Cloud Storage Link
    5. Detect connection attempts to the C2 Server IOCs (domains and IP addresses)

    Threat Implication

    Step 1

    Once the SysJoker malware is present on a victim machine, it first sets up persistence. The methods vary based on operating system, so let’s go through them – starting with Windows. In the Windows version, a dropper is masqueraded as a system update by making a registry object. The malware runs generic commands using common tools (eg; dnslookup, ping, etc) to get MAC address, username, physical media serial number, and IP address of victim machine.

    Actions Detect

    Creation of a Windows Registry Key

    Name: igfxCUIService 
    Type: REG_SZ 
    Data: “C:ProgramDataSystemDataigfxCUIService.exe”
    

    Detect the presence of Known Hashes Related to SysJoker RAT

    61df74731fbe1eafb2eb987f20e5226962eeceef010164e41ea6c4494a4010fc
    d476ca89674c987ca399a97f2d635fe30a6ba81c95f93e8320a5f979a0563517
    d1d5158660cdc9e05ed0207ceba2033aa7736ed1
    888226b749b3fa93dadf5d7c2acf32c71e3a0918
    d71e1a6ee83221f1ac7ed870bc272f01
    293f116c2c51473ae2bf7f4e787d3ec3
    1ffd6559d21470c40dcf9236da51e5823d7ad58c93502279871c3fe7718c901c
    36fed8ab1bf473714d6886b8dcfbcaa200a72997d50ea0225a90c28306b7670e
    

    Note: This CSV file includes all the listed hashes, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL 1 – Using the Windows Data Source for Registry Key Creation
    index=windows sourcetype=wineventlog EventCode=4657 Object_Name="*HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun*" New_Value_Type = "REG_SZ"  Object_Value_Name = "igfxCUIService"
    SPL 2 – Using the Endpoint Datamodel for Registry Key Creation
    | tstats allow_old_summaries=true count, values("Registry.registry_key_name") AS registry_key_name, values("Registry.registry_path") AS registry_path, min(_time) AS firstTime, max(_time) AS lastTime FROM datamodel=Endpoint.Registry WHERE ("Registry.registry_hive" = "HKEY_CURRENT_USERS*" AND "Registry.registry_path" = "*HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun*" AND "Registry.registry_value_type" = "REG_SZ" AND "Registry.registry_value_name" = "igfxCUIService" BY "Registry.dest", "Registry.user"
    SPL 3 – Using the Endpoint Datamodel for Hashes
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size | Filesystem.file_hash IN ( "61df74731fbe1eafb2eb987f20e5226962eeceef010164e41ea6c4494a4010fc","d476ca89674c987ca399a97f2d635fe30a6ba81c95f93e8320a5f979a0563517","d1d5158660cdc9e05ed0207ceba2033aa7736ed1","888226b749b3fa93dadf5d7c2acf32c71e3a0918","d71e1a6ee83221f1ac7ed870bc272f01","293f116c2c51473ae2bf7f4e787d3ec3","1ffd6559d21470c40dcf9236da51e5823d7ad58c93502279871c3fe7718c901c","36fed8ab1bf473714d6886b8dcfbcaa200a72997d50ea0225a90c28306b7670e") | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    

    Step 2

    For the Linux version of the SysJoker malware, persistence is made by creating a cron job. The RAT creates or replaces a process called “updateSystem”.

    Actions Detect

    Detect the Creation of the “Update System” cron job

    @reboot (/.Library/SystemServices/updateSystem) 

    Detect the presence of Known Hashes Related to SysJoker RAT

    1a9a5c797777f37463b44de2b49a7f95abca786db3977dcdac0f79da739c08ac
    fe99db3268e058e1204aff679e0726dc77fd45d06757a5fda9eafc6a28cfb8df
    d0febda3a3d2d68b0374c26784198dc4309dbe4a8978e44bb7584fd832c325f0
    554aef8bf44e7fa941e1190e41c8770e90f07254
    f5149543014e5b1bd7030711fd5c7d2a4bef0c2f
    01d06375cf4042f4e36467078530c776a28cec05
    e06e06752509f9cd8bc85aa1aa24dba2
    6fb483e7ec55f8c56849d8f4f31bfd7b
    85dbbaa8c4d37ebb9829464f0510787b
    

    Note: This CSV file includes all the listed hashes, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL 1: Detect the Creation of a Cron Job
    | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.action=created Filesystem.file_path="/etc/cron.*" OR Filesystem.file_path ="* /.Library/SystemServices/updateSystem *" by _time
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size | Filesystem.file_hash IN ("1a9a5c797777f37463b44de2b49a7f95abca786db3977dcdac0f79da739c08ac","fe99db3268e058e1204aff679e0726dc77fd45d06757a5fda9eafc6a28cfb8df","d0febda3a3d2d68b0374c26784198dc4309dbe4a8978e44bb7584fd832c325f0","554aef8bf44e7fa941e1190e41c8770e90f07254","f5149543014e5b1bd7030711fd5c7d2a4bef0c2f","01d06375cf4042f4e36467078530c776a28cec05","e06e06752509f9cd8bc85aa1aa24dba2","6fb483e7ec55f8c56849d8f4f31bfd7b","85dbbaa8c4d37ebb9829464f0510787b") | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    

    Step 3

    For the MacOS version of the SysJoker malware, persistence is made by creating a service. The RAT uses a service called launchAgents named “Apple launch service” targeting “/Library/MacOsServices/updateMacOs”.

    Actions Detect

    Detect the Creation of a service with LaunchAgent. Creates persistence via LaunchAgent under the path “/Library/LaunchAgents/com.apple.update.plist.”

    Detect the presence of Known Hashes Related to SysJoker RAT

    36fed8ab1bf473714d6886b8dcfbcaa200a72997d50ea0225a90c28306b7670e
    1ffd6559d21470c40dcf9236da51e5823d7ad58c93502279871c3fe7718c901c
    bd0141e88a0d56b508bc52db4dab68a49b6027a486e4d9514ec0db006fe71eed
    d028e64bf4ec97dfd655ccd1157a5b96515d461a710231ac8a529d7bdb936ff3
    1e894ddc237b033b5b1dcf9b05d281ff0a053532
    fad66bdf5c5dc2c050cbc574832c6995dba086a0
    23c56da0cdddc664980705c4d14cb2579a970eed
    b21ba8da278b75e1cc515b6e2c84b91be6611800
    9a7f0b64007cedfa9ae20dd212892d73
    d90d0f4d6dad402b5d025987030cc87c
    5e11432c30783b184dc2bf27aa1728b4
    C805649d6909bf1d7e220f144801044b
    

    Note: This CSV file includes all the listed hashes, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL 1: Service Creation Through LaunchAgent
    | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.action=created Filesystem.file_path="*/Library/LaunchAgents/com.apple.update.plist*" by _time
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size | Filesystem.file_hash IN ("36fed8ab1bf473714d6886b8dcfbcaa200a72997d50ea0225a90c28306b7670e","1ffd6559d21470c40dcf9236da51e5823d7ad58c93502279871c3fe7718c901c","bd0141e88a0d56b508bc52db4dab68a49b6027a486e4d9514ec0db006fe71eed","d028e64bf4ec97dfd655ccd1157a5b96515d461a710231ac8a529d7bdb936ff3","1e894ddc237b033b5b1dcf9b05d281ff0a053532","fad66bdf5c5dc2c050cbc574832c6995dba086a0","23c56da0cdddc664980705c4d14cb2579a970eed","b21ba8da278b75e1cc515b6e2c84b91be6611800","9a7f0b64007cedfa9ae20dd212892d73","d90d0f4d6dad402b5d025987030cc87c","5e11432c30783b184dc2bf27aa1728b4","c805649d6909bf1d7e220f144801044b") | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")

    Step 4

    Once persistence is established, the SysJoker malware grabs an encoded Google Drive (sometimes, OneDrive) link from within its package. This link is decoded, and it is requested to pull down a text file. This text file contains another encoded link – the Command-and-Control URL for the malware that is constantly updated.

    Actions Detect

    Navigating to the Known Malicious Google Drive URLs

    https[://]drive[.]google[.]com/uc?export=download&id=1-NVty4YX0dPHdxkgMrbdCldQCpCaE-Hn
    https[://]drive[.]google[.]com/uc?export=download&id=1W64PQQxrwY3XjBnv_QAeBQu-ePr537eu
    

    Note: This CSV file includes all the listed URLS, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL 1: Detect Known Malicious Google Drive URLs
    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" where Web.url IN ("https[://]drive[.]google[.]com/uc?export=download&id=1-NVty4YX0dPHdxkgMrbdCldQCpCaE-Hn", "https[://]drive[.]google[.]com/uc?export=download&id=1W64PQQxrwY3XjBnv_QAeBQu-ePr537eu") by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url| fieldformat Time = strftime(Time,"%m/%d/%Y %T")

    Note: The malicious URLs have been kept sanitized using “[.]” for the periods, please remove these when running the SPL. Please be careful not to navigate to them outside a sandbox.

    Step 5

    Once the command-and-control link is acquired, a connection attempt to the various known SysJoker infrastructure is attempted. This C2 connection can be used by an attacker to control the malware to execute remote commands, execute scripts, change registry entries and exit/hide. The malware makes GET requests to the C2 API endpoints and the C2 server responds in JSON with parameters/instructions.

    Actions Detect

    Connection Attempts to Known C2 Domains

    bookitlab[.]tech
    graphic-updater[.]com
    office360-update[.]com
    winaudio-tools[.]com
    github.url-mini[.]com
    graphic-updater[.]com
    sharing-u-file[.]com
    filestorage-short[.]org
    audiosound-visual[.]com

    Connection Attempts to Known C2 IP Addresses

    85.31.231[.]49
    62.108.40[.]129
    
    SPL 1 – Detect C2 Domains using Network Resolution Data Model
    | tstats `summariesonly` latest(_time) as _time  values("DNS.dest") as dest, values("DNS.query") as query, values("DNS.query_count") as query_count, values("DNS.message_type") as message_type, values("DNS.answer") as answer, values("DNS.reply_code") as reply_code from datamodel="Network_Resolution"."DNS" where DNS.query IN ("bookitlab[.]tech","graphic-updater[.]com","office360-update[.]com","winaudio-tools[.]com","github.url-mini[.]com","graphic-updater[.]com","sharing-u-file[.]com","filestorage-short[.]org","audiosound-visual[.]com"
    ) | table _time, dest, query, query_count, message_type, answer, reply_code | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    
    SPL 2 – Detect C2 Domains using Web Data Model
    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | where match(url, "(bookitlab[.]tech)|(graphic-updater[.]com)|(office360-update[.]com)|(winaudio-tools[.]com)|(github.url-mini[.]com)|(graphic-updater[.]com)|(sharing-u-file[.]com)|(filestorage-short[.]org)|(audiosound-visual[.]com)
    ") | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest  | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url | fieldformat Time = strftime(Time,"%m/%d/%Y %T")
    

    Note: The malicious domains have been kept sanitized using “[.]” for the periods, please remove these when running the SPL. Please be careful not to navigate to them outside a sandbox.

    SPL 3 – Detect C2 IP Address Using Network Traffic Data Model
    | tstats `summariesonly` latest(_time) as _time, sum("All_Traffic.bytes") as bytes, values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as transport, values("All_Traffic.dest_port") as dest_port from datamodel="Network_Traffic"."All_Traffic" where All_Traffic.src IN ("85.31.231[.]49","62.108.40[.]129") OR All_Traffic.dest IN ("85.31.231[.]49","62.108.40[.]129") by "All_Traffic.action", "All_Traffic.src", "All_Traffic.dest", "All_Traffic.user" | head 10000 | `drop_dm_object_name("All_Traffic")`| eval earliest_time = IF(isnum("$earliest_time$"),"$earliest_time$",strftime(relative_time(now(),"$earliest_time$"),"%s")) | eval latest_time = CASE(isnum("$latest_time$"),"$latest_time$","$latest_time$"="now",now(),1=1,strftime(relative_time(now(),"$latest_time$"),"%s")) | where _time >= earliest_time AND _time <= latest_time | head 10000 | table action, src, src_port, dest, transport, dest_port, user, bytes

    Note: The malicious IPs have been kept sanitized using “[.]” for the periods, please remove these when running the SPL. Please be careful not to navigate to them outside a sandbox.

    IOC List

    The file link below is an aggregate of IOCs found related to the SysJoker RAT malware. It has been presented here for you to have it consolidated in one spot and made easier to export to a lookup for notable detections.

    TekStream SysJoker IOC List

    Conclusion

    Ideally, you could make scheduled searches like what is shown above with lookup tables for matching more specific and new detections. These can be set to run on a continuous schedule to ensure the monitoring of your assets from new vulnerabilities and/or malware. Old vulnerabilities that have been patched (and applied) can also be aged out of this lookup table to ensure it is timely and efficient. For questions on how to build such a process that is dynamic and customizable for your environment, ask one of our consultants by filling in the form below. Also, subscribe to the TekStream blog to catch the next monthly security bulletin and apply the latest detections to protect your systems. Happy Splunking!

    References

    Articles referenced and used for this blog post include:

    OTX.Alien Vault: SysJoker IOC’s

    OTX.Alien Vault: SysJoker Backdoor: Propagation, Exploitation, and Indicators of Compromise

    Bleeping Computer: New Rust-based SysJoker backdoor linked to Hamas hackers

    Intezer: New SysJoker Backdoor Targets Windows, Linux, and macOS

    VMware: SysJoker – An Analysis of a Multi-OS RAT

    Check Point Research: Israle-Hamas War Spotlight: Shaking The Rust Off SysJoker

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary and come without certification of efficacy.

  • TekStream Security Bulletin: Use Splunk to Swat StripedFly

    TekStream Security Bulletin: Use Splunk to Swat StripedFly

    By Bryan Bollou, Team Lead, Cybersecurity Engineering

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM, Splunk. We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency.

    Introduction

    StripedFly has been a consistent threat since first discovered by Kaspersky in 2016. It is associated with APT malware and is estimated to have infected over 1 million systems – both Windows and Linux. This malware is known to infect machines by exploiting the following:

    • The initial infection is by piggybacking off a custom EternalBlue SMBv1 exploit.
    • A lightweight TOR client is then used to communicate with a C2 server and download additional malware – though the main purpose (crypt mining, espionage, etc.) is not fully known.
    • This additional malware can then engage in a variety of malicious activities including credential harvesting, crypto mining, adware, etc.
    • The malware disables the SMBv1 protocol and uses SSH along with processes similar EternalBlue to spread.

    Threat Overview

    The vulnerability has been acknowledged by Kaspersky and they have suggested various mitigation steps to prevent its exploitation. Due to the flexibility of the malware and the way its APT uses it, the recommendations are quite generic.

    These steps include:

    • Training and mitigations for phishing attacks – the most common way victims are exposed to this malware.
    • Exercising good credential hygiene including the use of a secure password manager
    • Ensuring all devices on a network have an updated endpoint security system.
    • Disabling SMBv1 if it is not necessary for critical business processes.

    So far, we have seen many good options and would like to present a few more specific cases using Splunk. The goal here is to aggregate the detections to maximize your chances of detecting this critical attack. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to a StripedFly malware infection. Recommendations on remediating the vulnerability are discussed at length by various resources including Secure List.

    In this security bulletin, we go through the various ways StripedFly exploits a victim system and how to detect it. With this format, we are providing a more generic data model “tstats” command. This is taking advantage of the data model to quickly find data that may match our IOC list. We then provide examples of a more specific search that will add context to the first find. There will be a wide variety of specific searches as each client has their own specific technologies. To get help building detection for your specific client, fill in the form below and get access to our Splunk/security expertise.

    Note: Analyzing trends in your environment to detect anomalies relating to processes normally run and regular access to online code repositories would be ideal. This requires massaging to a specific environment and detecting this part is not covered in this blog post. Reach out to TekStream by filling out the form below if you’d like specific guidance on that aspect.

    The following detection steps mirror the stages and TTP-related indicators used in the attack:

    1. Detect malicious PowerShell scripts indicating initial infection.
    2. Detect disabling of SMBv1.
    3. Detect requests to malicious code repositories.
    4. Detect beaconing to a command-and-control server in the TOR network.
    5. Detect the existence of files associated with StripedFly malware modules

    Threat Implication

    StripedFly primarily exploits the weakness of SMBv1 on internet-facing systems. The initial infection is dropped on the machine and this malware self-propagates once on a network. It sets up an encrypted channel using TOR to hide communications with a C2 server. As part of its activities, it downloads updates and additional malware by connecting to malicious code repositories.

    The fact the malware has support and pluggable modules to update its functionality points to APT malware. It has been associated with the Shadow Brokers, but the true origin of the malware is still unclear. It has also been associated with the ThunderCrypt ransomware, which may suggest a monetary incentive for the malware’s authors.

    Threat Detection

    Step 1

    If a victim machine is infected with the original malware from StripedFly, PowerShell scripts are run if the tool is available. This is done to set up persistence for the malware.  Here we are looking to detect any PowerShell commands that are run and contain more than 50 trailing or leading spaces – not typical for a normal user or process running scripts. The spaces are used to obfuscate the code and avoid detection by an EDR system.

    Actions Detect

    Using Regex to find a PowerShell command with more than 50 leading or trailing spaces.

    SPL – Using Windows Data Source
    index=windows sourcetype=WinEventLog EventCode=4104 
    | where match(ScriptBlockText, "(?i)[ ]{50,}w+") OR match(ScriptBlockText, "(?i)w+[ ]{50,}")
    | table _time EventCode name action service UserData_Xml Message Subject_Account_Name ComputerName EventCode cmd ScriptBlockText
    

    Step 2

    A mark of the StripedFly infection the disabling of the SMBv1 protocol after infection. This is done once the malware payload is executed and a lightweight TOR client is installed. This step is done to “seal the gates” on the victim’s machine. Here we are detecting the disabling of these protocols.

    Actions Detect

    We are looking to detect the following activity and parameter set in the appropriate registry entry:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParameters
    Copy
    Registry entry: SMB1
    REG_DWORD: 0 = Disabled
    REG_DWORD: 1 = Enabled
    Default: 1 = Enabled (No registry key is created)
    SPL 1 – Using the Windows Data Source
    index=windows sourcetype=wineventlog EventCode=4657 Object_Name="*HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParameters*" New_Value_Type = "REG_DWORD" Old_Value_Type = "REG_DWORD" Old_Value = 1 New_Value = 0 Object_Value_Name = "SMB1" 
    SPL 2 – Using the Endpoint Datamodel
    | tstats allow_old_summaries=true count, values("Registry.registry_key_name") AS registry_key_name, values("Registry.registry_path") AS registry_path, min(_time) AS firstTime, max(_time) AS lastTime FROM datamodel=Endpoint.Registry WHERE ("Registry.registry_hive" = "HKEY_LOCAL_MACHINESYSTEM" AND "Registry.registry_path" = "*HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanServerParameters*" AND "Registry.registry_value_type" = "REG_DWORD" AND "Registry.registry_value_name" = "SMB1" AND ("Registry.registry_value_data" = "0" OR "Registry.registry_value_text" = "0" )) BY "Registry.dest", "Registry.user"  

    Step 3

    As a way to reduce the footprint of the initial exploit, the StripedFly malware has most of its elements offloaded and stored in legitimate websites. Once persistence is set up, the malware will then request these elements to carry out malicious activities on the victim machine. The sophistication of these pluggable, customizable and version control malware modules point to an APT developing this malware. Multiple repositories have been identified to contain code requested by malware.

    Actions Detect

    Attempts to hit the URL’s associated with the malicious code repositories from within the victim’s environment.

    URLs

    This is a selection of URL’s to watch for:

    ghtyqipha6mcwxiz[.]onion:1111

    bitbucket[.]org/JulieHeilman/m100-firmware-mirror/downloads/

    bitbucket[.]org/upgrades/um/downloads/

    bitbucket[.]org/legit-updates/flash-player/downloads

    gitlab[.]com/JulieHeilman/m100-firmware-mirror/raw/master/

    gitlab[.]com/saev3aeg/ugee8zee/raw/master/

    github[.]com/amf9esiabnb/documents/releases/download/

    tcp://pool.minexmr[.]com:4444

    tcp://mine.aeon-pool[.]com:5555

    tcp://5.255.86[.]125:8080

    tcp://45.9.148[.]21:80

    tcp://45.9.148[.]36:80tcp://45.9.148[.]132:8080

    This CSV file includes all the listed URLS, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL – Using the Web Datamodel

    Detect URLs

    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" where Web.url IN (" ghtyqipha6mcwxiz[.]onion:1111", "bitbucket[.]org/JulieHeilman/m100-firmware-mirror/downloads/","bitbucket[.]org/upgrades/um/downloads/","bitbucket[.]org/legit-updates/flash-player/downloads","gitlab[.]com/JulieHeilman/m100-firmware-mirror/raw/master/","gitlab[.]com/saev3aeg/ugee8zee/raw/master/","github[.]com/amf9esiabnb/documents/releases/download/","tcp://pool.minexmr[.]com:4444","tcp://mine.aeon-pool[.]com:5555","tcp://5.255.86[.]125:8080","tcp://45.9.148[.]21:80","tcp://45.9.148[.]36:80","tcp://45.9.148[.]132:808") by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url| fieldformat Time = strftime(Time,"%m/%d/%Y %T")

    Note: The malicious URLs have been kept sanitized using “[.]” for the periods, please remove these when running the SPL. Please be careful not to navigate to them outside a sandbox.

    Step 4

    The StripedFly malware has a few known Command-and-Control servers hosted in the TOR network. The malware uses a lightweight TOR client to connect to the C2 server through TCP connections – often sending a unique ID for the victim machine, requesting malware modules/updates and beaconing. Finding any attempts to communicate with these known C2 servers would be a smoking gun for this malware being present in a victim’s environment.

    Actions Detect

    Any connection attempts with the following domains and/or IP addresses.

    C2 Domains

    gpiekd65jgshwp2p53igifv43aug2adacdebmuuri34hduvijr5pfjad[.]onion

    ghtyqipha6mcwxiz[.]onion

    ajiumbl2p2mjzx3l[.]onion

    C2 IPv4 Addresses

    45.9.148[.]21
    45.9.148[.]36
    45.9.148[.]132
    5.255.86[.]125

    This CSV file includes all the listed URLS, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL 1 – Using the Web Datamodel for Domains

    Detect Domains

    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | where match(url, "(?i)(gpiekd65jgshwp2p53igifv43aug2adacdebmuuri34hduvijr5pfjad[.]onion)|(ghtyqipha6mcwxiz[.]onion)|(ajiumbl2p2mjzx3l[.]onion)") | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest  | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url | fieldformat Time = strftime(Time,"%m/%d/%Y %T")

    Note: The malicious URLs have been kept sanitized using “[.]” for the periods, please remove these when running the SPL. Please be careful not to navigate to them outside a sandbox.

    SPL 2 – Using the Network Datamodel for IPs

    Detect IPs

    | tstats `summariesonly` latest(_time) as _time, sum("All_Traffic.bytes") as bytes, values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as transport, values("All_Traffic.dest_port") as dest_port from datamodel="Network_Traffic"."All_Traffic" where All_Traffic.src IN ("45.9.148[.]21","45.9.148[.]36","45.9.148[.]132","5.255.86[.]125") OR All_Traffic.dest IN ("45.9.148[.]21","45.9.148[.]36","45.9.148[.]132","5.255.86[.]125") by "All_Traffic.action", "All_Traffic.src", "All_Traffic.dest", "All_Traffic.user" | head 10000 | `drop_dm_object_name("All_Traffic")`| eval earliest_time = IF(isnum("$earliest_time$"),"$earliest_time$",strftime(relative_time(now(),"$earliest_time$"),"%s")) | eval latest_time = CASE(isnum("$latest_time$"),"$latest_time$","$latest_time$"="now",now(),1=1,strftime(relative_time(now(),"$latest_time$"),"%s")) | where _time >= earliest_time AND _time <= latest_time | head 10000 | table action, src, src_port, dest, transport, dest_port, user, bytes

    Note: The malicious IPs have been kept sanitized using “[.]” for the periods, please remove these when running the SPL. Please be careful not to navigate to them outside a sandbox.

    Step 5

    Since the malicious code repositories are known, the files are often requested are known. The filenames and hashes have been taken from malware repos. Evidence of these files in a victim’s environment would point to malware modules requested/downloaded and this malware present. Looking for these known IOCs would also be a smoking gun for StripedFly presence.

    Actions Detect

    The presence of any of these known bad hashes in the victim’s environment:

    Table showcasing the presence of any known bad hashes in the victim's environment after a StripedFly malware attack.
    SPL
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size | search Filesystem.file_name IN ("system.img", "delta.dat", "delta.img", "ota.dat", "ota.img ") OR Filesystem.file_hash IN ( "b28c6d00855be3b60e220c32bfad2535", "18f5ccdd9efb9c41aa63efbe0c65d3db", "2cdc600185901cf045af027289c4429c", "54dd5c70f67df5dc8d750f19ececd797", "d32fa257cd6fb1b0c6df80f673865581", "c04868dabd6b9ce132a790fdc02acc14", "c7e3df6455738fb080d741dcbb620b89", "d684de2c5cfb38917c5d99c04c21769a", "a5d3abe7feb56f49fa33dc49fea11f85", "35fadceca0bae2cdcfdaac0f188ba7e0", "00c9fd9371791e9160a3adaade0b4aa2", "41b326df0d21d0a8fad6ed01fec1389f", "506599fe3aecdfb1acc846ea52adc09f", "6ace7d5115a1c63b674b736ae760423b", "2e2ef6e074bd683b477a2a2e581386f0", "04df1280798594965d6fdfeb4c257f6c", "abe845285510079229d83bb117ab8ed6", "090059c1786075591dec7ddc6f9ee3eb", "120f62e78b97cd748170b2779d8c0c67", "d64361802515cf32bd34f98312dfd40d") | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time 
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    

    IOC List

    This file is an aggregate of IOCs found related to StripedFly exploitation. It has been presented here for you to have it consolidated in one spot and made easier to export to a lookup for notable detections.

    TekStream StripedFly IOC List

    Conclusion

    Ideally, you could make scheduled searches like what is shown above with lookup tables for matching more specific and new detections. These can be set to run on a continuous schedule to ensure the monitoring of your assets from new vulnerabilities. Old vulnerabilities that have been patched (and applied) can also be aged out of this lookup table to ensure it is timely and efficient. For questions on how to build such a process that is dynamic and customizable for your environment, ask one of our consultants by filling in the form below. Also, subscribe to the TekStream blog to catch the next monthly security bulletin and apply the latest detections to protect your systems. Happy Splunking!

    References

    Bleeping Computer: StripedFly Malware Framework Infects 1 Million Windows Linux Hosts

    Securelist.com: StripedFly Perennially Flying Under the Radar

    OTX.Alienvault.com StripedFly Securelist

    OTX.Alienvault.com StripedFly: Perennially flying under the radar

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary in nature and come without any certification of efficacy.

  • Security Bulletin: Inject Splunk to Detect HTML Injection in Citrix NetScaler

    Security Bulletin: Inject Splunk to Detect HTML Injection in Citrix NetScaler

    By Bryan Bollou, Team Lead, Cybersecurity Engineering

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM, Splunk. We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency.

    Introduction

    Confirmed to have been in use since September of 2023, the CVE-2023-3519 is an unpatched vulnerability exploited to capture credentials by inserting a malicious script into the HTML content of the authentication web page. This is vulnerability that could be exploited by doing the following;
    • A vulnerable NetScaler device is identified.
    • The script is appended to the index.html using the vulnerability.
    • This script then loads a remote JS file that creates a “Log On” button on the login page.
    • Once an authentication event occurs the username and password information are sent to a malicious remote server.

    Threat Overview

    The vulnerability has been acknowledged by Citrix and they have suggested various mitigation steps to prevent its exploitation. These steps include:

    “Cloud Software Group strongly urges affected customers of NetScaler ADC and NetScaler Gateway to install the relevant updated versions as soon as possible. Note: NetScaler ADC and NetScaler Gateway version 12.1 is now End Of Life (EOL). Customers are recommended to upgrade their appliances to one of the supported versions that address the vulnerabilities.”

    So far, we have seen many good options and would like to present a few more specific cases using everyone’s favorite SIEM Splunk.  This is not a blog post to fully explain or give recommendations on remediating the vulnerability, this has been discussed at length by various resources such as: Citrix ADC and Citrix Gateway Security Bulletin.

    The goal here is to aggregate the detections to maximize your chances of detecting this critical attack. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the CVE-2023-3519 vulnerability being exploited. Here at TekStream, we have several security engineers that are intimate with cybersecurity knowledge and especially the logs of our clients.

    In this blog post, we go through the various steps in CVE-2023-3519 vulnerability exploitation and detection. With this format, we are providing a more generic data model “tstats” command. This is taking advantage of the data model to quickly find data that may match our IOC list. We then provide examples of a more specific search that will add context to the first find. There will be a wide variety of specific searches as each client has their own specific technologies. To get help building detection for your specific client, fill in the form below and get access to our Splunk/security expertise.

    Note: Something specific. Detecting this part is not covered in this blog post. Reach out to TekStream by filling out the form below if you’d like specific guidance on that aspect.

    The following detection steps mirror the stages and TTP-related indicators used in the attack:

    1. Detect the initial web request attackers use to append custom HTML code to the index.html hosted on a vulnerable NetScaler device
    2. Detect the hashes and file names that point to malicious files and scripts injected into the vulnerable NetScaler device
    3. Detect Ip Addresses associated with known ATP group that used this exploit as well as addresses seen associated with the attack
    4. Detect connections to domains that hosted the malicious JS script file created by threat actors who exploited this vulnerability
    5. Detect a possible spike in DNS traffic that could point to attempts to hit a command-and-control destination from a victim’s network

    Threat Implication

    • A threat actor discovering an unpatched NetScaler Device on a victim machine can attempt this exploit. It involves injecting a malicious script that creates an element on a login page that directs user credentials upon login activity.
    • The affected Citrix products are as follows:
    Citrix ADC and Citrix Gateway Security Bulletin.

    Reference: Citrix ADC and Citrix Gateway Security Bulletin

    Threat Detection

    Step 1

    Attacked would first send a web request to trigger a memory corruption a write a PHP web shell on a NetScaler endpoint. This PHP web shell would then be used to append custom HTML code to the index.html that points to a malicious a JavaScript code on infrastructure controller by the attacker. This code would add a custom function with a “Log On” element that would harvest credentials entered by a victim.

    Actions to Detect

    A web request to your NetScaler servers with any of the following strings;

    /gwtest/formssso? event=start&target=

    /items/accounts/

    /api/now/sp/widget/widget-simple-list

    /api/now/sp/widget/5b255672cb03020000f8d856634c9c28

    SPL
    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" where (http_method = GET OR http_method = POST) AND Web.url IN ("*/gwtest/formssso? event=start&target=*","*/items/accounts/*","*/api/now/sp/widget/widget-simple-list*","*/api/now/sp/widget/5b255672cb03020000f8d856634c9c28*") by "Web.src", "Web.dest", "Web.user", "Web.url", _time | fields _time src, dest, user, url, http_content_type, http_method, http_user_agent, status, bytes | fieldformat Time = strftime(_time,"%m/%d/%Y %T")

    Note: The destination IPs for the NetScaler devices can be added to filter down this search.

    Step 2

    As part of Step 1, new files would be introduced on the NetScaler server. This step would be used to detect the hashes and file names that point to malicious files and scripts injected into the vulnerable NetScaler device. These hashes and files were recorded from victims of this attack.

    This is thoroughly explained here: CISA.GOV Cybersecurity Advisories

    Actions to Detect

    Appearance of the following file names in the victim’s Netscaler devices:

    Logouttm[.]php
    pykeygen
    info[.]php
    NPS
    The

    Appearance of the following hashes in the victim’s environment:

    SHA-1 Hash

    3345ad8b43d6771532ca55acf7e95fe98aeadb27 – Logouttm[.]php

    b8f9258e9c7c882944e2b773557b49e5821517fe – pykeygen

    55c83cb25be5c521e4874e22b1422c360abf0a29 – info[.]php

    ec17f7b3acb2334a062c37e0271c31c3c8b6879c – NPS

    dec36a2aa4ecb86eafd01015e27c06f51d104317 – the

    MD5 Hash

    47b8d29319a9e85aaf829f4f2f9c6c00 – Logouttm[.]php

    ee51f599d266be5fd89b423ca24521f1 – pykeygen

    c0b32901f9c6ce3f965b8552f7d058d4 – info[.]php

    9b6f12aed2369a99a1132edd2ede779d – NPS

    b383c4ed6712a0a06fb85b1d8405e0f1 – the

    SPL 1: File Names
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size where Filesystem.file_name IN ("*Logouttm.php*","*pykeygen*","*info.php*",”*NPS*”,”*the*”)  | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    
    SPL 2: Hashes
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size where Filesystem.file_hash IN ("3345ad8b43d6771532ca55acf7e95fe98aeadb27","b8f9258e9c7c882944e2b773557b49e5821517fe","55c83cb25be5c521e4874e22b1422c360abf0a29","ec17f7b3acb2334a062c37e0271c31c3c8b6879c","dec36a2aa4ecb86eafd01015e27c06f51d104317","47b8d29319a9e85aaf829f4f2f9c6c00","ee51f599d266be5fd89b423ca24521f1","c0b32901f9c6ce3f965b8552f7d058d4","9b6f12aed2369a99a1132edd2ede779d","b383c4ed6712a0a06fb85b1d8405e0f1")  | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    
    Step 3

    IP addresses have been associated with exploiting this NetScaler vulnerability. This includes source IP addresses of ATP groups that have been recorded with attempted exploitations and destination IP addresses of the malicious infrastructure. Any occurrence of these known bad IP addresses should be investigated if they appear in an environment.

    Actions to Detect

    Appearance of the following hashes in a client’s environment:

    5.2.64[.]155
    5.255.101[.]76
    172.94.124[.]18
    154.6.91[.]149
    216[.]41[.]162[.]172
    216[.]51[.]171[.]17

    SPL
    | tstats `summariesonly` latest(_time) as _time, sum("All_Traffic.bytes") as bytes, values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as transport, values("All_Traffic.dest_port") as dest_port from datamodel="Network_Traffic"."All_Traffic" where All_Traffic.src IN ("5.2.64.155","5.255.101.76","172.94.124.18","154.6.91.149","216.41.162.172","216.51.171.17") OR All_Traffic.dest IN ("5.2.64.155","5.255.101.76","172.94.124.18","154.6.91.149","216.41.162.172","216.51.171.17") by "All_Traffic.action", "All_Traffic.src", "All_Traffic.dest", "All_Traffic.user" | head 10000 | `drop_dm_object_name("All_Traffic")`| eval earliest_time = IF(isnum("$earliest_time$"),"$earliest_time$",strftime(relative_time(now(),"$earliest_time$"),"%s")) | eval latest_time = CASE(isnum("$latest_time$"),"$latest_time$","$latest_time$"="now",now(),1=1,strftime(relative_time(now(),"$latest_time$"),"%s")) | where _time >= earliest_time AND _time <= latest_time | head 10000 | table action, src, src_port, dest, transport, dest_port, user, bytes
    Step 4

    The smoking gun is connections out to the malicious domains for credential harvesting. Multiple domains have been identified as being used in this exploit. These domains were stood up by threat actors with their origins masked. The malicious JS script that would inject the fake login element on NetScaler index.html would be hosted here. The JS files were almost all identical. Credentials taken from victim users would also be redirected to these domains. The credential endpoint was a similar path for most of the malicious domains.

    Actions to Detect

    Any connections to the following domains from a client network:

    jscloud[.]ink

    jscloud[.]live

    jscloud[.]biz

    jscdn[.]biz

    cloudjs[.]live

    cloud-js[.]cloud

    Any connections with the following URL string:

    /items/accounts/

    SPL#1 – Web: Malicious Domains + URL String
    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | where match(url, "(?i)(jscloud.ink)|(jscloud.live)|(jscloud.biz)|(jscdn.biz)|(cloudjs.live)|(cloud-js.cloud) | (/items/accounts/)") | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest  | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url | fieldformat Time = strftime(Time,"%m/%d/%Y %T")
    SPL#2 – DNS: Malicious Domains
    | tstats `summariesonly` latest(_time) as _time  values("DNS.dest") as dest, values("DNS.query") as query, values("DNS.query_count") as query_count, values("DNS.message_type") as message_type, values("DNS.answer") as answer, values("DNS.reply_code") as reply_code from datamodel="Network_Resolution"."DNS" where DNS.query IN ("jscloud.ink","jscloud.live","jscloud.biz","jscdn.biz","cloudjs.live","cloud-js.cloud") | table _time, dest, query, query_count, message_type, answer, reply_code | fieldformat Time = strftime(_time,"%m/%d/%Y %T")
    Step 5

    In a compromised environment, it would be expected to see an increase in the amount of traffic to control and control destinations. Thus, detecting a possible spike in DNS traffic that could point to an attempt or successful attack on this NetScaler vulnerability.

    Actions to Detect

    A DNS Spike in an environment that may indicate attempts to connect to a C2C destination.

    SPL
    | tstats `summariesonly` count from datamodel="Network_Resolution"."DNS" by "DNS.query", _time | rename "DNS.query" as query | fieldformat Time = strftime(_time,"%m/%d/%Y %T")

    Note: This is very simple SPL to look at the DNS resolutions by query destination and time. It needs to be tuned for each environment. It would take a Splunk professional to present the data in a more digestible form and cybersecurity professional to use this visualization to spot an anomaly. Reach out to TekStream using the form below to get in contact with both.

    IOC List

    Below is an aggregate of IOCs found related to the CVE-2023-3519 vulnerability. It has been presented here for you to have it consolidated in one spot and made easier to export to a lookup for notable detections.

    Auto Download: TekStream CitrixNetScaler3519 IOC List

    Conclusion

    Ideally, you could make scheduled searches like what is shown above with lookup tables for matching more specific and new detections. These can be set to run on a continuous schedule to ensure the monitoring of your assets from new vulnerabilities. Old vulnerabilities that have been patched (and applied) can also be aged out of this lookup table to ensure it is timely and efficient. For questions on how to build such a process that is dynamic and customizable for your environment, ask one of our consultants by filling in the form below. Also, subscribe to the TekStream blog to catch the next monthly security bulletin and apply the latest detections to protect your systems. Happy Splunking!

    References

    Bleeping Computer: Hackers Hijack Citrix NetScaler Login Pages to Steal Credentials

    CISA: Cybersecurity Advisories

    Security Intelligence: X-Force Uncovers Global NetScaler Gateway Credential Harvesting Campaign

    SOC Radar: Critical and High Vulnerabilities in Citrix ADC and Citrix Gateway

    Citrix: Citrix ADC and Citrix Gateway Security Bulletin

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary in nature and come without any certification of efficacy.

  • TekStream Security Bulletin: Akira on Cisco Adaptive Security Appliance (ASA) VPN

    TekStream Security Bulletin: Akira on Cisco Adaptive Security Appliance (ASA) VPN

    By Bryan Bollou, Team Lead, CyberSecurity Engineering

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM, Splunk. We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency.

    Introduction

    Starting from early April 2023, there have been documented instances of intrusions related to Cisco Adaptive Security Appliance (ASA) Virtual Private Networks (VPNs). In May, Sophos was the first to identify that the ransomware group “Akira” exploited default VPN accounts to infiltrate networks lacking MFA protection.

    This threat primarily stems from the use of default accounts, weak credentials, and the absence of an additional authentication layer for all users. Typically, after a network intrusion, a ransomware attack follows, as researchers map Akira’s common attack pattern. Addressing this matter is crucial, given that numerous clients rely on CISCO ASA VPNs as their solution, and our utmost priority is to ensure their security.

    Threat Overview

    The vulnerability has been acknowledged by Cisco and they have suggested various mitigation steps to prevent its exploitation.

    These steps include:

    • Disable default accounts or reset their passwords.
    • Enforce MFA for all VPN users, minimizing exceptions.
    • Enable VPN logging, following Cisco’s guidance for ASA and forensic evidence collection.
    • Monitor VPN logs for unauthorized authentication attempts.
    • Watch for failed authentications, detecting brute force or password spraying.
    • Stay up to date with security patches for VPNs, virtual desktop infrastructure, and gateway devices as a best practice.

    So far, we have seen many good options and would like to present a few more specific cases using everyone’s favorite SIEM, Splunk.

    This is not a blog post to fully explain or give recommendations on remediating the vulnerability, which has been discussed at length by various resources such as Rapid 7.

    The goal here is to aggregate the detections to maximize your chances of detecting this critical attack. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the Cisco ASA VPNs being exploited. Here at TekStream, we have several security engineers who are intimate with cybersecurity knowledge – especially the logs of our clients.

    In this blog post, we go through the various steps in Akira’s (and other APTs) Cisco ASA VPN exploitation & detection. With this format, we are providing a more generic data model “tstats” command. This is taking advantage of the data model to quickly find data that may match our IOC list. We then provide examples of a more specific search that will add context to the first find. There will be a wide variety of specific searches as each client has their own specific technologies. To get help building detection for your specific client, fill in the form below and get access to our Splunk/security expertise.

    Note: The follow-up of the initial access attack is normally the deployment of various ransomware to infect a victim’s system. Detecting this part is not covered in this blog post. Reach out to TekStream by filling out the form below if you’d like specific guidance on that aspect.

    The following detection steps mirror the stages and TTP-related indicators used in the attack:

    1. Connection attempts from malicious IPs to the Cisco ASA VPN
    2. Connection attempts to hit the CISCO ASA VPN URL using a parameter string often seen with brute force attacks
    3. Connection attempts to log in to the CISCO ASA VPN with often-used account names
    4. Process execution of set.bat and nd.exe files to expose more credentials and enable lateral movement of the threat actor
    5. Connection attempt to the domains of AnyDesk or RustDesk as a remote access tool for the threat actor to continue their exploitation of the victim network
    6. Connection attempts to authenticate to/from Windows machines with a specific naming convention (“WIN-*”) on a client’s user VPN network

    Threat Implication

    • Environments utilizing CISCO ASA VPNs become targets of interest for Akira and various APTs seeking unauthorized access. This is especially true for environments lacking MFA enforcement during VPN logins or having MFA exceptions for specific users.
    • Most adversaries employ tactics such as brute force, password spraying, and credential stuffing to exploit weak or default passwords. Additionally, other threat actors have been observed procuring exposed credentials from illicit online markets.
    • The APTs under scrutiny include the Akira and LockBit ransomware groups. Both have been noted for concluding their attacks with the deployment of ransomware.
    • Within the attack lifecycle, Akira and LockBit have leveraged legitimate, open-source remote access tools such as RustDesk and AnyDesk to navigate within compromised environments.

    Threat Detection

    Step 1
    The exploitation of these vulnerability CISCO ASA VPNs has been conducted by known APTs and IP addresses related to them have been captured. The first step in detecting potential exploitation attempts would be connection attempts from these malicious IPs to the Cisco ASA VPN.

    Table showcasing actions to detect if known ATP and IP addresses have conducted the exploitation vulnerability of CISCO ASA VPNs have been captured.

    Note: This CSV file listing includes all the mentioned usernames, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL – Using the Cisco ASA Data Source:

    index=cisco* sourcetype=cisco:asa eventtype=cisco_vpn* src_ip IN ("176.124.201.200","162.35.92.242","161.35.92.242","173.208.205.10","185.157.162.21","185.193.64.226","149.93.239.176","158.255.215.236","95.181.150.173","94.232.44.118","194.28.112.157","5.61.43.231","5.183.253.129","45.80.107.220","193.233.230.161","149.57.12.131","149.57.15.181","193.233.228.183","45.66.209.122","95.181.148.101","193.233.228.86","176.124.201.200","162.35.92.242","144.217.86.109","31.184.236.63","31.184.236.71","31.184.236.79","194.28.112.149","62.233.50.19","194.28.112.156","45.227.255.51","185.92.72.135","80.66.66.175","62.233.50.11","62.233.50.13","194.28.115.124","62.233.50.81","152.89.196.185","91.240.118.9","185.81.68.45","152.89.196.186","185.81.68.46","185.81.68.74","62.233.50.25","62.233.50.17","62.233.50.23","62.233.50.101","62.233.50.102","62.233.50.95","62.233.50.103","92.255.57.202","91.240.118.5","91.240.118.8","91.240.118.7","91.240.118.4","161.35.92.242","45.227.252.237","147.78.47.245","46.161.27.123","94.232.43.143","94.232.43.250","80.66.76.18","94.232.42.109","179.60.147.152","185.81.68.197","185.81.68.75") |  table _time, Cisco_ASA_action, Cisco_ASA_message_id, Cisco_ASA_user, src_ip, dest_ip, direction, signature

    SPL 2 – Using Network Traffic Data Model:

    | tstats `summariesonly` latest(_time) as _time, sum("All_Traffic.bytes") as bytes, values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as transport, values("All_Traffic.dest_port") as dest_port from datamodel="Network_Traffic"."All_Traffic" where All_Traffic.src IN ("176.124.201.200","162.35.92.242","161.35.92.242","173.208.205.10","185.157.162.21","185.193.64.226","149.93.239.176","158.255.215.236","95.181.150.173","94.232.44.118","194.28.112.157","5.61.43.231","5.183.253.129","45.80.107.220","193.233.230.161","149.57.12.131","149.57.15.181","193.233.228.183","45.66.209.122","95.181.148.101","193.233.228.86","176.124.201.200","162.35.92.242","144.217.86.109","31.184.236.63","31.184.236.71","31.184.236.79","194.28.112.149","62.233.50.19","194.28.112.156","45.227.255.51","185.92.72.135","80.66.66.175","62.233.50.11","62.233.50.13","194.28.115.124","62.233.50.81","152.89.196.185","91.240.118.9","185.81.68.45","152.89.196.186","185.81.68.46","185.81.68.74","62.233.50.25","62.233.50.17","62.233.50.23","62.233.50.101","62.233.50.102","62.233.50.95","62.233.50.103","92.255.57.202","91.240.118.5","91.240.118.8","91.240.118.7","91.240.118.4","161.35.92.242","45.227.252.237","147.78.47.245","46.161.27.123","94.232.43.143","94.232.43.250","80.66.76.18","94.232.42.109","179.60.147.152","185.81.68.197","185.81.68.75") OR All_Traffic.dest IN "176.124.201.200","162.35.92.242","161.35.92.242","173.208.205.10","185.157.162.21","185.193.64.226","149.93.239.176","158.255.215.236","95.181.150.173","94.232.44.118","194.28.112.157","5.61.43.231","5.183.253.129","45.80.107.220","193.233.230.161","149.57.12.131","149.57.15.181","193.233.228.183","45.66.209.122","95.181.148.101","193.233.228.86","176.124.201.200","162.35.92.242","144.217.86.109","31.184.236.63","31.184.236.71","31.184.236.79","194.28.112.149","62.233.50.19","194.28.112.156","45.227.255.51","185.92.72.135","80.66.66.175","62.233.50.11","62.233.50.13","194.28.115.124","62.233.50.81","152.89.196.185","91.240.118.9","185.81.68.45","152.89.196.186","185.81.68.46","185.81.68.74","62.233.50.25","62.233.50.17","62.233.50.23","62.233.50.101","62.233.50.102","62.233.50.95","62.233.50.103","92.255.57.202","91.240.118.5","91.240.118.8","91.240.118.7","91.240.118.4","161.35.92.242","45.227.252.237","147.78.47.245","46.161.27.123","94.232.43.143","94.232.43.250","80.66.76.18","94.232.42.109","179.60.147.152","185.81.68.197","185.81.68.75") by "All_Traffic.action", "All_Traffic.src", "All_Traffic.dest", "All_Traffic.user"| `drop_dm_object_name("All_Traffic”)| table action, src, src_port, dest, transport, dest_port, user, bytes

    Step 2
    As observed by multiple researchers, APTs have been seen to make connection attempts to hit the CISCO ASA VPN portals using a specific parameter suited for brute forcing. Detecting the use of this parameter could help uncover an attempt to exploit the CISCO ASA VPN.

    Actions to Detect:

    Attempts to hit URLs ending in the following;
    +CSCOE+/logon.htm

    SPL - Using Web Datamodel:
    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" where Web.url = "*+CSCOE+/logon.htm*" by "Web.src", "Web.dest", "Web.user", "Web.url", _time | fields _time src, dest, user, url, http_content_type, http_method, http_user_agent, status, bytes 
    

    Step 3
    Many attackers utilize strategies like brute force attacks, password spraying, and credential stuffing to exploit vulnerabilities associated with weak or default passwords. Detecting connection attempts to log in to the CISCO ASA VPN with often-used account names could be evidence of attempting exploitation.

    Actions to Detect:

    A table showcasing actions to detect if known ATP and IP addresses have conducted the exploitation vulnerability of CISCO ASA VPNs has been captured using often-used account names to determine exploitation.

    Note: This CSV file listing includes all the mentioned usernames, along with other Indicators of Compromise (IOCs), conveniently consolidated for streamlined export into a lookup for notable detections.

    SPL – Using the Cisco ASA Data Source:

    index=cisco* sourcetype=cisco:asa eventtype=cisco_vpn* Cisco_ASA_user IN ("TEST","CISCO","SCANUSER","PRINTER","admin","adminadmin","backupadmin","kali","cisco","guest","accounting","developer","ftp user","training","test","printer","echo","security","inspector","test test","snmp")|  table _time, Cisco_ASA_action, Cisco_ASA_message_id, Cisco_ASA_user, src_ip, dest_ip, direction, signature

    SPL 2 – Using the Authentication Data Model:

    | tstats `summariesonly` latest(_time) as _time, values(Authentication.src_user_id) as src_user_id, values(Authentication.src_user_role) as src_user_role, values(Authentication.user_id) as user_id, values(Authentication.user_role) as user_role, values(Authentication.vendor_account) as vendor_account, values(Authentication.authentication_method) as authentication_method from datamodel="Authentication"."Authentication" where Authentication.src_user IN ("TEST","CISCO","SCANUSER","PRINTER","admin","adminadmin","backupadmin","kali","cisco","guest","accounting","developer","ftp user","training","test","printer","echo","security","inspector","test test","snmp") by "Authentication.action", "Authentication.app", "Authentication.src", "Authentication.src_user", "Authentication.dest", "Authentication.user"| `drop_dm_object_name("Authentication")` | fields _time, action, app, src, src_user, src_user_id, src_user_role, dest, user, user_id, user_role, vendor_account, authentication_method

    Step 4
    Upon successful internal authentication, threat actors deployed “set.bat,” installing and activating AnyDesk with a preset password, “greenday#@!”. They also executed “nd.exe” on some systems to access additional credentials. These actors then moved laterally and executed files on other systems, often concluding with the deployment of Akira or LockBit ransomware.

    Actions to Detect:
    An attempt to execute the following processes;
    set.bat
    nd.exe

    SPL – Using the Endpoint Data Model:

    | tstats `summariesonly` latest(_time) as _time, values(Processes.user) as user, values(Processes.process) as process, latest(Processes.parent_process) as parent_process, latest(Processes.parent_process_exec) as parent_process_exec, latest(Processes.parent_process_guid) as parent_process_guid, latest(Processes.parent_process_id) as parent_process_id, latest(Processes.parent_process_path) as parent_process_path, latest(Processes.process_path) as process_path, latest(Processes.process_exec) as process_exec, latest(Processes.process_guid) as process_guid, latest(Processes.process_id) as process_id, latest(Processes.process_hash) as process_hash from datamodel="Endpoint"."Processes" where Processes. process IN ("set.bat", "nd.exe") by Processes.dest, Processes.process_name, Processes.parent_process_name | fields _time, dest, user, process_name, process, process_hash, process_path, process_exec, process_id, process_guid, parent_process, parent_process_name, parent_process_path, parent_process_exec, parent_process_guid, parent_process_id

    Step 5
    This step involves detecting outbound connection attempts to anydesk.com and/or rustdesk.com from the client’s environment. Such software is used by the APTs as a foothold in a client’s environment for further exploitation. This is especially important for environments that have strong application policies that don’t allow unapproved applications to be installed. This detection is not as useful if either of these products is used in a client’s environment.

    Actions to Detect:
    Detect outbound connection attempts to the following URLs;
    anydesk.com
    rustdesk.com

    SPL- Using the Web Data Model:

    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | where match(url, "(?i)(anydesk.com)|(rustdesk.com") | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest  | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url 

    SPL 2 – Using the Network Resolution Data Model:

    | tstats `summariesonly` latest(_time) as _time  values("DNS.dest") as dest, values("DNS.query") as query, values("DNS.query_count") as query_count, values("DNS.message_type") as message_type, values("DNS.answer") as answer, values("DNS.reply_code") as reply_code from datamodel="Network_Resolution"."DNS" where DNS.query IN ("anydesk.com", "rustdesk.com") | table _time, dest, query, query_count, message_type, answer, reply_code | fieldformat Time = strftime(_time,"%m/%d/%Y %T")

    Step 6
    Research has shown that a pattern Akira and other APTs followed getting into a Cisco VPN was to attempt to authenticate to internal machines for lateral movement. Common source machine names and destinations have been made aware. Thus, connection attempts to authenticate to/from Windows machines with a specific naming convention (“WIN-*”) on a client’s user VPN network may be evidence of this CISCO ASA VPN exploitation.

    Actions to Detect:
    The following Windows Event Codes;
    4626 – “An account was successfully logged on”
    4625 – “An account failed to log on.”

    The following machines names attempting authentication;
    WIN-*
    WIN-R84DEUE96RB

    SPL – Using the Windows Event Log Data Source:

    index=wineventlog EventCode IN ("4625","4626") ComputerName IN ("WIN-R84DEUE96RB", "WIN-*")
    | table _time, name, Message, status, ComputerName, Display_Name, EventCode,
    

    SPL 2 – Using the Authentication Data Model:

    | tstats `summariesonly` latest(_time) as _time, values(Authentication.src_user_id) as src_user_id, values(Authentication.src_user_role) as src_user_role, values(Authentication.user_id) as user_id, values(Authentication.user_role) as user_role, values(Authentication.vendor_account) as vendor_account, values(Authentication.authentication_method) as authentication_method, values(Authentication.signature) as signature from datamodel="Authentication"."Authentication" where Authentication.signature IN ("4625","4626") AND "Authentication.dest" IN ("WIN-R84DEUE96RB", "WIN-*") by "Authentication.action", "Authentication.app", "Authentication.src", "Authentication.src_user", "Authentication.dest", "Authentication.user" | `drop_dm_object_name("Authentication")` | fields _time, action, app, src, src_user, src_user_id, src_user_role, dest, user, user_id, user_role, vendor_account, authentication_method
    

    IOC List

    We have aggregated a list of IOCs related to the Cisco ASA VPN exploitation. It has been presented here for you to have it consolidated in one spot and made easier to export to a lookup for notable detections.

    Conclusion

    Ideally, you could make scheduled searches like what is shown above with lookup tables for matching more specific and new detections. These can be set to run on a continuous schedule to ensure the monitoring of your assets from new vulnerabilities. Old vulnerabilities that have been patched (and applied) can also be aged out of this lookup table to ensure it is timely and efficient. For questions on how to build such a process that is dynamic and customizable for your environment, ask one of our consultants by filling in the form below. Also, subscribe to the TekStream blog to catch the next monthly security bulletin and apply the latest detections to protect your systems. Happy Splunking!

    References

    Articles referenced and used for this Blog Post:

    Akira Ransomware Targets Cisco VPNs to Breach Organizations

    Hacking Campaign Bruteforces VPNs to Breach Networks

    Cisco ASA Ransomware Attacks

    Under Seige Rapid7 Observed Exploitation of Cisco ASA SSL VPNs

    Akira Ransomware Attacking VPNs Without Multi-Factor Authentication

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary in nature and come without any certification of efficacy.

  • Security Bulletin: Microsoft Zero-Day Office & Windows Vulnerability

    Security Bulletin: Microsoft Zero-Day Office & Windows Vulnerability

    By Bryan Bollou, Team Lead, Cybersecurity Engineering

    Purpose of TekStream Security Bulletins

    With the TekStream Security Bulletin, we are presenting some specific detection use cases using everyone’s favorite SIEM Splunk! We’ve cherry-picked vulnerabilities that are not only intriguing but also directly impactful for our valued clients. These vulnerabilities were chosen based on a multitude of factors, ranging from the technology in the crosshairs to the specific sectors being targeted. This is not a blog post to fully explain or give recommendations on remediating the vulnerability – this has been discussed at length by various resources. The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit these vulnerabilities. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the vulnerability being exploited. Here at TekStream, we have an amazing team of cybersecurity engineers armed with a deep knowledge of logs and the secrets they hold, ready to fortify your cyber resiliency!

    Introduction

    Confirmed to have been in use since July 3rd, 2023, the vulnerability CVE-2023-36884 is a zero-day Office and Windows HTML Remote Code Execution Vulnerability. This is an unpatched vulnerability that could be exploited by doing the following. 

    • An attacker designs a Microsoft document that downloads a malicious file when simply opened by an unsuspecting user. 
    • The malicious file downloaded has a script that injects an iframe into the system.  
    • This then leads to another download with a malicious payload. This payload can contain any number of malware including adware, spyware, and even ransomware. A well-known malware family associated with this vulnerability is “RomCom” malware. 

    Threat Overview

    The vulnerability has been acknowledged by Microsoft and they have suggested various mitigation steps to prevent its exploitation. These steps include Blocking Office applications from creating child processes or setting the FEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATION registry key to avoid exploitation. In this blog post, we would like to present some specific detection use cases using everyone’s favorite SIEM: Splunk. 

    For information on remediating the vulnerability, various resources have discussed this at length, notably Picus Security. We recommend you review their assessment.

    Aggregate Detections

    The goal here is to aggregate the detections to maximize your chances of detecting an attempt to exploit this vulnerability. A part of that is gathering the list of IOCs scattered in multiple locations on the internet and looking at activity that could point to the CVE-2023-36884 vulnerability being exploited. Here at TekStream, we have several security engineers that are intimate with cybersecurity knowledge and especially the logs of our clients.  

    In this blog post, we go through the various steps in CVE-2023-36884 vulnerability exploitation and detection. With this format, we are providing a more generic data model “tstats” command. This is taking advantage of the data model to quickly find data that may match our IOC list. We then provide examples of a more specific search that will add context to the first find. There will be a wide variety of specific searches as each client has their own specific technologies.  

    Note: The initial infected Microsoft document is normally sent to the victims through a phishing campaign. Detecting this part is not covered in this blog post.  


    The following detection steps mirror the stages and TTP-related indicators used in the attack: 

    1. Detect if any Microsoft application started processes with PowerShell or a Windows shell – cmd.exe or powershell.exe.  
    1. Detect connections to IP addresses associated with malware known to exploit this vulnerability. 
    1. Detect connections to domains associated with malware known to exploit this vulnerability. Also, detect connections to URLs associated with malware that exploit this vulnerability and allow users to pay ransoms. 
    1. Detect if a “.url” file was created in Microsoft Office’s recent folder: C:Documents and Settingsuser profileApplication DataMicrosoftOfficeRecent. 
    1. Detect hashes and filenames of scripts known to exploit this vulnerability. 

    Threat Implication

    • Phishing campaigns with Microsoft document attachments are the main method of delivery to exploit this vulnerability. 
    • Customers who use Microsoft Defender for Office are protected from attachments that attempt to exploit this vulnerability. 

    Threat Detection

    Step 1

    When exploiting this vulnerability, a maliciously modified document is normally sent to a victim in a phishing email. This document will then spawn a child process when opened by an Office application to download more malicious files. Thus, detecting if any Microsoft application started processes with PowerShell or a Windows shell – cmd.exe or powershell.exe is the first step in detection.

    Actions Detect
    Table listing Microsoft Office applications as parent processes (e.g., Excel.exe, Word.exe, PowerPoint.exe) capable of spawning suspicious child processes like cmd.exe and powershell.exe—an indication of possible exploit activity linked to a zero-day vulnerability.
    SPL
    | tstats `summariesonly` latest(_time) as _time, values(Processes.user) as user, values(Processes.process) as process, latest(Processes.parent_process) as parent_process, latest(Processes.parent_process_exec) as parent_process_exec, latest(Processes.parent_process_guid) as parent_process_guid, latest(Processes.parent_process_id) as parent_process_id, latest(Processes.parent_process_path) as parent_process_path, latest(Processes.process_path) as process_path, latest(Processes.process_exec) as process_exec, latest(Processes.process_guid) as process_guid, latest(Processes.process_id) as process_id, latest(Processes.process_hash) as process_hash from datamodel="Endpoint"."Processes" where (Processes.parent_process IN ("Excel.exe","Graph.exe","MSAccess.exe","MSPub.exe","PowerPoint.exe","Visio.exe","WinProj.exe","WinWord.exe","Wordpad.exe") AND Processes.process IN ("cmd.exe","powershell.exe")) by Processes.dest, Processes.process_name, Processes.parent_process_name| head 10000 | `drop_dm_object_name("Processes")`| fields _time, dest, user, process_name, process, process_hash, process_path, process_exec, process_id, process_guid, parent_process, parent_process_name, parent_process_path, parent_process_exec, parent_process_guid, parent_process_id 

    Step 2

    There are two steps in the exploitation of this vulnerability in which a maliciously modified document may attempt to connect to an external source to download additional malicious scripts and/or payloads. To detect the connection to some of the known destinations associated with this malware, this detection looks for attempted connections to known bad IP addresses.

    Actions Detect

    Attempted Connections to the following IP addresses. Note: These and other IOCs are listed in the CSV attached at the end of this blog post.

    Duplicate table showing Office-based parent processes and associated child processes (cmd.exe, powershell.exe) involved in potentially malicious behavior exploited in Microsoft’s zero-day vulnerability.
    SPL
    | tstats `summariesonly` latest(_time) as _time, sum("All_Traffic.bytes") as bytes, values("All_Traffic.src_port") as src_port, values("All_Traffic.transport") as transport, values("All_Traffic.dest_port") as dest_port from datamodel="Network_Traffic"."All_Traffic" where All_Traffic.src IN ("104.234.239.26","138.124.183.8","209.127.116.190","209.159.147.170","45.9.148.118","45.9.148.123","45.9.148.219","65.21.27.250","66.23.226.102","74.50.94.156 ","74.50.94.156","94.232.40.34") OR All_Traffic.dest IN ("104.234.239.26","138.124.183.8","209.127.116.190","209.159.147.170","45.9.148.118","45.9.148.123","45.9.148.219","65.21.27.250","66.23.226.102","74.50.94.156 ","74.50.94.156","94.232.40.34") by "All_Traffic.action", "All_Traffic.src", "All_Traffic.dest", "All_Traffic.user" | head 10000 | `drop_dm_object_name("All_Traffic")`| eval earliest_time = IF(isnum("$earliest_time$"),"$earliest_time$",strftime(relative_time(now(),"$earliest_time$"),"%s")) | eval latest_time = CASE(isnum("$latest_time$"),"$latest_time$","$latest_time$"="now",now(),1=1,strftime(relative_time(now(),"$latest_time$"),"%s")) | where _time >= earliest_time AND _time <= latest_time | head 10000 | table action, src, src_port, dest, transport, dest_port, user, bytes 

    Step 3

    Like above, there are two steps in the exploitation of this vulnerability in which a maliciously modified document may attempt to connect to an external source to download additional malicious scripts and/or payloads. To detect the connection to some of the known destinations associated with this malware, this detection looks for attempted connections to known bad domains.

    Detect connections to URLs associated with malware that exploit this vulnerability and allow users to pay ransoms.

    Actions Detect

    Attempted Connections to the list of domains. IOC Domain Checklist

    SPL

    Detect Domains

    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | where match(url, "(?i)(altimata.org)|(bentaxworld.com)|(finformservice.com)|(penofach.com)|(ukrainianworldcongress.info)|(wexonlake.com)") | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest  | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url | fieldformat Time = strftime(Time,"%m/%d/%Y %T") 

    Detect URLs 

    | tstats `summariesonly` sum("Web.bytes") as bytes,values("Web.http_content_type") as http_content_type,values("Web.http_method") as http_method,values("Web.http_user_agent") as http_user_agent,values("Web.status") as status from datamodel="Web"."Web" where Web.url IN ("https://finformservice.com:80/api/v1.5/subscriptiontoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9","https://finformservice.com:80/api/v1.5/subscriptiontoken=eyJpZCI6MTIzNDU2Nzg5LCJuYW1lIjoiSm9zZXBoIn0","https://finformservice.com:80/api/v1.5/subscriptiontoken=OpOSSw7e485LOP5PrzScxHb7SR6sAOMRckfFwi4rp7o","https://65.21.27.250:8080/mds/O--------------------------","https://finformservicecom:8080/mds/S-------------------------- ") by "Web.src", "Web.dest", "Web.user", "Web.http_referrer", "Web.url", _time | `drop_dm_object_name("Web")` | fields _time src, dest, user, http_referrer, url, http_content_type, http_method, http_user_agent, status, bytes | eval ip_pair = src . " - " . dest | stats values(_time) as Time values(ip_pair) AS src_dest, values(user) as user, values(http_referrer) as http_referrer, values(http_user_agent) as http_user_agent, values(http_method) as http_method, values(status) as status, values(bytes) as bytes count by url| fieldformat Time = strftime(Time,"%m/%d/%Y %T") 
    

    Step 4

    During the exploitation of the vulnerability, a new file normally one with a “.url” extension has been seen to be dropped. This would be detected in the Microsoft Office’s “recent” folder: C:Documents and Settingsuser profileApplication DataMicrosoftOfficeRecent

    Actions Detect

    A file with the extension “.url” created or moved into the Microsoft Office “recent” folder.

    SPL
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size |`drop_dm_object_name("Filesystem")` | where match (file_name, "(i?)(.url)$” AND match(file_path, “(?i)( C:\\Documents and Settings\\.*\\Application Data\\Microsoft\\Office\\Recent))”| fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time 
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T") 
    

    Step 5

    While there is a ton of variety for the malware payload that can be downloaded in the last step of this vulnerability’s exploitation, there are certain scripts seen often. This detection is to find the hashes of these commonly seen malicious scripts in a client’s environment.

    Actions Detect

    The occurrence of the following hashes in the environment.

    Table displaying two columns of hexadecimal hash values—likely file or process hashes—used to identify known malicious files or indicators of compromise (IOCs) associated with the Microsoft Office and Windows zero-day vulnerability.
    SPL
    | tstats `summariesonly` latest(_time) as _time, latest(Filesystem.file_create_time) as file_create_time, latest(Filesystem.file_modify_time) as file_modify_time, latest(Filesystem.file_access_time) as file_access_time from datamodel="Endpoint"."Filesystem", values(Filesystem.dest) as dest, values(Filesystem.action) as action, values(Filesystem.file_name) as file_name, values(Filesystem.file_hash) as file_hash, values(Filesystem.file_path) as file_path, values(Filesystem.file_size) as file_size where Filesystem.file_hash IN ("0501d09a219131657c54dba71faf2b9d793e466f2c7fdf6b0b3c50ec5b866b2a","07377209fe68a98e9bca310d9749daa4eb79558e9fc419cf0b02a9e37679038d","1a7bb878c826fe0ca9a0677ed072ee9a57a228a09ee02b3c5bd00f54f354930f","3a3138c5add59d2172ad33bc6761f2f82ba344f3d03a2269c623f22c1a35df97","48142dc7fe28a5d8a849fff11cb8206912e8382314a2f05e72abad0978b27e90","5f40cb4852ec50ee24f3cd951a172c725d02012d17dd645b6ce22d324aa140ad","a61b2eafcf39715031357df6b01e85e0d1ea2e8ee1dfec241b114e18f7a1163f","d3263cc3eff826431c2016aee674c7e3e5329bebfb7a145907de39a279859f4a","e7cfeb023c3160a7366f209a16a6f6ea5a0bc9a3ddc16c6cba758114dfe6b539") |`drop_dm_object_name("Filesystem")` | fields _time, dest, action, file_name, file_hash, file_path, file_size, file_create_time, file_modify_time, file_access_time 
    | fieldformat Time = strftime(_time,"%m/%d/%Y %T") 

    Conclusion

    It is highly recommended to implement scheduled searches using lookup tables, as demonstrated above, to enhance the precision of matching specific and novel detections. By setting these searches to run continuously, you can ensure constant monitoring of your assets for emerging vulnerabilities. To maintain timeliness and efficiency, it is essential to remove old, patched vulnerabilities from the lookup table. If you need assistance in creating a dynamic and customizable process tailored to your environment, feel free to consult our experts by completing the form below. Additionally, stay informed by subscribing to the TekStream blog for the latest monthly security bulletin and applying the most recent detections to fortify your systems. Happy Splunking! 

    References

    Articles referenced and used for this security bulletin:

    CVE-2023-36884 – Microsoft Office and Windows HTML Remote Code Execution: Threat Brief (Updated)

    Storm-0978 attacks reveal financial and espionage motives

    CVE-2023-36884: A Detailed Look at The Recent Microsoft Vulnerability

    Yet Another Microsoft Office365 zero-day: CVE-2023-36884

    Disclaimer

    The approaches recommended herein have not been tested broadly across the TekStream customer base. They are preliminary in nature and come without any certification of efficacy.