Working with the MITRE ATT&CK knowledge base

T1574.006 – Dynamic Linker Hijacking

Malware can run its own payloads by taking over environmental variables and loading shared libraries. LD_Preload forces binary files to charge specific libraries before others, enabling pre-loaded libraries to overwrite any function from any library. One way to use LD_Preload is the addition of a crafted library to /etc/ls.so.preload. Rocke modifies /etc/ld.so.preload, a configuration file that injects the shared objects to the processes performed in the Linux system. Launching this file prevents you from checking a malicious process using the ps command. Suspicious behavior can be initially detected using the following command:

export

The command will show variables in the system. A record related to malware could appear on the list:

declare -x LD_PRELOAD= "/usr/local/lib/libntpd.so"

Conclusion

In these examples of malicious software used by the Rocke group, you can see that there are ways to spot the presence of an attack. Malware groups constantly improve their techniques, and the threat is still growing. In this type of attack, it is worth focusing on simple things. You should also remember to reduce the threat area by complying with best practices, such as installing system and program updates, using safe password policies, restricting access to services and hardware, and monitoring system resources.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus