Analysis ITW Linux Implants
Analysis ITW Linux Implants
2023/01/30
@pdrimel @Joseliyo_Jstnk
/in/pdrimel/ /in/joseluissm/
• Intro
• 2022 ITW Linux threats
• Similarities and detections
• Conclusions
Windows Linux
https://lolbas-project.github.io https://gtfobins.github.io
DOCX PWSH
EXE EXE
SH
CVE Exploitation ELF
ELF SH
CVE Exploitation
Valid credentials
Lateral movement
SH
• Initial vector usually is an exploitation or lateral movement from another infected machine or valid credentials
• There can be multiple stages
• Going to the detail, many GTFOBins are used during the infection
LOLBAS GTFOBins
Schtasks.exe Crontab
Wscript.exe Wget
Mshta.exe Bash
Certutil.exe Curl
Sc.exe Systemd service
Cmd.exe lwp-download
Generic Generic
Trojans Downloaders
/etc/systemd/system/snapd.loading.service
• Chmod
• Dpkg
High level • Apt
Rules mapped • Sort
Medium level to events • rm
during
Low level execution
Information level
3 5 3
Delivery 5 Actual Installation of a service in the system in
order to be able to persist
4 6 7 4 5 6 Actual Exfiltration of information to a web
Exploitation application on the internal network acting as
a proxy
5 8
6 9 Actual Use of chmod to give permissions to some
Installation
files
Command & 6 9 7 8
Control
7 8 9 10 11 10 11 12 13 14 9 10 11
Actions on
objective 15 16
Victim Victim
• Data into buckets
• Help you to clustering and
Hypothesis connection
Hypothesis event
attributing
Real event Real connection
threats 2022
INFRASTRUCTURE
CAPABILITY
• Servers HTTP and HTTPS to distribute
• Use of utilities for Security software Discovery like ps,
payloads.
htop, top with grep for filtering. Uname and strings in
• Use of encrypted protocols to share
memory related to VM
information between server and client.
• Abuse of Systemctl to stop system services or start
services created by the malware
• Use of wget and curl to perform connections and
download files
• Use of chattr, chmod and chown for permissions
modification
VICTIM • Creation of files in suspicious folders
• Use of ls and find to discover files and directories.
• Mainly Linux servers
• Removal of artifacts and of the samples themselves
RECOMMENDATIONS
• System patch; for effective damage admin privilege is required.
• On the network side, look out for exfiltration coming from a Linux box.
• SUID bits are still relevant.
• https://github.com/blackberry/threat-research-and-intelligence/tree/main/Talks/2023-01-30%20-
%20SANS%20Cyber%20Threat%20Intelligence%20Summit%20%26%20Training%202023
• 5 sigma rules
– proc_creation_lnx_cp_passwd_tmp.yml
– proc_creation_lnx_mount_hidepid.yml
– proc_creation_lnx_touch_susp.yml
– proc_creation_lnx_disable_ufw.yml
– proc_creation_lnx_iptables_flush_ufw.yml
• ATT&CK MITRE Navigator layers for the samples tracked during 2022
– Orbit
– Symbiote
– Chaos
– CoinMiner
– Lockbit
– Generic Downloaders
– Generic Trojans
/in/pdrimel/ /in/joseluissm/
Thank you
© 2022 BlackBerry Limited. Trademarks, including but not limited to BLACKBERRY and EMBLEM Design are
the trademarks or registered trademarks of BlackBerry Limited and the exclusive rights to such trademarks
are expressly reserved. All other trademarks are the property of their respective owners.