Malware Laws: Federal Statutes, CFAA Penalties, and State Crimes

Malware laws in the United States are a stack of federal and state statutes that make it a crime to create, distribute, or deploy malicious software, with federal penalties running up to 10 years in prison for a first intentional-damage conviction and up to life if the attack causes a death. The Computer Fraud and Abuse Act does most of the work, but wiretap law, the DMCA, CAN-SPAM, and all 50 states’ computer crime codes add their own charges on top. Victims can also sue the attacker directly, and businesses that pay a ransom face a separate layer of federal risk from the Treasury Department.

The Computer Fraud and Abuse Act

The Computer Fraud and Abuse Act, codified at 18 U.S.C. § 1030, is the federal government’s primary tool against malware. It criminalizes accessing a protected computer without authorization or exceeding authorized access, and it specifically targets anyone who knowingly transmits a program or code that intentionally causes damage.1Office of the Law Revision Counsel. 18 USC 1030 – Fraud and Related Activity in Connection with Computers

The statute’s reach is wide because of how it defines “protected computer.” That term covers any computer used by a financial institution, the federal government, or in a way that affects interstate or foreign commerce or communication. In practice, any device connected to the internet qualifies, which gives federal prosecutors jurisdiction over virtually any malware attack on U.S. soil.1Office of the Law Revision Counsel. 18 USC 1030 – Fraud and Related Activity in Connection with Computers

Writing and deploying ransomware that encrypts files, distributing worms that spread across networks, and installing spyware that harvests credentials all fall squarely within the CFAA. The statute also reaches people who traffic in passwords or access credentials for protected computers, even if they never personally break into a system. Intent sets the penalty: deliberately damaging a computer, recklessly causing damage through unauthorized access, and simply accessing a system without permission each trigger a different tier.

Federal Wiretap Law

When malware is designed to intercept communications in transit, prosecutors turn to 18 U.S.C. § 2511, the federal wiretap statute enacted as part of the Electronic Communications Privacy Act. It makes it a federal crime to intentionally intercept any electronic communication, which includes capturing data as it moves across a network.2Office of the Law Revision Counsel. 18 USC Chapter 119 – Wire and Electronic Communications Interception and Interception of Oral Communications

The statute defines interception broadly as acquiring the contents of a communication through any electronic or mechanical device.3Office of the Law Revision Counsel. 18 USC 2510 – Definitions That covers keyloggers that capture typed passwords, packet sniffers embedded in malware, and trojans designed to record private messages. Where the CFAA protects the computer, the wiretap law protects the data flowing through it, and a single malware deployment can trigger both. Wiretap violations carry up to five years in federal prison.4Office of the Law Revision Counsel. 18 USC 2511 – Interception and Disclosure of Wire, Oral, or Electronic Communications Prohibited

The DMCA’s Anti-Circumvention Rule

Section 1201 of the Digital Millennium Copyright Act prohibits trafficking in tools that are primarily designed to bypass technological protections on copyrighted works, have no significant commercial purpose beyond circumvention, or are marketed for circumvention use.5U.S. Copyright Office. The Digital Millennium Copyright Act of 1998

Many intrusion tools work by defeating access controls on software systems, so a cracker aimed at digital rights management or a rootkit that disables security protections can draw DMCA liability on top of CFAA charges. The statute carves out narrow exceptions for reverse engineering to achieve software interoperability, encryption research, and authorized security testing.5U.S. Copyright Office. The Digital Millennium Copyright Act of 1998

CAN-SPAM and Phishing Delivery

Malware often arrives in an inbox disguised as a legitimate message. The CAN-SPAM Act, at 15 U.S.C. § 7704, makes it unlawful to send commercial email with materially false or misleading header information, or with a subject line that would mislead a reasonable recipient about the message’s contents.6Office of the Law Revision Counsel. 15 USC 7704 – Other Protections for Users of Commercial Electronic Mail When attackers use spoofed sender addresses and deceptive subject lines to trick users into opening malicious attachments, prosecutors can stack a CAN-SPAM charge on top of any CFAA or wiretap counts.

State Computer Crime Laws

All 50 states maintain their own computer crime statutes, and most target unauthorized access or “computer trespass.” These laws let local prosecutors file charges when the conduct doesn’t trigger a federal investigation or when federal agencies decline to get involved.

State codes generally address three core areas. The first is unauthorized entry into a computer system, which most states criminalize whether or not any damage occurred. The second is copying or exfiltrating data without consent, which protects both intellectual property and personal information at the state level. The third is tampering with or destroying data and programs, the kind of harm ransomware and wipers are designed to inflict.

State laws fill gaps federal law sometimes leaves. A malware incident that causes $3,000 in damage might not clear the CFAA’s threshold for certain charges but could still be prosecuted as a felony under the relevant state statute. State attorneys general and local prosecutors also set their own priorities, and victims sometimes find more responsive partners there than in federal offices.

Prison Time and Fines Under the CFAA

The CFAA’s penalty structure is tiered by what the defendant did, what happened as a result, and whether they have prior convictions.

Fines come on top of prison time. Individuals convicted of a federal felony face fines up to $250,000, and organizations face up to $500,000. A judge can also impose an alternative fine of twice the gross gain or twice the gross loss, whichever is greater.7Office of the Law Revision Counsel. 18 USC 3571 – Sentence of Fine For a ransomware crew that collected millions in cryptocurrency, that alternative fine dwarfs the statutory cap.

The Mandatory Two Years for Identity Theft

Malware that harvests personal information often triggers a charge defendants don’t see coming: aggravated identity theft under 18 U.S.C. § 1028A. If someone uses stolen credentials during any underlying federal felony, including a CFAA violation, they face a mandatory two-year prison sentence on top of whatever they get for the underlying crime.8Office of the Law Revision Counsel. 18 USC 1028A – Aggravated Identity Theft

That two-year term is non-negotiable in ways most federal sentences are not. The court cannot run it concurrently with the sentence for the underlying felony, cannot reduce the underlying sentence to compensate, and cannot substitute probation.8Office of the Law Revision Counsel. 18 USC 1028A – Aggravated Identity Theft A defendant who deploys a banking trojan, steals login credentials, and drains accounts is looking at the CFAA sentence plus two years stacked on top. Prosecutors use the charge aggressively, and it gives them significant leverage in plea talks.

Paying a Ransom Can Create Its Own Liability

Victims of ransomware face a legal trap that isn’t obvious: paying the ransom can itself create federal liability. The Treasury Department’s Office of Foreign Assets Control runs a sanctions program targeting groups engaged in significant malicious cyber activity. Multiple executive orders and the International Emergency Economic Powers Act let OFAC designate specific ransomware operators and affiliated entities, making it illegal to send them money.9U.S. Department of the Treasury. Cyber-Related Sanctions

OFAC sanctions operate on a strict liability basis. A company can face civil penalties for paying a sanctioned ransomware group even if it had no idea the group was on the list. OFAC has acknowledged this in its advisory on ransomware payments and expects organizations to conduct due diligence before paying. Companies that self-report, cooperate with law enforcement, and take meaningful steps to improve their cybersecurity receive more favorable treatment if a violation is discovered. Financial institutions have added obligations: FinCEN has issued specific guidance on identifying and flagging ransomware-related transactions in Suspicious Activity Reports.10Financial Crimes Enforcement Network. FinCEN Combats Ransomware For any business weighing a ransom payment, the practical rule is to involve legal counsel and law enforcement before sending money, not after.

Suing the Attacker Directly

Beyond criminal prosecution, the CFAA gives victims a private right of action for compensatory damages and injunctive relief. You do not need the government to bring criminal charges before filing a civil suit. To qualify for a federal civil claim, the conduct must involve at least one aggravating factor: $5,000 or more in losses during a one-year period, impairment of medical care, physical injury, a threat to public safety, or damage to government systems.1Office of the Law Revision Counsel. 18 USC 1030 – Fraud and Related Activity in Connection with Computers

Recoverable losses include the cost of investigating and responding to the attack, restoring data and systems, and revenue lost while operations were down. If your only qualifying factor is the $5,000 threshold, damages are limited to economic losses. The deadline is firm: you must file within two years of the act or two years of discovering the damage, whichever is later.1Office of the Law Revision Counsel. 18 USC 1030 – Fraud and Related Activity in Connection with Computers

Many state computer crime statutes impose no minimum dollar threshold, so a victim whose federal losses fall below $5,000 may still have a viable state-law claim. The strongest civil cases combine direct evidence of the attack with thorough documentation of costs: forensic invoices, downtime records, and proof of lost contracts or customers. Preserving evidence early matters as much for the civil case as for stopping the damage.

What These Laws Don’t Reach: Good-Faith Security Research

Probing a system for vulnerabilities, writing proof-of-concept exploit code, and testing defensive tools can look a lot like criminal conduct on paper, and the laws above don’t carve out a clean exemption. Two partial protections exist, and neither is airtight.

The Department of Justice has adopted a policy directing federal prosecutors to decline CFAA charges when the evidence shows the defendant’s conduct consisted of, and was intended as, good-faith security research. The policy defines that as accessing a computer solely for testing, investigating, or correcting a security flaw, in a manner designed to avoid harm, with the resulting information used primarily to improve security.11United States Department of Justice. Justice Manual – Computer Fraud and Abuse Act The catch: this is internal guidance for prosecutors, not an enforceable right. A researcher cannot cite it as a defense in court.

On the DMCA side, the Librarian of Congress has adopted an exemption allowing circumvention of access controls for good-faith security research, provided the researcher works on a lawfully acquired device or has the system owner’s authorization, operates in an environment designed to avoid harm, and uses the findings to promote security.12Federal Register. Exemption to Prohibition on Circumvention of Copyright Protection Systems for Access Control The exemption explicitly warns that qualifying for DMCA protection does not shield a researcher from CFAA liability. Written authorization from the system owner, through a bug bounty program or a penetration testing contract, is the practical safeguard. A researcher who finds a vulnerability and then uses it to extort the owner is not conducting good-faith research under any of these frameworks.