Malware Analysis Report (AR22-270C)

MAR-10401765-1.v1 – Zimbra 3

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.

Download the STIX version of this report: MAR-10401765-1.v1 284KB

Summary

Description

CISA received 1 Java Server Pages (JSP) webshell for analysis. The file is the server side code, which allows for remote command execution and file upload to target.

Submitted Files (1)

bc5b1f588cd506a69c03a7980a363846fa474b78e6946fa90e58d735c65f2bb6 (cmd.jsp)

Findings

bc5b1f588cd506a69c03a7980a363846fa474b78e6946fa90e58d735c65f2bb6

Tags

backdoorwebshell

Details
Name cmd.jsp
Size 976 bytes
Type HTML document, ASCII text, with very long lines, with no line terminators
MD5 91de296c801db00a24a2832b5e12d345
SHA1 010aee65009b9faeb3a4e24ca777d3aaa51b0bd3
SHA256 bc5b1f588cd506a69c03a7980a363846fa474b78e6946fa90e58d735c65f2bb6
SHA512 673a100072df4be4bb73828dde5b04d68b3aa59a78f1af42594e5771620ad4205389ff4d83456faa5262cd780e69deef7f34fe03757531cabb7faac093ad2546
ssdeep 24:gzYIRLk+nn9IH/v+xVnVjQ4vajJHG3c3FvcVsUveakUSg:gh9cgVGo3c9cuakvg
Entropy 5.251748
Antivirus
Trend Micro Backdoo.E99CED14
Trend Micro HouseCall Backdoo.E99CED14
YARA Rules
  • rule CISA_10401765_01 : webshell backdoor
    {
       meta:
           Author = "CISA Code & Media Analysis"
           Incident = "10401765"
           Date = "2022-09-02"
           Last_Modified = "20220916_2100"
           Actor = "n/a"
           Category = "Webshell Backdoor"
           Family = "n/a"
           Description = "Detects JSP webshell samples"
           MD5_1 = "91de296c801db00a24a2832b5e12d345"
           SHA256_1 = "bc5b1f588cd506a69c03a7980a363846fa474b78e6946fa90e58d735c65f2bb6"
       strings:
           $s1 = { 70 61 67 65 20 69 6d 70 6f 72 74 3d 22 6a 61 76 61 2e 69 6f 2e 2a 2c 20 6a 61 76 61 2e 75 74 69 6c 2e 2a 2c 20 6a 61 76 61 78 2e 78 6d 6c 2e 62 69 6e 64 2e 2a 2c 20 6a 61 76 61 2e 6e 65 74 2e 2a }
           $s2 = { 65 76 61 6c 28 77 69 6e 64 6f 77 2e 6c 6f 63 61 6c 53 74 6f 72 61 67 65 2e 65 6d 62 65 64 29 }
           $s3 = { 70 3d 52 75 6e 74 69 6d 65 2e 67 65 74 52 75 6e 74 69 6d 65 28 29 2e 65 78 65 63 28 67 29 }
           $s4 = { 69 3d 6e 65 77 20 44 61 74 61 49 6e 70 75 74 53 74 72 65 61 6d 28 70 2e 67 65 74 49 6e 70 75 74 53 74 72 65 61 6d 28 29 29 }
           $s5 = { 72 3d 6e 65 77 20 44 61 74 61 49 6e 70 75 74 53 74 72 65 61 6d 28 72 65 71 75 65 73 74 2e 67 65 74 49 6e 70 75 74 53 74 72 65 61 6d 28 29 29 }
           $s6 = { 6c 3d 72 2e 72 65 61 64 4c 69 6e 65 28 29 29 21 3d 6e 75 6c 6c 29 }
           $s7 = { 62 3d 64 2e 69 6e 64 65 78 4f 66 28 22 62 3d 22 29 }
           $s8 = { 6e 3d 64 2e 69 6e 64 65 78 4f 66 28 22 6e 3d 22 29 }
           $s9 = { 6d 3d 44 61 74 61 74 79 70 65 43 6f 6e 76 65 72 74 65 72 2e 70 61 72 73 65 42 61 73 65 36 34 42 69 6e 61 72 79 }
           $s10 = { 6f 75 74 2e 70 72 69 6e 74 28 22 3c 70 72 65 3e 22 29 }
           $s11 = { 73 3d 69 2e 72 65 61 64 4c 69 6e 65 28 29 29 21 3d 6e 75 6c 6c 29 }
           $s12 = { 66 3d 76 28 64 2e 73 75 62 73 74 72 69 6e 67 28 32 2c 6e 2d 31 29 29 2b 46 69 6c 65 2e 73 65 70 61 72 61 74 6f 72 2b 76 28 64 2e 73 75 62 73 74 72 69 6e 67 28 6e 2b 32 2c 62 2d 31 29 29 }
           $s13 = { 73 74 72 65 61 6d 3d 6e 65 77 20 46 69 6c 65 4f 75 74 70 75 74 53 74 72 65 61 6d 28 }
           $s14 = { 78 3d 55 52 4c 44 65 63 6f 64 65 72 2e 64 65 63 6f 64 65 28 77 2c 22 55 54 46 2d 38 22 29 }
           $s15 = { 6f 3d 22 55 70 6c 6f 61 64 65 64 3a 20 22 2b 66 }
       condition:
           filesize < 5KB and all of them
    }
ssdeep Matches

No matches found.

Description

This file is a JSP webshell. The file contains the code "eval(window.localStorage.embed)", "DataInputStream(request.getInputStream())", and "DatatypeConverter.parseBase64Binary(v(d.substring(b+2)))" which indicate the JSP file's input is form-data, written in Javascript. Also, that a portion of the Javascript will be encoded in Base64. The client side of this webshell was not available for analysis.

The code "Runtime.getRuntime().exec(g)" and "DataInputStream(p.getInputStream())" demonstrate the JSP file's ability to execute commands and upload files, as a byte stream.

The code "FileOutputStream(f)", "stream.write(m)", and o="Uploaded: "+f;" shows the ability to send outputs to the client code.

Screenshots
Figure 1 - This excerpt of code shows the webshell's ability to receive inputs and execute commands.

Figure 1 - This excerpt of code shows the webshell's ability to receive inputs and execute commands.

Figure 2 - This excerpt of code shows the webshell's output functionality and Base64 decoding.

Figure 2 - This excerpt of code shows the webshell's output functionality and Base64 decoding.

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: September 27, 2022

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.