What We Do
How we do it
Resources
SECURITY ADVISORIES
Jul 29, 2021
UPDATE: PetitPotam NTLM Relay Attack
THE THREAT PetitPotam is a variant of the NTLM Relay attack discovered by security researcher Gilles Lionel. It is tracked as an authentication bypass vulnerability in Active Directory (Certificate Services); currently no CVE identifier has been assigned to this vulnerability. Proof of Concept (PoC) code released last week [1] relies on the Encrypting File System Remote (EFSRPC) protocol to…
Read More
View all Advisories →
Company
ABOUT eSENTIRE
About Us
eSentire is The Authority in Managed Detection and Response Services, protecting the critical data and applications of 1000+ organizations in 70+ countries from known and unknown cyber threats. Founded in 2001, the company’s mission is to hunt, investigate and stop cyber threats before they become business disrupting events.
Read about how we got here
Leadership Work at eSentire
LATEST PRESS RELEASE
Jul 12, 2021
Tecala and eSentire Partner to Protect Enterprises across APAC from Business-Disrupting Cyber Attacks
Sydney, 12 July, 2021 - Tecala, Australia’s award-winning technology services and IT consulting provider, today announced it has chosen eSentire, the global Authority in Managed Detection and Response (MDR) cybersecurity services, as their exclusive MDR solution provider in Australia and New Zealand. This partnership will enable Tecala to augment its cybersecurity practice and offer enterprises…
Read More
Partners
PARTNER PROGRAM
Partners
Our award-winning partner program offers financial rewards, sales and marketing tools and personalized training. Accelerate your business and grow your revenue by offering our world-class Managed Detection and Response (MDR) services.
Learn about our Partner Program
Resources
Blog — Aug 08, 2019

Oh Snap!: New Ostap Variant Observed in the Wild

4 min read

As Emotet’s apparent hiatus continues, new malspam campaigns have risen to take its place (including a strange Emotet-Dridex hybrid eSentire reported in June [1]). Ostap has generally stayed out of the mainstream spotlight in the three years since its introduction [2] but appears each year with new modifications. Ostap’s most recent variant adds to its 2018 blacklist of processes the malware can detect and react to including VirtualBox and Hybrid Analysis. Interestingly, the authors also included the names of two security researchers in their blacklist: Hong Lee and Peter Wilson. The authors also removed Windows XP from the list, indicating they may no longer expect sandboxes to be running an XP environment.

A critical difference from Emotet is Ostap’s destructive propagation feature. Upon failure to download the payload, Ostap will search out documents (such as *.xls, *.doc, *.pdf, *.txt, *.rtf, and *.odt) on all attached drives (including mapped network drives) and replace them with copies of itself. The functionality was first observed in 2017, as well as in current samples examined by eSentire’s Advanced Threat Analytics team. In this way, Ostap is able to propagate across network shares and removable media.

Like Emotet, Ostap is delivered through email as an attached malicious document (MalDoc). The MalDocs are typically disguised as Invoices, prompting a fraction of employees in financial roles to open them and activate the malware. At that point, internal security protocols become important. Emotet and Ostap both abuse macro functionality in Microsoft documents. However, Ostap utilizes JavaScript (rather than PowerShell) to download the chosen payload.

The Payload: Trickbot

The Trickbot payload delivered by Ostap has been observed harvesting credentials from common applications such as Chrome, Firefox, Internet Explorer, Filezilla, Windows Remote Desktop Protocol, and VNC. The malware can also infect PoS devices with a separate module [3].

Another Evolving Threat

Ostap first arrived in 2016, a JavaScript loader delivering banking trojans and Point-of-Sale (PoS) malware. It was observed delivering Dridex, Tinba, and Ursnif [2]. In 2017, the authors added environment detection capabilities. If the malware detected any filepaths associated with anti-virus or monitoring applications like WireShark, it would not detonate. The authors also made minor adjustments to the malware’s C2 communication conventions to better evade network detection and included a feature that replaced all user documents with the Ostap MalDoc upon failure to download the payload [4]. In 2018, the blacklist was expanded and the script was heavily obfuscated.

Recent Campaign Traces

Jul 3 – Ostap source code is pasted on pastebin [5]

July 22 – A public hybrid analysis sample points to Trickbot at 185.159.82[.]15 but fails to run, invoking a manufactured “document error”. [6]

July 26 – Twitter User Jammy (@jcandt) on twitter observed Ostap serving Trickbot via 185.159.82[.]15/hollyhole951/c644.php

July 30 – Twitter User Kirk Sayre (@bigmacjpg) observed trickbot being served from 185.130.104[.]236/deerhunter/inputok.php

July 31 – eSentire observes Ostap delivering trickbot and begins deobfuscating the malware. Last public deobfuscation was 2018 [4]. C2 source was the same reported by Kirk Sayre (July 30).

Aug 5 - During the writing of this article, TrendMicro published their own analysis on the malware delivered by the C2 reported by Jammy (July 26), but did not identify the JS dropper as Ostap [3].

Indicators

Most static indicators are outlined well by TrendMicro [3]. However, we include one that could be useful for network monitoring as well as propose a behavioral detection.

C2: 185.159.82[.]15

C2: 185.130.104[.]236

HTTP header response: RedSparrow

Machine detection of malicious documents: In general, Word macros spawning command interpreters (cmd.exe, powershell.exe, wscript.exe, cscript.exe, mshta.exe) is an indicator of malicious behavior and a popular vector for social engineering-based email spam. In the case of Ostap, wscript.exe is observed executing malicious JavaScript.

Human detection of malicious documents: Malicious spam often arrives disguised as invoices, tax documents, and shipping orders. Financial departments tend to be highly targeted. Consider implementing protocols around email handling for the financial department that includes phishing awareness training and safe scrutiny of attached documents.

References

[1] https://www.esentire.com/blog/new-dridex-variant-evading-traditional-antivirus/

[2] https://www.securityweek.com/ostap-backdoor-installs-banking-trojans-pos-malware

[3] https://blog.trendmicro.com/trendlabs-security-intelligence/latest-trickbot-campaign-delivered-via-highly-obfuscated-js-file/

[4] https://www.cert.pl/en/news/single/ostap-malware-analysis-backswap-dropper/

[5] https://pastebin.com/svT5pQup

[6] https://www.hybrid-analysis.com/sample/f9c0dadd5184966384eecca53c3bb781d164ceab26777c2b611cb6bb592fea9d?environmentId=100

eSentire Threat Intel
eSentire Threat Intel Threat Intelligence Research Group