MAR-10339606-1.v1: Pulse Secure Connect
NotificationThis 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. SummaryDescriptionCISA received five files for analysis. Two files are Perl scripts that execute the attacker's commands stored in the environment variable; one file is a Perl library that provides functions to an installer; one file is a Perl script that creates a table and that table's first record; and one file is a shell script that manipulates the '/bin/umount' file and executes it. This analysis is derived from malicious files found on Pulse Connect Secure devices. For a downloadable copy of indicators of compromise, see: MAR-10339606-1.v1.stix Files (5)4ebb25ef9621c44cdb52630e44bcd1b5a848c0c56f01fa759863d50166bb0928 (umount) 6959bbbe345b9699282b8a599b6a65e53731720905e2a40aaca16fa796ffe767 (DSUpgrade.pm) ade49335dd276f96fe3ba89de5eb02ea380901b5ef60ff6311235b6318c57f66 (licenseserverproto.cgi) e3137135f4ad5ecdc7900a619d7f1b88ba252b963b38ae9a156299cc9bce92a1 (rdpreauth.cgi) ea1574595f87171c26f483df77dec52b0c5c73dd37f4dd554944cd6a8b484d17 (licenseserverproto.cgi) Findingsade49335dd276f96fe3ba89de5eb02ea380901b5ef60ff6311235b6318c57f66Tagswebshell Details
AntivirusNo matches found. YARA RulesNo matches found. ssdeep MatchesNo matches found. DescriptionThis is a Perl script that executes a HTTP GET command stored in the environment variables $ENV{'QUERY_STRING'}. This Perl script also creates a table with two columns (msg_body, msg_length) and the first record for this table. The first record's msg_body is the standard input streams and msn_length is the standard input streams' length. 6959bbbe345b9699282b8a599b6a65e53731720905e2a40aaca16fa796ffe767Tagswebshell Details
AntivirusNo matches found. YARA RulesNo matches found. ssdeep MatchesNo matches found. DescriptionThis file is a Pulse Secure Perl application that has been modified to add webshell script code into the content of the Pulse Secure Perl CGI script file "/root/home/webserver/htdocs/dana-na/licenseserver/licenseserverproto.cgi." The script contains the following patched in commented out code: —Begin Patched In Commented CGI Code— ###cgistart1 ###cgistart2 ##end_total The Pulse Secure Perl script also contains the following suspicious live / uncommented code. This code is designed to modify several Pulse Secure system files using the SED command as well as attempt to install code from within an archive named new-pack.tgz expected to be currently stored on the target system. --Begin Patched In Commented Code-- $ENV{"DSINSTALL_CLEAN"} = $clean; ##start_total Analysis indicates this commented code is designed to present a web form to a remote operator, wherein the remote operator can enter commands that will be run locally on the target system. The commented code also has the capability to modify several Pulse Secure system files utilizing the SED command. e3137135f4ad5ecdc7900a619d7f1b88ba252b963b38ae9a156299cc9bce92a1Tagswebshell Details
AntivirusNo matches found. YARA RulesNo matches found. ssdeep MatchesNo matches found. DescriptionThis file is a Pulse Secure system application that has been modified to allow an operator to remotely execute commands on a compromised Pulse Secure device. Its main() function (See Figure) has been hooked with the webshell illustrated below. This webshell is similar in design and functionality to the webshell described in the file sdp_mobile_login.cgi. A primary difference in this webshell is that the static value BM6OAa1XCpH4x4ISEnJYZXmyHhJG8JxC must be passed in with the HTTP_X_KEY parameter for the webshell to process and execute a provided command. Screenshots Screen_Shot_2021-07-30_at_10.54.42.png - 4ebb25ef9621c44cdb52630e44bcd1b5a848c0c56f01fa759863d50166bb0928Details
AntivirusNo matches found. YARA RulesNo matches found. ssdeep MatchesNo matches found. DescriptionThis file is a malicious replacement for the Unix umount binary. The modified umount application contains a bash script with an appended ELF binary. When the system attempts to perform an unmount, the "main" portion of this script will perform several system modifications to the Pulse Secure device before extracting the appended ELF binary, writing it to disk, marking it executable, and using it to actually perform the umount task. This application acts as a "hook" to the compromised device's unmount task. The system modifications performed during this "hook" are ultimately designed to provide a hacker remote command and control capabilities over a compromised Pulse Secure device. The full malicious script contained within this application is illustrated below. After this full illustration is a summary explanation of the primary pieces of this full malicious script. --Begin Full Malicious Script-- ##sstart patch_manifest() sed -i '/verify 1/d' /tmp/data/root/home/bin/check_integrity.sh patch_cgi() patch_libdsp() patch_umount() waitweb() /bin/mount -o remount,rw /dev/root / >/dev/null 2>&1 ###cgistart1 ###cgistart2 ##eend --End Full Malicious Script-- The function illustrated below is designed to make a small modification to the Pulse Secure system file named libdsplibs.so. This function will change all occurrences of the string "ForceCommand" in the libdsplibs.so binary to the string "#orceCommand". The function below will also remove the string "verifyFiles" from the Pulse Secure system file named check_integrity.sh. --Begin libdsplibs.so Modification Function-- patch_libdsp() --End libdsplibs.so Modification Function-- The function illustrated below is designed to modify the Pulse Secure system files named manifest and check_integrity.sh. As illustrated, this function hashes the new version of the script named sdp_mobile_login.cgi, which now contains a patched in webshell. The function then counts the number of times the string "sdp_mobile_login.cgi" is found in the Pulse Secure manifest file. The malware then replaces this "sdp_mobile_login.cgi" string with the full path of the patched version, and its corresponding SHA256 value within the manifest file. The replacement string for the current "sdp_mobile_login.cgi" strings will appear similar to the following: "/home/webserver/htdocs/dana-na/auth/sdp_mobile_login.cgi 6092a24ca3853fb351989ee1aa2eca604fc438afc1e64df3ede10ffda577d475 b". The function then removes the strings "verify 1" and "err Signature" from the Pulse Secure system file check_integrity.sh. The purpose of these modifications are not conclusively known, however it appears the modifications may be required for the Pulse Secure system to allow the execution of the hacker modified version of sdp_mobile_login.cgi. Note: The comments in the code below were added by CISA to clarify the functionality of different parts of the malicious code. --Begin manifest and check_integrity.sh Modification Function-- patch_manifest() --End manifest and check_integrity.sh Modification Function-- The script modifies the Pulse Secure system file named sdp_mobile_login.cgi by adding data to it from a file contained on disk named tmp2. The code utilized to modify sdb_mobile_login.cgi is illustrated below. Analysis of the modified sdb_mobile_login.cgi indicates this modification adds a webshell to the Pulse Secure applications which allows an operator to remotely issue commands to a compromised device. This patched in webshell is detailed within the description of the file sdp_mobile_login.cgi, included within this document. Notably, the function below also modifies the /bin/umount application by adding data to it contained in the files tmp1 and tmp2. After the modifications of umount and sdp_mobile_login.cgi, the function deletes the files tmp1 and tmp2. The original files tmp1 and tmp2 were not available for analysis. --Begin sdb_mobile_login.cgi and umount Modification Code (Using tmp1 and tmp2)-- patch_cgi() --End sdb_mobile_login.cgi and umount Modification Code (Using tmp1 and tmp2)-- The malicious function illustrated below is designed to extract the ELF binary from the current (hacker modified) umount application, and run it as a standalone application to actually perform the umount function for the operating system. The function extracts the embedded ELF, writes it out to disk as /bin/umount_re, and sets it to executable via the system command /bin/chmod u+x /bin/umount_re. The function then executes the umount_re application and deletes it from disk. The final command in the function mounts /dev/root as read only. The remounting of /dev/root with read only permissions is likely a method to hide this activity from a system administrator, as it may draw the attention of system analysts that /dev/root is mounted with read and write permissions. --Begin normal_um() Function-- normal_um() --End normal_um() Function-- The function below modifies the system application /bin/umount using the data contained in a file named /tmp/data/root/bin/xx. The function then deletes the file named /tmp/data/root/bin/xx. --Begin patch_umount Function-- patch_umount() --End patch_umount Function-- Illustrated below, is the "main" portion of this malicious application with comments added by our team to illustrate the purpose of this file. Note: The comments in the code below were added by CISA to clarify the functionality of different parts of the malicious code. --Begin Main Script-- /bin/mount -o remount,rw /dev/root / >/dev/null 2>&1 //*CISA: Mount the /dev/root partition with read and write permissions. --End Main Script-- ea1574595f87171c26f483df77dec52b0c5c73dd37f4dd554944cd6a8b484d17Details
AntivirusNo matches found. YARA RulesNo matches found. ssdeep MatchesNo matches found. DescriptionUpon execution, this Perl script creates a table with two columns (msg_body, msg_length) and the first record for this table. The first record's msg_body is the standard input streams and msn_length is the standard input streams' length. RecommendationsCISA 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.
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 FAQWhat 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 Central. 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.