Log in
E-mail
Password
Show password
Remember
Forgot password ?
Become a member for free
Sign up
Sign up
New member
Sign up for FREE
New customer
Discover our services
Settings
Settings
Dynamic quotes 
OFFON
  1. Homepage
  2. Equities
  3. Canada
  4. Toronto Stock Exchange
  5. BlackBerry Limited
  6. News
  7. Summary
    BB   CA09228F1036

BLACKBERRY LIMITED

(BB)
  Report
SummaryQuotesChartsNewsRatingsCalendarCompanyFinancialsConsensusRevisions 
SummaryMost relevantAll NewsAnalyst Reco.Other languagesPress ReleasesOfficial PublicationsSector newsMarketScreener Strategies

Threat Thursday: STRRat Malware

10/14/2021 | 08:32am EST
Threat Thursday: STRRat Malware

STRRat is a Java-based Remote-Access Trojan (RAT) that has a plethora of malicious functionality, focused primarily on information stealing and backdoor capabilities. It gathers credentials from browsers and email clients, and has online and offline keystroke logging abilities.

STRRat also has the capability of mimicking a ransomware attack. No files are encrypted; the malware just appends the file-extension ".crimson" while opening Notepad to display a false ransom note.

In-the-wild since mid-2020, the initial infection vector for STRRat is typically a malicious attachment masquerading as a business document, or a receipt/purchase order via email. This threat previously relied on a victim having a Java Runtime Environment (JRE) already present on their device. The malware now either deploys its own JRE instance or contains initial stage checks for the presence of a valid Java version.

Operating System
Risk & Impact
Infection Vectors

STRRat has multiple ways to infect a victim's device. Typically, the malware relies on mass malspamming or taking part in phishing campaigns to lure victims into opening trojanized email attachments.

The initial droppers related to STRRat vary. Some are malicious obfuscated JavaScript attachments meant to download the malware to the victim's device. Others hide their code within Microsoft® Excel® and Word document macros. Once enabled, the malicious macros drop a further stage PowerShell script.

Figure 1: Example of STRRat Microsoft Excel initial stage downloader

Some variants of STRRat have added a secondary downloader stage of the malware.

Instead of relying on the victim to execute a JavaScript directly from a malicious email, STRRat relies on the victim enabling the embedded macros within Microsoft Excel or Word. Doing so will allow this initial stage to retrieve and execute a string hosted at hxxp://35[.]163[.]204[.]167/oo.

Figure 2: Downloaded PowerShell file: oo.ps1

Once the string "oo" is downloaded, the Microsoft Excel macro attempts to open cmd.exe and uses the PowerShell's Invoke-Expression (IEX) cmdlet. The contents of the string oo are then executed to further STRRat's chain of execution.

Inspecting the contents of oo, we can see that its code is heavily obfuscated PowerShell script. Though the code might not resemble anything human-readable or identifiable at this point, different variables within the code of oo are related to differences in length of the whitespace between curly braces, as seen in Figure 2. These can then be interpreted by their uniqueness in length. For example, in the case of "${ }" where there are three white spaces between the brackets, this would be deobfuscated as "Char[3]."

Instead of allowing oo to execute within the Microsoft® Office documents macro, it can be isolated and analyzed separately. Renaming the string oo to "oo.ps1," we can inspect its contents without accidentally running the code. Running the PowerShell code separately and printing its output will rebuild these variables, removing this initial layer of obfuscation.

Figure 3: First layer of obfuscation

Once the initial stage of deobfuscation is complete, we get a clearer view of what's going on. However, this result is still not easily human-readable. After the white-spacing between each variable is calculated, it now displays [Char] integers instead.

This first layer also contains another IEX PowerShell cmdlet to run the obfuscated code once more, which produces its final deobfuscated code.

Figure 4: True output of oo.ps1

Once this second layer of obfuscation is removed, we can get a much clearer picture of the true and malicious intent of the PowerShell code contained within oo. This code reaches out to download a ZIP file and unzips its content before attempting to run the file "Sys.cmd."

To achieve persistence, the file also adds itself to the device's Startup folder so that it will re-execute when a device reboots.

Technical Analysis

If the oo script is successful, the malicious PowerShell code drops the contents of its ZIP. Most of its contents are benign, and they are what a user would expect from downloading an instance of Java Runtime Environment (JRE).

Early versions of STRRat relied on an instance of JRE on the victim's device to execute. This would keep the download of STRRat extremely small. However, recently STRRat has shifted away from relying on its victim already having JRE.

Recent samples of STRRat will either attempt to detect the presence of a compatible version of Java prior to being deployed via a further malicious JavaScript file, or it will drop with a compatible instance of Java regardless. The contents of the downloaded ZIP file "esfsdghfrzeqsdffgfrtsfd.zip" shown below includes the contents of Java version 1.8.0_261.

Excluding the two files "Sys.cmd" and "x.jar," the contents of esfsdghfrzeqsdffgfrtsfd.zip are legitimate files related to this version of Java.

Figure 5: Contents of .ZIP file oo.ps1 downloaded

This tactic of dropping a compatible Java version does increase the size of downloaded data STRRat needs to deploy on a victim's device. But given that the files it is downloading are benign, the malware wagers on the benefit of a larger download for the possibility of more successful coverage of victim devices.

The first illegitimate file found within the downloaded ZIP is the script "Sys.cmd." This is a tiny script that is designed to run cmd.exe while minimized and execute the version of Java it has just deployed to execute the core malware file, "x.jar."

Figure 6: Contents of Sys.cmd

X.jar contains the core STRRat malware and its components. This file works together with its 63 different ".class" files, aided by its resource file "config.txt." Config.txt contains encrypted information that it uses to call home, which the malware will use once it is successfully running on an infected victim device.

Opening x.jar in a Java-decompiler, we can see that it is heavily obfuscated to prevent initial analysis, discovery, and reporting. This file also has many references related to "StringBuilder" which is a likely indication that obfuscation has taken place. Instead of displaying its true code in a Java decompiler, this threat will "build" these strings during execution. This prevents static analysis of the file unless it's deobfuscated. Its class names also appear randomized and illogical, preventing easy understanding of its underlying malicious capabilities.

Different variants of STRRat contain unique naming formats for its ".class" files, but its core content remains identical.

Figure 7: Obfuscated x.jar, Main.class

On initial execution, STRRat will attempt to reach out to multiple links related to Java components, to further aid in its malicious capabilities. Most notable among these is an open-source tool called System-Hook. SYS hook is a low-level system hooker that can be used to spy on keyboard and mouse activity. This is abused by STRRat as part of its keylogging capabilities.

We get further information about the obfuscation used when the sample is executed via the command line. The malware displays a banner related to Allatori Obfuscator as shown below. Allatori is a commercial, for-pay Java obfuscator product. The malware authors of STRRat abuse the organization's demo license to aid in their obfuscation of the malware.

Figure 8: Allatori Obfuscator banner on execution of x.jar

We then used a Java deobfuscator on x.jar to detect what further underlying obfuscation was present within this variant of STRRat.

Figure 9: Detection of both Superblaubeere and Allatori

As seen in Figure 9, the malware was further obfuscated with open-source Superblauebeere27 Java Obfuscator. This is on top of the previously mentioned Allatori Obfuscator v7.3.

Once the different obfuscation methods are detected and removed, we can see the true nature of STRRat and its malicious capabilities.

Figure 10: Differences between obfuscated (top) and deobfuscated (bottom)

As Figure 10 shows, the differences between the obfuscated and deobfuscated code of STRRat paint a much clearer picture. This comparison is pulled from the Main.class, and it shows the malware downloading additional dependencies that were previously obfuscated, as well as an additional URL used to call home.

During analysis we found that the site str-master[.]pw referenced in this code has since been sink-holed to prevent further instances of the malware using this URL to call home.

Post-Infection Traffic

After infection, the malware will reach out to obtain further Java-related components to add to its capabilities.

Once the malware has downloaded these dependencies, STRRat will attempt to contact its command-and-control (C2) server with a notification of post-infection success.

The malware will then gather the following information:

  • Username
  • System OS
  • System Architecture
  • Presence of antivirus software
  • Version of STRRat
  • Location of the victim
  • Whether STRRat is already installed
  • Device idle time

Figure 11: TCP Steam example of STRRat post-infection

Config Decryption

Along with its ".class" files, STRRat contains a single text file contained within its resources named config.txt. The text file contains an encrypted string relating to the command-and-control (C2) infrastructure of the malware.

Once x.jar was deobfuscated, config.txt is referenced across multiple ".class" files within STRRat relating to both its content and decryption by STRRat.

The malware uses an initial PBKDF2 Key (Password-Based Key Derivation Function 2) that needs to first be derived before using Advanced Encryption Standard (AES) decryption, with the resulting key being output in Cipher-Block Chaining (CBC) mode to produce the fully decrypted config.txt.

During analysis of the deobfuscated code of x.jar, we can see that multiple ".class" files reference PBKDF2. In cryptography, these functions are used as key derivation.

Further analysis of x.jar code found various references to PBKDF2 input information. PBKDF2 needs a passphase, a number of iterations, and key-size. The passphrase used was "strigoi," the number of iterations used was 65536, and the key size was 128-bits. This information can be seen referenced throughout the code, once x.jar is deobfuscated.

After analyzing multiple samples of STRRat, all samples we found followed this pattern.

Name:

Data:

Passphrase:

strigoi

Iterations (int):

65536

Key-size (int):

128

This use of consistent PBKDF2 input information has led to the development of STRRAT Malware (v1.4) Decrypter by CyberRaiju. This open-source tool is based on decoding STRRat's config.txt file.

This simple command-line tool takes the config.txt of an STRRat sample and decrypts it, revealing each sample's malicious nature, C2 information, and other potential deviations between samples of the malware.

Figure 12: Output of STRRAT Malware Decryptor

Output derived from deobfuscated x.jar: (SHA256: adc7acc8332cd240cc8375f841a023ecbdb7c19ec5bb1d7c0d2a029106c9bc31)

C2:

idgerowner[.]duckdns[.]org

Mutex/File Lock:

1990lock.file

Plugins Download URL:

Jbfrost[.]live[/]strigoi[/]server[/]hwid=1&lid=m&ht=5

Secondary C2:

Hostmicrosoft[.]duckdns[.]org

Secondary Mutex/File Lock:

3636

Setup Startup Folder Persistence:

True

Secondary Startup Folder Persistence:

False

Setup Skype Scheduled Task Persistence:

True

License:

T1PS-MJKQ-YUIX-ZBMX-CDGU

Fake Crimson Ransomware

One of the notable capabilities of STRRat is its ability to pose as ransomware. The malware can receive commands to both "encrypt" and "decrypt" files, however the functionality of these modules is limited to just renaming the extensions of files to ".crimson" rather than initiating a file encryption function.

STRRat then attempts to play on the fear of a legitimate ransom infection, by displaying the file "crimson_info.txt" on the user's desktop.

Given the grasp of the malware on an affected system, a threat actor could likely deploy further malware, including ransomware.

Figure 13: Fake ransomware commands

Capabilities and Functionality

Once deobfuscated, STRRat can truly be dissected and analyzed. As STRRat is a Java Archive (JAR), it has a wide range of ".class" files working together to perform its malicious capabilities.

STRRat samples typically have a core command ".class" file, which is notable for being larger than its other components. This file serves as the base of all commands the malware is given by a threat actor. The malware interprets these commands to carry out its malicious functionality.

Figure 14: Examples of STRRat's core functions

Remote Functionality

Name

Description

reboot

Reboot the device

shutdown

Shutdown the device

uninstall

Remove the malware from the device

disconnect

Disconnect the device from the C2 server

down-n-exec

Download a file from a URL and execute it

update

Update the malware

up-n-exec

Upload a file directly to the device from the C2 server and then execute it

remote-cmd

Remote command prompt

power-shell

Remote PowerShell prompt

file-manager

View files on the device

processes

Lists running processes on the device

startup-list

Lists startup items enabled on the device

remote-screen

Remotely view the device screen

rev-proxy

Use the device as a reverse proxy server

hrdp-new

Utilize a Hidden RDP, enable a Remote Desktop client

hrdp-res

Utilize a Hidden RDP while taking argument

Keylogger Functionality

Name

Description

keylogger

Start keylogging on the device, send logs to the C2 server

o-keylogger

Start offline keylogging on the device, save the logs to the disk

Privilege Escalation

Name

Description

chk-priv

Check the privilege level of the user the malware is running at

req-priv

Request a higher privilege level, attempt to gain administrator level of access

Password Stealing

Name

Description

chrome-pass

Extract Chrome passwords from device and send to C2

foxmail-pass

Extract Fox mail passwords from device and send to C2

outlook-pass

Extract Outlook passwords from device and send to C2

fox-pass

Extract Firefox passwords from device and send to C2

tb-pass

Extract Thunderbird passwords from device and send to C2

ie-pass

Extract Internet Explorer passwords from device and send to C2

all-pass

Extract all passwords from device and send to command and C2

Fake Ransomware Commands

Name

Description

rw-encrypt

Rename files on device by adding a "crimson" file extension to them, does not modify any file contents

rw-decrypt

Rename files on device by removing the "crimson" file extension added by the rw-encrypt command, does not modify and file contents

show-msg

Open notepad with a specified message sent from the C2 server


Conclusion

Although not as prevalent as other malware, backdoors, and information-stealers, STRRat remains a serious threat to both home users and organizations alike. Being written in Java, the malware does not rely on a single executable, but relies on varying Java ".class" files that work together. Each file has a unique function or role.

The initial stages of the malware can be deployed either via Microsoft Office macros or via JAR files. Both methods provide the ability to drop heavily obfuscated secondary loaders that are written in either PowerShell or JavaScript. The multiple stages of obfuscation employed by both its initial stage downloader scripts and the malware itself makes the threat initially difficult to both understand and analyze.

Once deployed on a victim's device, the malware itself has a wide range of malicious functions. STRRat predominantly focuses on information-stealing and backdoor functionality.

Indicators of Compromise (IoCs)

Networking:
Ip-api.com
hxxp://wshsoft[.]company[/]multrdp[.]jpg
hxxps://pastebin[.]com[/]raw[/]Jdnx8jdg
hxxps://pastebin[.]com[/]raw[/]NAEwG3TH
www[.]pluginserver[.]duckdns[.]org
hxxp://35[.]163[.]204[.]167[/]esfsdghfrzeqsdffgfrtsfd[.]zip
hxxp://str-master[.]pw
hxxp://35[.]163[.]204[.]167/oo
Jbfrost[.]live[/]strigoi[/]server[/]hwid=1&lid=m&ht=5
hxxps://github[.]com/kristian/system-hook/releases/download/3[.]5/system-hook-3[.]5[.]jar
hxxps://repo1[.]maven[.]org/maven2/net/java/dev/jna/jna-platform/5[.]5[.]0/jna-platform-5[.]5[.]0[.]jar
hxxps://repo1[.]maven[.]org/maven2/org/xerial/sqlite-jdbc/3[.]14[.]2[.]1/sqlite-jdbc-3[.]14[.]2[.]1[.]jar
hxxps://repo1[.]maven[.]org/maven2/net/java/dev/jna/jna/5[.]5[.]0/jna-5[.]5[.]0[.]jar

C2:
dgerowner[.]duckdns[.]org
hostmicrosoft[.]duckdns[.]org

License ID:
T1PS-MJKQ-YUIX-ZBMX-CDGU

Mutex:
C:User%User%1990lock.file

Scheduled Task:
cmd /c schtasks /create /sc minute /mo 30 /tn Skype /tr "C:Users%User%AppDataRoaming%dzgdobwqa.txt%"

Files:
x.jar
%/StartUp/%Sys.cmd

SHA256:
x.jar (STRRat): adc7acc8332cd240cc8375f841a023ecbdb7c19ec5bb1d7c0d2a029106c9bc31
oo (PowerShell): 261ee2ff1e9188342b6de16f1d8621e3baef4e76dbf09e9e760a5c448c0f35e6
MalDoc (XLSM): 0aa9dce11120e9f924b01770bb8dd64120ba01cfc530ab03ba1715898ea9f96f

BlackBerry Assistance

If you're battling this malware or a similar threat, you've come to the right place, regardless of your existing BlackBerry relationship.

The BlackBerry Incident Response team is made up of world-class consultants dedicated to handling response and containment services for a wide range of incidents, including ransomware and Advanced Persistent Threat (APT) cases.

We have a global consulting team standing by to assist you providing around-the-clock support, where required, as well as local assistance. Please contact us here: https://www.blackberry.com/us/en/forms/cylance/handraiser/emergency-incident-response-containment


Want to learn more about cyber threat hunting? Check out the BlackBerry Research & Intelligence Team's new book, Finding Beacons in the Dark: A Guide to Cyber Threat Intelligence - now available for pre-order here.

About The BlackBerry Research & Intelligence Team

The BlackBerry Research & Intelligence team examines emerging and persistent threats, providing intelligence analysis for the benefit of defenders and the organizations they serve.

Back

Disclaimer

BlackBerry Ltd. published this content on 14 October 2021 and is solely responsible for the information contained therein. Distributed by Public, unedited and unaltered, on 14 October 2021 12:31:03 UTC.


ę Publicnow 2021
All news about BLACKBERRY LIMITED
12/03BLACKBERRY : As BlackBerry IVY Revolutionizes the Transportation Market, What's in It for ..
PU
12/02BLACKBERRY : Reverse Engineering Ebpfkit Rootkit With BlackBerry's Free IDA Processor Tool
PU
11/30BLACKBERRY : Wins CybersecAsia Readers' Choice Award for Best AI-Based Cybersecurity
PU
11/26SOCIAL BUZZ : Wallstreetbets Stocks Trend Lower Premarket Friday
MT
11/24BLACKBERRY : The Great Resignation (in Cybersecurity)
PU
11/24BlackBerry Ranked Best New Endpoint Protection Solution By SE Labs
AQ
11/23Tech Stocks Finishing Well Above Intra-Day Lows
MT
11/23BLACKBERRY : SE Labs Ranks BlackBerry as Best New Endpoint Protection Solution
PU
11/23BlackBerry, L-SPARK Report Third Phase of Accelerator Program to Advance Canadian Conne..
MT
11/23BLACKBERRY BRIEF : BlackBerry, L-SPARK Launch Third Cohort of Accelerator Program to Advan..
MT
More news
Analyst Recommendations on BLACKBERRY LIMITED
More recommendations
Financials (USD)
Sales 2022 726 M - -
Net income 2022 -371 M - -
Net Debt 2022 408 M - -
P/E ratio 2022 -13,6x
Yield 2022 -
Capitalization 5 071 M 5 091 M -
EV / Sales 2022 7,55x
EV / Sales 2023 6,13x
Nbr of Employees 3 497
Free-Float 98,9%
Chart BLACKBERRY LIMITED
Duration : Period :
BlackBerry Limited Technical Analysis Chart | MarketScreener
Full-screen chart
Technical analysis trends BLACKBERRY LIMITED
Short TermMid-TermLong Term
TrendsBearishBearishNeutral
Income Statement Evolution
Consensus
Sell
Buy
Mean consensus SELL
Number of Analysts 9
Last Close Price 8,92 $
Average target price 6,10 $
Spread / Average Target -31,5%
EPS Revisions
Managers and Directors
John S. Chen Executive Chairman & Chief Executive Officer
Steve Rai Chief Financial Officer
Charles Eagan Chief Technology Officer
Christopher Hummel Chief Information Officer
Randall Cook Secretary, Chief Legal, Compliance & Risk Officer
Sector and Competitors
1st jan.Capi. (M$)
BLACKBERRY LIMITED35.78%5 091
MICROSOFT CORPORATION45.23%2 425 153
SEA LIMITED27.32%140 564
ATLASSIAN CORPORATION PLC52.74%88 337
DASSAULT SYSTÈMES SE55.37%76 630
ROBLOX CORPORATION0.00%65 866