Está en la página 1de 24

Avances en

estegomalware y TTPs
Tendencias en 2021
Dr. Alfonso Muñoz - Criptored
@mindcrypt – alfonso@criptored.com
• Doctor Ingeniero Telecomunicación (UPM)
• 18 años de “carretera”…

• Expert security member – Europol (EC3)


• Libros (5), patentes (2), certificaciones de seguridad
(CISA, CISSP, CEH, CHFI, CES, OSWP, CCSK…)…

• Investigador y ponente en conferencias de prestigio


(RootedCon, Ekoparty, Blackhat Europe, 8.8, BSIDES,
VirusBulletin, HackInTheBox, DeepSec, STIC
CCN/CERT…), tools, premios académicos e industriales
(3 premios SIC, IDG 2020-Top 50 Blue Team, etc.),
artículos científicos en revistas de impacto (+70),
alfonso@criptored.com docente en másteres universitarios (4)….
t.me/criptored
http://github.com/mindcrypt • Bug hunter - Security bulletins (Microsoft, Foxit, Google -
Hall of fame, etc.).
https://es.linkedin.com/in/alfonsomuñoz
@mindcrypt • Founder CriptoCert Certified Crypto Analyst & Criptored
https://www.criptocert.com

Perfil:

• Offensive security (sw/hw)


• Cryptography & covert channels/stego
• Cutting-edge research (defensive & offensive)

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Hablemos de …

https://en.wikipedia.org/wiki/Illegals_Program#Agents_apprehended_by_FBI_o
n_June_27,_2010

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


… estegomalware

https://www.youtube.com/watch?v=hGhufb2C_7Y

https://www.amazon.es/Estegomalware-antivirus-
perimetral-esteganografía-ciberamenazas/dp/B09F1J2NTG

Stegomalware o Stegware is a type of malware that uses steganography to hinder detection.


This type of malware operates by building a steganographic system to hide malicious data within its resources and then extracts and executes them
dynamically. It is considered one of the most sophisticated and stealthy ways of obfuscation.

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Estegomalware 101 - ¿Qué me he perdido?

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Mi palabro = “TTP – Esteganográficos”
Tactics, Techniques, and Procedures

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


0- ¿Es útil? - Esteganografía “ofensiva”

¿Podemos confiar como “atacantes” en estos


resultados o informes?

¿Qué hacemos como defensores?

https://www.proofpoint.com/es/resources/threat-
reports/human-factor

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


1- ¿Cuáles son las técnicas más usadas?

Estegomedio: imágenes digitales, comentarios (HTML, Youtube, Twitter, ...), dns-http


Técnicas: LSB-secuencial, EOF – Uso principal: ocultar urls, dlls, powershell
Formato: JPG, BMP, PNG, imagen dentro PDF, favicon, DNS-HTTP traffic… domain fronting
1 - Ocultar datos de configuración, código ejecutable: TDSS/Alureon (2011), Android.FakeRegSMS.B (2012) , Janicab (2013), Zeus/ZBOT
(2014), ZeusVM/Zberp (2014), Lurk Downloader (2014) , Vbklip (2015), Darkcomet (2015), Cerber (2016), AdGholas/Stegano (2016), DNSChanger (2016),
Sundown (2016), ZeroT (2017), StegBaus (2017), SyncCrypt (2017), SunOrcal (2017), VeryMal (2018), APT32/OceanLotus (2019), GandCrab (2019), Powload
(2019), LokiBot (2019), APT37/Reaper (2019), Ursnif/Gozi (2019), IcedID (2019), Daserf (2019), MyKings (2019), NanoCore (2020), Cutwail (2020),
SixLittleMonkeys/Microcin (2020), MageCart (2020), ProLock/PwndLocker (2020), DarkTrack RAT (2020), MontysThree/MT3 (2020), Purple Fox (2020),
TinyPOS (2020), MuddyWater (2021), ObliqueRAT (2021), Fairfax (2021)…

2 - Ocultar la comunicación con el C&C: VinSelf (2010), ShadyRAT (2011), Morto (2012), Stegoloader/Gatak (2015), TeslaCrypt (2016), CryLocker
(2016), TROJAN.MSIL.BERBOMTHUM.AA (2018, memes), Titanium (2019), APT15/Ke3chang (2019), APT29/Cozy Bear (2019, 2020), APT23/Tropic Trooper
(2020), DeathStalker/Evilnum (2020)

3 - Ocultar datos robados: Duqu (2011), Turla (2019), APT34/OilRig (2020), APT38/Lazarus Group (2021), APT40/Leivathan (2021)
(Rusia, Israel, Turquía, Corea del Norte, China…)
* Disclaimer: - Conjunto "representativo“ - Varias muestras están presentes en varias categorías, se representa la “principal”.

Los malos “usan” opensource: Invoke-PSImage (Dic,2017) - https://github.com/peewpw/Invoke-PSImage


A partir de 2019 aumento significativo de muestras (7 APTs) que ¿copian? la misma técnica (LSB B4G4 + Powershell)

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


2- Vista forense - ¿Cómo actúa? - Conexión al C2

- ¿Qué técnica utilizan?


- ¿Qué portador?
- ¿Dónde se conectan?
- ¿Limitaciones del C2? ¿Domain fronting? NSA, CISA and FBI July 19, 2021 detailed over 50 tactics, techniques, and procedures (TTPs) used by China’s state-sponsored
hackers…

https://github.com/nsacyber/chinese-state-sponsored-cyber-operations-observed-ttps

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


APT 40 CYBER ESPIONAGE ACTIVITIES…

The conspiracy’s hacking campaign targeted victims in the


United States, Austria, Cambodia, Canada, Germany,
Indonesia, Malaysia, Norway, Saudi Arabia, South Africa,
Switzerland and the United Kingdom. Targeted industries
included, among others, aviation, defense, education,
government, health care, biopharmaceutical and
maritime…

A campaign to hack into the computer systems of dozens


of victim companies, universities and government entities
in the United States and abroad between 2011 and 2018. https://www.justice.gov/opa/pr/four-chinese-nationals-working-ministry-state-security-charged-global-computer-intrusion
These actors aggressively target political, economic,
military, educational, and critical infrastructure personnel https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/2698416/nsa-cisa-and-fbi-
and organizations to access valuable, sensitive data. detail-chinese-state-sponsored-actions-mitigations/
3- ¿A qué sectores/países afecta ?
• Gobiernos, embajadas, sector militar…
• Particulares
• Sectores industriales: Media, Hospitales, Empresas TIC,
Alimentación, Educación, Farmacéuticas, ONGs, Retail, Aerolíneas,
Biotecnología, industria química, fabricación electrónica,
energéticas, Salud, Transportes, Banca y sector financiero.

*Disclaimer
- Total de 81 muestras ÚNICAS de estegomalware desde 2010, 17 desde 2019.
- LSB secuencial, EOF y fake headers

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


4- ¿El estegomalware afecta a España?

Gandcrab, Cerber y Teslacrypt cubren el 87% de las


muestras de ransomware. En estas familias se
han detectado muestras con estegomalware.

De las Top 5 – Redes de distribución de Ransomware => Zbot


y Gozi muestran capacidades de estegomalware

https://storage.googleapis.com/vtpublic/vt-ransomware-report-2021.pdf

Estegomalware en España (2019-2021): Ursnif, IcedID, GandCrab, LightNeuron, RainDrop, MyKings, Cutwail, ObliqueRAT,
Glupteba, Prolock, NanoCore…

• Malware type: banking trojan, ransomware, backdoor, credentials stealer, dropper, loader, botnet, skimmer, RAT,
cryptominer…
• Técnicas más usadas: EoF, LSB secuencial, Fake-headers

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


5- Aprovechan tu desconocimiento
Forense esteganográfico – Aprovecha “su” desconocimiento

• Las herramientas de detección son muy


m e j o r a b l e s p e r o n o s p u e d e n a yu d a r. L o s
“malos” también cometen errores...

https://github.com/mindcrypt/covertchannels -
steganography

• Ejemplos de múltiples muestras con LSB


s e c u e n c i a l y s i n c i f r a r. E j , P S - I n v o k e i m a g e
( B 4 G 4 , 7 A P Ts ) ( P o w l o a d , r e d t e a m i n g , … ) -
https://github.com/peewpw/Invoke-PSImage

Muddy Water(Iranian APT) - https://attack.mitre.org/groups/G0069/


Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt
5- Aprovechan tu desconocimiento

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Ejemplos
APTs 2021

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Estegomalware en EoF (Mar -Jul, 2021)

https://blog.sucuri.net/2021/03/magento-2-php-
credit-card-skimmer-saves-to-jpg.html
A recent investigation for a compromised Magento 2 website revealed a malicious
injection that was capturing POST request data from site visitors. Located on the
https://blog.sucuri.net/2021/07/magecart-swiper-uses-
checkout page, it was found to encode captured data before saving it to a .JPG file.
unorthodox-concatenation.html

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Estegomalware en imágenes digitales (Mar, 2021)
Esteganografía LSB APT 2019-2021 - Ursnif, Powload, Oceanlotus APT-32, Waterbug/Turla, Lokibot, TheDukes, NanoCore
RAT, Bebloh*, Oilrig*, MT3, … ObliqueRAT (BMP-RGB, 2021)…
The initial email sent to victims contains malicious documents with new
macros, which redirect users to the malicious URLs containing these
payloads. The malicious macros consequently download the BMP files,
and the ObliqueRAT payload is extracted to the disk.

https://threatpost.com/website-images-obliquerat-malware/164395/

“Codificación a medida” TA551/Shathak is a financially-motivated threat group that has been active
LightNeuron/Turla (JPEG), Oilrig, … since at least 2018. The group has primarily targeted English, German,
Italian, and Japanese speakers through email-based malware distribution
campaigns.

TA551→IcedID malware (2017…) is a modular banking malware designed to steal


financial information. It is capable of propagation over the network, monitor activities
from the infected system and exfiltration of data. It conducts a man-in-the-browser
attack such as web-injection, proxy setup and redirection. It continuously evolves to
increase persistence and detection evasion.
SteamHide (JPG-metadata, 2021), TA551-IcedID (PNG,2021), …
https://www.gdatasoftware.com/blog/2021/06/36861-malware-hides-in-steam-profile-images

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


TA551-IcedID (PNG)

https://github.com/ReconInfoSec/png-decrypt/blob/main/decrypt.py

https://www.mimecast.com/globalassets/documents/whitepapers/taa551-treatresearch_final-1.15.21.pdf

TA551 distributes new IcedID malware


https://success.trendmicro.com/solution/000283386
Estegomalware usando “ficheros comprimidos”

An additional piece of malware used in the SolarWinds


attacks which was used against a select number of victims
that were of interest to the attackers. Raindrop is a loader
which delivers a payload of Cobalt Strike…Raindrop
https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/solarwinds-raindrop-malware appears to have been used for spreading across the victim’s
network.
Raindrop Malware Hides in 7-Zip

A copy of the previously unseen Raindrop was installed under the name bproxy.dll.
One hour later, the Raindrop malware installed an additional file called "7z.dll". A
legitimate version of 7zip was used to extract a copy of what appeared to be Directory
Services Internals (DSInternals) onto the computer. DSInternals is a legitimate tool
which can be used for querying Active Directory servers and retrieving data, typically
passwords, keys, or password hashes.

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Estegomalware usando “ficheros comprimidos” (Abr, 2021)

PNG (with compressed Zlib malicious object) -> BMP (HTA)


- Gets the image file that has an embedded zlib object. (image003.png)
- Converts the image in PNG format into BMP format by calling WIA_ConvertImage.
Since the BMP file format is uncompressed graphics file format, converting a PNG file
format into BMP file format automatically decompresses the malicious zlib object
embedded from PNG to BMP. This is a clever method used by the actor to bypass
security mechanisms that can detect embedded objects within images.

- Gets a WMI object to call Mshta to execute the bmp file. The BMP file after
decompression contains a HTA file which executes Java Script to drop a payload

https://blog.malwarebytes.com/threat-intelligence/2021/04/lazarus-apt-conceals-
malicious-code-within-bmp-file-to-drop-its-rat/ Embedded objects within PNG and BMP file

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Estegomalware en “lenguajes de marcado” (Feb, 2021)

https://blog.sucuri.net/2021/02/whitespace-steganography-conceals-web-shell-in-php-malware.html

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Los clásicos – Lazarus CookieTime/LCPDot (Ago 2020 -…)
Estegomalware en protocolos de comunicación

Lazarus - Operation Dream Job

https://blogs.jpcert.or.jp/en/2021/01/Lazarus_malware2.html

https://vblocalhost.com/uploads/VB2021-Park.pdf

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


Conclusiones
• El estegomalware se está consolidando. El malware actual (APT, ransomware, RAT, …) y
actualizaciones de piezas antiguas lo están utilizando.

• Los atacantes “detectados” reutilizan técnicas y herramientas libremente accesibles.


• Uso de técnicas básicas esteganográficas (LSB secuencial y EoF).

• RETO para la industria – Herramientas y mejora del conocimiento.


• Incremento de capacidades en especialistas forenses/DFIR

Avances en estegomalware y TTPs -Tendencias en 2021- Dr. Alfonso Muñoz @mindcrypt


MUCHAS
GRACIAS
Dr. Alfonso Muñoz - Criptored
@mindcrypt – alfonso@criptored.com

También podría gustarte