Malicious Code: The Unwanted Instructions in Useful Software
Two releases of XZ Utils, a software package, were created and signed by one of the project's maintainers. They also contained a backdoor, a hidden way around normal security controls. The unwanted code had arrived in files that really came from the project.
Malicious code means instructions deliberately intended to perform harmful, unauthorized actions. Those actions might expose private information, change records without permission or prevent people from using a system. The code can be part of software that also performs a useful job.
The National Institute of Standards and Technology glossary includes software and firmware in this description. Firmware is the code built into a device to control its operation. This broad category overlaps with malware.
A Virus, a Worm, or a Trojan? The Difference Matters
Harmful instructions in an official release
The XZ project's maintainer account identifies the affected release tarballs as versions 5.6.0 and 5.6.1. A tarball is an archive bundling files for distribution.
The signed archives show a limit of a digital signature. Verifying origin and integrity is useful, but a release can pass an origin check while containing intentionally harmful instructions.
The harmful part can be a small addition
Malicious code does not need a separate installer, window or recognizable product name. It can be inserted into a useful component, including a script—a set of instructions run by another program.
Consider an invented maintenance script that is supposed to copy records to an approved storage location. Someone changes it to send a second copy to an unauthorized recipient. The file can retain the same name and language. The maintenance task may still finish successfully. The extra action is what makes the change harmful.
Its ability to cause damage depends on where it runs and the permissions available there. Code that can read sensitive records has a different opportunity from code denied access to them. Restricting those permissions can reduce what an unauthorized addition can reach.
The altered script could export the records once, never spread to another machine and still be malicious. Copying itself is not a requirement.
Intent also distinguishes this from a bug. A programmer can accidentally write code that damages information. An attacker might exploit that defect to run malicious instructions. In that sequence, the accidental weakness provides an opening; the attacker's code supplies the deliberately harmful action.
- Stop ransomware and malware before they reach your files.
- Bank and shop in a browser built to keep transactions private.
- Cover five devices, from Windows and Mac to phones.
Who can add those instructions?
Restricting who can change code limits the opportunities to insert harmful instructions. The National Institute of Standards and Technology's Secure Software Development Framework recommends least privilege: giving contributors and automated systems only the access their work requires.
The framework also calls for reviewing or analyzing code before release. It distinguishes human review from automated analysis and includes expert review for backdoors and other malicious content.
Reviewers need to understand the intended task and the actions a change adds. In the maintenance example, checking that the approved copy operation still works would miss the problem. The second destination is the change they need to notice.
Trojan Horses: When Useful Software Has a Hidden Job

Logic Bombs: Harmful Code Waiting for Its Trigger

Fileless Malware: An Attack Doesn’t Need Its Own Program File

QUOTE:
"Amateurs hack systems, professionals hack people."
