How attackers hide malicious code in a container application
Horse Trick

© images/293_123RF_154085458_Chess-Piece_cagkan_200dpi_for_articles.png
Malicious Trojan horse programs have been part of the IT landscape for decades. It is easier than you think to create an application with a secret purpose. We'll show you how.
At the end of the legendary Trojan war, the Greeks left an offering for the people of Troy – a giant statue of a horse. Marveling at the gift, the Trojans brought the horse within their walls, not realizing it contained a lethal payload: Greek soldiers who would open the gates and let the Greek armies in to destroy the city. In other words, the Trojan horse was not what it appeared to be.
In today's world, the term Trojan horse refers to a program that is not what it appears to be. A Trojan horse is a form of malware that appears to have a legitimate purpose but secretly performs some malicious function. Trojan horse programs are sometimes used to open a backdoor or harvest information for a remote attack. Some Trojan horse apps take the form of ordinary Linux utilities like ps
or ls
. Others might pass through links sent with email messages.
The increase in Linux's popularity means malicious actors are also paying more attention, and the spread of harmful software will likely keep apace. Creating malware is often considered a dark art that only criminal hackers and spies truly understand, but the purpose of this article is to show just how easy it is to embed malicious code within an application. Of course, I will not provide any actual malicious code for this experiment. The sample code is just a placeholder for additional commands that an attacker could hide within the container application.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

News
-
Dash to Panel Maintainer Quits
Charles Gagnon has stepped away as maintainer of the popular Dash to Panel Gnome extension.
-
CIQ Releases Security-Hardened Version of Rocky Linux
If you're looking for an enterprise-grade Linux distribution that is hardened for business use, there's a new version of Rocky Linux that's sure to make you and your company happy.
-
Gnome’s Dash to Panel Extension Gets a Massive Update
If you're a fan of the Gnome Dash to Panel extension, you'll be thrilled to hear that a new version has been released with a dock mode.
-
Blender App Makes it to the Big Screen
The animated film "Flow" won the Oscar for Best Animated Feature at the 97th Academy Awards held on March 2, 2025 and Blender was a part of it.
-
Linux Mint Retools the Cinnamon App Launcher
The developers of Linux Mint are working on an improved Cinnamon App Launcher with a better, more accessible UI.
-
New Linux Tool for Security Issues
Seal Security is launching a new solution to automate fixing Linux vulnerabilities.
-
Ubuntu 25.04 Coming Soon
Ubuntu 25.04 (Plucky Puffin) has been given an April release date with many notable updates.
-
Gnome Developers Consider Dropping RPM Support
In a move that might shock a lot of users, the Gnome development team has proposed the idea of going straight up Flatpak.
-
openSUSE Tumbleweed Ditches AppArmor for SELinux
If you're an openSUSE Tumbleweed user, you can expect a major change to the distribution.
-
Plasma 6.3 Now Available
Plasma desktop v6.3 has a couple of pretty nifty tricks up its sleeve.