Malicious Logic: The Invoice Adds Up, but the Money Goes Elsewhere
Imagine billing software that calculates every total correctly but changes the payment destination on selected invoices. The person who planted the rule wants the ordinary work to continue. Correct totals help hide the unauthorized action happening alongside them.
That fictional program illustrates malicious logic: behavior deliberately built into a system for a harmful purpose. The National Institute of Standards and Technology glossary includes software, firmware and hardware within the definition. It is broader than the idea of a separate bad application someone installs.
Logic means the rules that govern what a system does. Security glossaries use malicious logic, malicious code and malware as overlapping terms for harmful behavior and instructions.
Insider Threats in Two Minutes
The harmful rule can wait
In the imagined billing program, the total calculation still serves the business. The substituted payment destination serves someone else's purpose. Testing only the arithmetic could miss the change entirely.
A hidden condition might select which invoices receive the substituted destination. That would give routine testing another way to miss it: the tested inputs might never activate the harmful action. The program can look dependable until the relevant condition occurs.
A logic bomb is one form of conditional malicious behavior. It waits for a specified trigger before acting. Other harmful logic can operate without waiting for a date or special event—for example, a routine that steals data whenever it runs. Copying itself is not a requirement either.
The billing example tells us someone planted the rule. In an actual case, investigators would need evidence of that intent. An incorrect payment destination could also come from an entry mistake or a programming defect. Examining what changed, who changed it and what the software was meant to do helps distinguish an error from deliberate interference.
Below the application
The rules can also sit in firmware, code built into the device to control its operation. Platform firmware can have broad authority over the computer and provide services on which the operating system depends.
The National Institute of Standards and Technology's firmware-resiliency guidance describes malicious changes that could persist, disrupt operations or extract data. Protection, detection and recovery need to reach that layer when it is affected. Examining an ordinary application alone would leave those instructions outside the review.
- Stop a stranger from plugging a drive into a computer you leave unattended.
- Lock ten ports at once, and open them again with the included key.
- Keep dust out of the ports you rarely use.
Look beyond the routine transaction
Limiting who can change code reduces opportunities to plant unwanted behavior. Reviewing changes against requirements can then expose actions outside the system's authorized purpose.
The Secure Software Development Framework includes human review and automated analysis, with expert examination for hidden access routes and other malicious content.
Review needs to reach unusual inputs and conditions as well as the routine transaction. In the billing example, a test might check invoices that never meet the hidden condition. The totals and destinations would look correct while the harmful rule remained ready to run on a different invoice.
Tampering: An Unauthorized Change Can Still Look Normal

Insider Threats: When Trusted Access Can Cause Harm

Separation of Duties: Who Checks the Person With Access?

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