TellYouThePass Ransomware Analysis Reveals a Modern Reinterpretation Using Golang

Analysts, first, focused on the binary for the “Go build id” string to identify the Golang build used for compiling it.
In recent campaigns of Go-written malware, especially in ransomware cases, attackers patch the binary to remove this string, making it difficult for researchers to use string-based signatures to detect the binary as Go.

Going through the two samples –

460b096aaf535b0b8f0224da0f04c7f7997c62bf715839a8012c1e1154a38984 (Windows)

5c8710638fad8eeac382b0323461892a3e1a8865da3625403769a4378622077e (Linux)

– analysts noticed that more than 85% of code in the Windows and Linux versions are almost the same
Analysts notice in this case that the malware authors have left only one main function and changed the other functions to random names.
The sample checks the existence of the files “showkey.txt” and “public.txt” with the help of OS.Getenv, using “ALLUSERSPROFILE” and “HOMEDRIVE” as keys in Windows and Home and /tmp/ in Linux. If it is present, it means encryption occurred, and it exists using runtime_gopanic; otherwise, it creates them.

For Windows, the return is “C:\ProgramData” and /root/ directory in Linux. Using path.join to join “showkey.txt” and “public.txt” with the directories results in:
Windows:
“C:\ProgramData/showkey.txt”

“C:\ProgramData/public.txt”

Linux:
“/root/showkey.txt”

“/root/public.txt”

The sample uses the Golang Crypto Packages for RSA key – some of them are crypto_x509_MarshalPKCS1PublicKey, crypto_x509_MarshalPKCS1PrivateKey, encoding_pem_EncodeToMemory and crypto_rsa_GenerateMultiPrimeKey.
crypto_x509_ MarshalPKCS1PrivateKey converts the RSA private key to PKCS #1, ASN.1 DER form.
Then, the encoding_pem_EncodeToMemory returns the PEM (Privacy Enhanced Mail) encoding, and after that, runtime_slicebytetostring converts bytes to string, resulting in the conversion of bytes to string.txt”

TellYouThePass ransomware tries to kill some tasks and services before initiating the encryption routine, as shown in Table 2 below. However, in Linux, it requires root privilege to do that. Targeted applications include various email clients, database applications, web servers and document editors.

It runs various commands using cmd.exe to kill tasks in Windows, and in Linux, it takes the os_exec_command Go package to execute different commands using /bin/bash/:

Windows:

“taskkill /f /im msftesql.exe ”

“schtasks /delete /tn WM /F ”

“taskkill /f /im sqlagent.exe ”

“taskkill /f /im sqlbrowser.exe ”

“taskkill /f /im sqlservr.exe ”

“taskkill /f /im sqlwriter.exe ”

“taskkill /f /im oracle.exe ”

“taskkill /f /im ocssd.exe ”

“taskkill /f /im dbsnmp.exe ”

“taskkill /f /im synctime.exe ”

“taskkill /f /im mydesktopqos.exe ”

“taskkill /f /im agntsvc.exeisqlplussvc.”

“taskkill /f /im xfssvccon.exe ”

“taskkill /f /im mydesktopservice.exe ”

“taskkill /f /im ocautoupds.exe ”

“taskkill /f /im agntsvc.exeagntsvc.exe ”

“taskkill /f /im agntsvc.exeencsvc.exe ”

“taskkill /f /im firefoxconfig.exe ”

“taskkill /f /im tbirdconfig.exe ”

“taskkill /f /im ocomm.exe ”

“taskkill /f /im mysqld.exe ”

“taskkill /f /im mysqld-nt.exe ”

“taskkill /f /im mysqld-opt.exe ”

“taskkill /f /im dbeng50.exe ”

“taskkill /f /im sqbcoreservice.exe ”

“taskkill /f /im excel.exe ”

“taskkill /f /im infopath.exe ”

“taskkill /f /im msaccess.exe ”

“taskkill /f /im mspub.exe ”

“taskkill /f /im onenote.exe ”

“taskkill /f /im outlook.exe ”

“taskkill /f /im powerpnt.exe ”

“taskkill /f /im steam.exe ”

“taskkill /f /im sqlservr.exe ”

“taskkill /f /im thebat.exe ”

“taskkill /f /im thebat64.exe ”

“taskkill /f /im thunderbird.exe ”

“taskkill /f /im visio.exe ”

“taskkill /f /im winword.exe ”

“taskkill /f /im wordpad.exe”

“taskkill /f /im tnslsnr.exe”

Linux:

“service mysql stop”

“/etc/init.d/mysqld stop”

“service oracle stop”

“systemctl disable “postgresql*””

“systemctl disable “mysql*””

“systemctl disable “oracle*””

Both the Windows and the Linux versions have a list of directory exclusions for encryption

Windows:

EFI.Boot

EFI.Microsoft

Windows

Program Files

All Users

Boot

IEidcache

ProgramData

desktop.ini

autorun.inf

netuser.dat

iconcache.db

thumbs.db

Local Settings

bootfont.bin

System Volume Information

AppData

Recycle.Bin

Recovery

Linux:

/bin

/boot

/sbin

/tmp

/etc

/lib

/proc

/dev

/sys

/usr/include

/usr/java

The TellYouThePass ransomware focuses on encrypting popular media and file extensions, saving their paths in the “encfile.txt” text file, located in the same folder as “public.txt” and “showkey.txt”.

Below is the full list of targeted extensions for encryption:

1cd, 3dm, 3ds, 3fr, 3g2, 3gp, 3pr, 602, 7z, ps1, 7zip, aac, ab4, accdb, accde, accdr, accdt, ach, acr, act, adb, adp, ads, aes, agdl, ai, aiff, ait, al, aoi, apj, arc, arw, asc, asf, asm, asp, aspx, asx, avi, awg, back, backup, backupdb, bak, bank, bat, bay, bdb, bgt, bik, bin, bkp, blend, bmp, bpw, brd, c, cdf, cdr, cdr3, cdr4, cdr5, cdr6, cdrw, cdx, ce1, ce2, cer, cfg, cgm, cib, class, cls, cmd, cmt, conf, config, contact, cpi, cpp, cr2, craw, crt, crw, cs, csh, csl, csr, css, csv, dac, dat, db, db3, db_journal, dbf, dbx, dc2, dch, dcr, dcs, ddd, ddoc, ddrw, dds, der, des, design, dgc, dif, dip, dit, djv, djvu, dng, doc, docb, docm, docx, dot, dotm, dotx, drf, drw, dtd, dwg, dxb, dxf, dxg, edb, eml, eps, erbsql, erf, exf, fdb, ffd, fff, fh, fhd, fla, flac, flf, flv, flvv, fpx, frm, fxg, gif, gpg, gray, grey, groups, gry, gz, h, hbk, hdd, hpp, html, hwp, ibank, ibd, ibz, idx, iif, iiq, incpas, indd, jar, java, jnt, jpe, jpeg, jpg, jsp, jspx, ashx, js, kc2, kdbx, kdc, key, kpdx, kwm, laccdb, lay, lay6, ldf, lit, log, lua, m, m2ts, m3u, m4p, m4u, m4v, mapimail, max, mbx, md, mdb, mdc, mdf, mef, mfw, mid, mkv, mlb, mml, mmw, mny, moneywell, mos, mov, mp3, mp4, mpeg, mpg, mrw, ms11, msg, myd, myi, nd, ndd, ndf, nef, nk2, nop, nrw, ns2, ns3, ns4, nsd, nsf, nsg, nsh, nvram, nwb, nx2, nxl, nyf, oab, obj, odb, odc, odf, odg, odm, odp, ods, odt, ogg, oil, orf, ost, otg, oth, otp, ots, ott, p12, p7b, p7c, pab, pages, paq, pas, pat, pcd, pct, pdb, pdd, pdf, pef, pem, pfx, php, pif, pl, plc, plus_muhd, png, pot, potm, potx, ppam, pps, ppsm, ppsx, ppt, pptm, pptx, prf, ps, psafe3, psd, pspimage, pst, ptx, pwm, py, qba, qbb, qbm, qbr, qbw, qbx, qby, qcow, qcow2, qed, r3d, raf, rar, rat, raw, rb, rdb, rm, rtf, rvt, rw2, rwl, rwz, s3db, safe, sas7bdat, sav, save, say, sch, sd0, sda, sdf, sh, sldm, sldx, slk, sql, sqlite, sqlite3, sqlitedb, sr2, srf, srt, srw, st4, st5, st6, st7, so, st8, stc, std, sti, stm, stw, stx, svg, swf, sxc, sxd, sxg, sxi, sxm, sxw, tar, tar.bz2, tbk, tex, tga, tgz, thm, tif, tiff, tlg, txt, uop, uot, vb, vbox, vbs, vdi, vhd, vhdx, vmdk, vmsd, vmx, vmxf, vob, wab, wad, wallet, war, wav, wb2, wk1, wks, wma, wmv, wpd, wps, x11, x3f, xis, xla, xlam, xlc, xlk, xlm, xlr, xls, xlsb, xlsm, xlsx, xlt, xltm, xltx, xlw, xml, ycbcra, yuv, zip.

Finally, the ransom note contains information about the encryption algorithm used to encrypt the files, specifically RSA-1024 and AES-256.
It also includes the personid, used for identifying the victim. Following 0.05 bitcoin transfer into a designated and hardcoded wallet, attackers promise to provide victims with the decryption key to recover all files.

Sign Up For Threat Alerts

Loading...
Threats Icon

Aug 08, 2022

RapperBot – new evolving malware

FortiGuard Labs has been tracking a rapidly evolving IoT malware family known as "RapperBot". This...

Threats Icon

Aug 04, 2022

Google Drive And Dropbox Used By APT29...

Cloaked Ursa (aka: APT29) has been targeting governmental entities in several countries with spear-phishing campaigns...

Threats Icon

Aug 03, 2022

Manjusaka: A Chinese sibling of Sliver and...

Cisco Talos recently discovered a new attack framework called "Manjusaka" being used in the wild...

Threats Icon

Aug 03, 2022

macOS Targeted With The CloudMensis Multi-Staged Malware

ESET researchers discovered a previously unknown macOS backdoor that spies on users of the compromised...

Threats Icon

Aug 01, 2022

Attackers Target Ukraine With GoMet Backdoor

Since the Russian invasion of Ukraine began, Ukrainians have been under a nearly constant barrage...

Threats Icon

Jul 31, 2022

Untangling KNOTWEED: European private-sector offensive actor using...

The Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Security Response Center (MSRC) found a...

Threats Icon

Jul 31, 2022

Untangling KNOTWEED: European private-sector offensive actor using...

The Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Security Response Center (MSRC) found a...

Threats Icon

Jul 26, 2022

EvilNum Targets Cryptocurrency, Forex, Commodities

Proofpoint Threat Research observed the group Proofpoint calls TA4563 targeting various European financial and investment...

Threats Icon

Jul 25, 2022

Lightning Framework: New Undetected “Swiss Army Knife”...

Lightning is a previously undocumented and undetected Linux threat. Lightning is a modular framework we...

Threats Icon

Jul 24, 2022

Redeemer Ransomware

Redeemer 2.0 Being Distributed Via Affiliate Program Cyble Research Labs has constantly been tracking emerging...

Threats Icon

Jul 21, 2022

Cobalt Strikes again: UAC-0056 continues to target...

The Malwarebytes Threat Intelligence team recently reviewed a series of cyber attacks against Ukraine that...

Threats Icon

Jul 20, 2022

Trello From the Other Side: APT29 Phishing...

Beginning mid-January 2022, Mandiant detected and responded to an APT29 phishing campaign targeting a diplomatic...

Threats Icon

Jul 18, 2022

New OrBit Linux Malware That Hijacks Execution...

New and entirely undetected Linux threat dubbed OrBit, signally a growing trend of malware attacks...

Threats Icon

Jul 18, 2022

North Korean threat actor targets small and...

A group of actors originating from North Korea that Microsoft Threat Intelligence Center (MSTIC) tracks...

Threats Icon

Jul 13, 2022

ChromeLoader – New Stubborn Malware Campaign

A new browser hijacker/adware campaign named ChromeLoader (also known as Choziosi Loader and ChromeBack) was...