## 10454006.r2.v1 # Malware Analysis Report 2023-07-27 ## NNoottiiffiiccaattiioonn This report is provided "as is" for informational purposes only. The Department of Homeland Security (DHS) does not provide any warranties of any kind regarding any information contained herein. The DHS does not endorse any commercial product or service referenced in this bulletin or otherwise. This document is marked TLP:CLEAR--Recipients may share this information without restriction. Sources may use TLP:CLEAR when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:CLEAR information may be shared without restriction. For more information on the Traffic Light Protocol (TLP), see http://www.cisa.gov/tlp. ## SSuummmmaarryy DDeessccrriippttiioonn CISA obtained two SEASPY malware samples. The malware was used by threat actors exploiting CVE-2023-2868, a former zero-day vulnerability affecting versions 5.1.3.001-9.2.0.006 of Barracuda Email Security Gateway (ESG). SEASPY is a persistent and passive backdoor that masquerades as a legitimate Barracuda service “BarracudaMailService” that allows the threat actors to execute arbitrary commands on the ESG appliance. For information about related malware, specifically information on the initial exploit payload and other backdoors, see CISA Alert: CISA Releases Malware Analysis Reports on Barracuda Backdoors. SSuubbmmiitttteedd FFiilleess ((22)) 3e21e547cf94cb07c010fe82d6965e5bd52dbdd9255b4dd164f64addfaa87abb (BarracudaMailService.1) 69935a1ce0240edf42dbe24535577140601bcf3226fa01e4481682f6de22d192 (6931018-BarracudaMailService.2) ## FFiinnddiinnggss 6699993355aa11ccee00224400eeddff4422ddbbee2244553355557777114400660011bbccff33222266ffaa0011ee44448811668822ff66ddee2222dd119922 TTaaggss trojan DDeettaaiillss NNaammee 6931018-BarracudaMailService.2 SSiizzee 2924089 bytes TTyyppee ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.26, BuildID[sha1]=495062eaa63784dad0a098d58892f58deb47ea66, with debug_info, not stripped MMDD55 5d6cba7909980a7b424b133fbac634ac SSHHAA11 d114a707fc6abbd8060f821893a9ee64dc3b2714 SSHHAA225566 69935a1ce0240edf42dbe24535577140601bcf3226fa01e4481682f6de22d192 SSHHAA551122 ef966e1d679daa44ee4c86848b71a0be27a79c8824eba8e74c866322e59a8bdce66b32f3d4417256af351f87dd149a 73ed7e8e40df5794c5273cf029d04b6f25 ssssddeeeepp 49152:IaMq45lHsbhe9YBU80A3hvJeD7ANjQ4maMTFhmwzHPm0WhphC:oqJh4YWkLeDKOhmwa0WhphC EEnnttrrooppyy 6.165718 ----- AAnnttiivviirruuss EESSEETT a variant of Linux/SeaSpy.A trojan MMccAAffeeee Linux/Seaspy!5D6CBA790998 YYAARRAA RRuulleess - rule CISA_10452108_01 : SEASPY backdoor communicates_with_c2 installs_other_components { meta: Author = "CISA Code & Media Analysis" Incident = "10452108" Date = "2023-06-20" Last_Modified = "20230628_1000" Actor = "n/a" Family = "SEASPY" Capabilities = "communicates-with-c2 installs-other-components" Malware_Type = "backdoor" Tool_Type = "unknown" Description = "Detects malicious Linux SEASPY samples" SHA256_1 = "3f26a13f023ad0dcd7f2aa4e7771bba74910ee227b4b36ff72edc5f07336f115" SHA256_2 = "69935a1ce0240edf42dbe24535577140601bcf3226fa01e4481682f6de22d192" SHA256_3 = "5f5b8cc4d297c8d46a26732ae47c6ac80338b7be97a078a8e1b6eefd1120a5e5" SHA256_4 = "10efa7fe69e43c189033006010611e84394569571c4f08ea1735073d6433be81" strings: $s0 = { 2e 2f 42 61 72 72 61 63 75 64 61 4d 61 69 6c 53 65 72 76 69 63 65 20 65 74 68 30 } $s1 = { 75 73 61 67 65 3a 20 2e 2f 42 61 72 72 61 63 75 64 61 4d 61 69 6C 53 65 72 76 69 63 65 20 3c 4e 65 74 77 6f 72 6b 2d 49 6e 74 65 72 66 61 63 65 } $s2 = { 65 6e 74 65 72 20 6f 70 65 6e 20 74 74 79 20 73 68 65 6c 6c } $s3 = { 25 64 00 4e 4f 20 70 6f 72 74 20 63 6f 64 65 } $s4 = { 70 63 61 70 5f 6c 6f 6f 6b 75 70 6e 65 74 3a 20 25 73 } $s5 = { 43 68 69 6c 64 20 70 72 6f 63 65 73 73 20 69 64 3a 25 64 } $s6 = { 5b 2a 5d 53 75 63 63 65 73 73 21 } $a7 = { bf 90 47 90 ec 18 fe e3 83 e2 a9 f7 8d 85 18 1d } $a8 = { 81 35 1e f0 94 ab 2a ba 5d f0 37 76 69 19 9f 1e } $a9 = { 6a 8e c7 89 ce c1 fe 64 78 a6 e1 c5 fe 03 d1 a7 } $a10 = { c2 ff d1 0d 24 23 ec c0 57 f9 8d 4b 05 34 41 b8 } condition: uint32(0) == 0x464c457f and (all of ($s*)) or ( all of ($a*)) } ssssddeeeepp MMaattcchheess No matches found. DDeessccrriippttiioonn This artifact is a 64-bit ELF file that has been identified as a "SEASPY" malware variant installed as a system service. The sample is a persistent backdoor that masquerades as a legitimate Barracuda Networks service. The malware is designed to listen to commands received from the Threat Actor’s (TA) Command-and-Control (C2) through Transmission Control Protocol (TCP) packets. When executed, the malware uses libpcap sniffer to monitor traffic for a magic packet on TCP port 25 (SMTP) and TCP port 587. It checks the network packet captured for a hard-coded string "oXmp". Note: This hard-coded string may change for other SEASPY variants. When the right sequence of packet is captured, it establishes a TCP reverse shell to the TA's C2 server for further exploitation. This allows the TA to execute arbitrary commands on the compromised system. The malware is based on an open-source backdoor program named "cd00r" and it is executed using the parameter below: --Begin argument— Usage: "./BarracudaMailService " Sample: "./ eth0" --End argument— ----- SSccrreeeennsshhoottss FFiigguurree 11.. -- This is disassembler output showing how the malware checks the parameters that the malware was executed with. 33ee2211ee554477ccff9944ccbb0077cc001100ffee8822dd66996655ee55bbdd5522ddbbdddd99225555bb44dddd116644ff6644aaddddffaaaa8877aabbbb TTaaggss trojan DDeettaaiillss NNaammee BarracudaMailService.1 SSiizzee 2924089 bytes TTyyppee ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.26, BuildID[sha1]=41942e680be29136ce7f1cdc9a15fd43968b0db0, with debug_info, not stripped MMDD55 32ffe48d1a8ced49c53033eb65eff6f3 SSHHAA11 2c7ad0e7897f348bec2e32f2af4282bd65916f8d SSHHAA225566 3e21e547cf94cb07c010fe82d6965e5bd52dbdd9255b4dd164f64addfaa87abb SSHHAA551122 12fd230c78c9e14b1bbb7f3c6776a14710693fa4224b4376775f118fc35584a5946a57dda43db20bd9ffc2950f4e62e 8c206506744bca5fe39e6cb9a1a91b981 ssssddeeeepp 49152:bgt0bmh2EXaRuFmK3cnlBceICm4ewQ/MTs/dgPm0WhphC:Ma0gug7bceI4ih/dp0WhphC EEnnttrrooppyy 6.165197 AAnnttiivviirruuss EESSEETT a variant of Linux/SeaSpy.A trojan MMccAAffeeee Linux/Seaspy!32FFE48D1A8C YYAARRAA RRuulleess - rule CISA_10452108_01 : SEASPY backdoor communicates_with_c2 installs_other_components { meta: Author = "CISA Code & Media Analysis" Incident = "10452108" Date = "2023-06-20" Last_Modified = "20230628_1000" Actor = "n/a" Family = "SEASPY" Capabilities = "communicates-with-c2 installs-other-components" ----- Malware_Type = "backdoor" Tool_Type = "unknown" Description = "Detects malicious Linux SEASPY samples" SHA256_1 = "3f26a13f023ad0dcd7f2aa4e7771bba74910ee227b4b36ff72edc5f07336f115" SHA256_2 = "69935a1ce0240edf42dbe24535577140601bcf3226fa01e4481682f6de22d192" SHA256_3 = "5f5b8cc4d297c8d46a26732ae47c6ac80338b7be97a078a8e1b6eefd1120a5e5" SHA256_4 = "10efa7fe69e43c189033006010611e84394569571c4f08ea1735073d6433be81" strings: $s0 = { 2e 2f 42 61 72 72 61 63 75 64 61 4d 61 69 6c 53 65 72 76 69 63 65 20 65 74 68 30 } $s1 = { 75 73 61 67 65 3a 20 2e 2f 42 61 72 72 61 63 75 64 61 4d 61 69 6C 53 65 72 76 69 63 65 20 3c 4e 65 74 77 6f 72 6b 2d 49 6e 74 65 72 66 61 63 65 } $s2 = { 65 6e 74 65 72 20 6f 70 65 6e 20 74 74 79 20 73 68 65 6c 6c } $s3 = { 25 64 00 4e 4f 20 70 6f 72 74 20 63 6f 64 65 } $s4 = { 70 63 61 70 5f 6c 6f 6f 6b 75 70 6e 65 74 3a 20 25 73 } $s5 = { 43 68 69 6c 64 20 70 72 6f 63 65 73 73 20 69 64 3a 25 64 } $s6 = { 5b 2a 5d 53 75 63 63 65 73 73 21 } $a7 = { bf 90 47 90 ec 18 fe e3 83 e2 a9 f7 8d 85 18 1d } $a8 = { 81 35 1e f0 94 ab 2a ba 5d f0 37 76 69 19 9f 1e } $a9 = { 6a 8e c7 89 ce c1 fe 64 78 a6 e1 c5 fe 03 d1 a7 } $a10 = { c2 ff d1 0d 24 23 ec c0 57 f9 8d 4b 05 34 41 b8 } condition: uint32(0) == 0x464c457f and (all of ($s*)) or ( all of ($a*)) } ssssddeeeepp MMaattcchheess No matches found. DDeessccrriippttiioonn This artifact is a 64-bit ELF file that has been identified as a "SEASPY" malware variant installed as a system service. This sample has the sample malicious capabilities as BarracudaMailService.2 (5d6cba7909980a7b424b133fbac634ac). The only difference between the binaries is located in the function named "start_pcap_listener". In the function "start_pcap_listener" both binaries call a function named "reverse shell" to start the reverse shell functionality of the malware. The difference is that BarracudaMailService.1 (32ffe48d1a8ced49c53033eb65eff6f3) jumps directly to the set of instructions that start the reverse shell, as opposed to BarracudaMailService.2 (5d6cba7909980a7b424b133fbac634ac), which contains an extra set of instructions before jumping to the instructions that start the reverse shell. ## RReeccoommmmeennddaattiioonnss CISA recommends that users and administrators consider using the following best practices to strengthen the security posture of their organization's systems. Any configuration changes should be reviewed by system owners and administrators prior to implementation to avoid unwanted impacts. - Maintain up-to-date antivirus signatures and engines. - Keep operating system patches up-to-date. - Disable File and Printer sharing services. If these services are required, use strong passwords or Active Directory authentication. - Restrict users' ability (permissions) to install and run unwanted software applications. Do not add users to the local administrators group unless required. - Enforce a strong password policy and implement regular password changes. - Exercise caution when opening e-mail attachments even if the attachment is expected and the sender appears to be known. - Enable a personal firewall on agency workstations, configured to deny unsolicited connection requests. - Disable unnecessary services on agency workstations and servers. - Scan for and remove suspicious e-mail attachments; ensure the scanned attachment is its "true file type" (i.e., the extension matches the file header). - Monitor users' web browsing habits; restrict access to sites with unfavorable content. - Exercise caution when using removable media (e.g., USB thumb drives, external drives, CDs, etc.). ----- - Scan all software downloaded from the Internet prior to executing. - Maintain situational awareness of the latest threats and implement appropriate Access Control Lists (ACLs). Additional information on malware incident prevention and handling can be found in National Institute of Standards and Technology (NIST) Special Publication 800-83, ""GGuuiiddee ttoo MMaallwwaarree IInncciiddeenntt PPrreevveennttiioonn && HHaannddlliinngg ffoorr DDeesskkttooppss aanndd LLaappttooppss"".. ## CCoonnttaacctt IInnffoorrmmaattiioonn - 1-888-282-0870 [• CISA Service Desk (UNCLASS)](mailto:CISAservicedesk@cisa.dhs.gov) [• CISA SIPR (SIPRNET)](mailto:NCCIC@dhs.sgov.gov) [• CISA IC (JWICS)](mailto:NCCIC@dhs.ic.gov) CISA continuously strives to improve its products and services. You can help by answering a very short series of questions about this product at the following URL: [https://us-cert.cisa.gov/forms/feedback/](https://us-cert.cisa.gov/forms/feedback/) ## DDooccuummeenntt FFAAQQ WWhhaatt iiss aa MMIIFFRR?? A Malware Initial Findings Report (MIFR) is intended to provide organizations with malware analysis in a timely manner. In most instances this report will provide initial indicators for computer and network defense. To request additional analysis, please contact CISA and provide information regarding the level of desired analysis. WWhhaatt iiss aa MMAARR?? A Malware Analysis Report (MAR) is intended to provide organizations with more detailed malware analysis acquired via manual reverse engineering. To request additional analysis, please contact CISA and provide information regarding the level of desired analysis. CCaann II eeddiitt tthhiiss ddooccuummeenntt?? This document is not to be edited in any way by recipients. All comments or questions related to this document should be directed to the CISA at 1-888-282-0870 or [CISA Service Desk.](mailto:CISAservicedesk@cisa.dhs.gov) CCaann II ssuubbmmiitt mmaallwwaarree ttoo CCIISSAA?? Malware samples can be submitted via three methods: [• Web: https://malware.us-cert.gov](https://malware.us-cert.gov/) - E-Mail: [submit@malware.us-cert.gov](mailto:submit@malware.us-cert.gov) - FTP: ftp.malware.us-cert.gov (anonymous) CISA encourages you to report any suspicious activity, including cybersecurity incidents, possible malicious code, software vulnerabilities, and phishing-related scams. Reporting forms can be found on CISA's homepage at [www.cisa.gov.](http://www.cisa.gov/) ## TTLLPP:: CCLLEEAARR -----