ACCOUNT LOGIN
AI Can Generate Infinite Malware Variants. Hash-Based Whitelisting Means None of Them Run.

AI Can Generate Infinite Malware Variants. Hash-Based Whitelisting Means None of Them Run.

Malware variants are modified versions of existing malware. AI models can be used to create them automatically by rewriting the original code. The rewritten version performs the same actions as the original but contains different code. Because the process is automated, it can be repeated to produce large numbers of variants. Some experimental malware generates new versions of its own code by querying an AI model while it runs.

Detection-based security tools block malware that they recognize. A variant with rewritten code may not match any malware these tools have identified before. Hash-based whitelisting does not depend on recognizing malware. Below, we explain how it blocks unapproved files through hash verification and allowlist enforcement.

 

How Hash-Based Whitelisting Blocks Unapproved Executables

Application whitelisting, also called allowlisting, is a security control that allows only approved software to run on a device and blocks everything else. It applies mainly to executable files, which are files the operating system can launch as programs. Hash-based whitelisting identifies each approved file by its cryptographic hash, a value calculated from the file’s contents.

This approach relies on two mechanisms. 

  • Hash Verification

Hash verification confirms a file’s identity by checking its cryptographic hash. The hash is produced by a cryptographic hash function, such as SHA-256, which processes the file’s contents and outputs a fixed-length value.

The same contents always produce the same hash. Any change to the contents will, with a very high probability, produce a different hash. Because the hash is calculated from the contents alone, renaming a file or moving it to another folder does not change it.

When a file is approved, the whitelisting tool calculates its hash and adds it to a list of approved hashes. Each time a file is launched, the tool calculates that file’s hash and compares it with that list before the file can execute. A match confirms that the file is identical to an approved file.

An AI-generated variant contains different code from the original malware, meaning it has a different hash. This applies even when the changes are minor, such as renamed variables or added lines of unused code. Unless that exact file has been approved, its hash does not appear on the list. The file therefore fails verification. The same applies to each new variant, regardless of how many are produced.

  • Allowlist Enforcement

An allowlist is a list of the applications and application components, such as shared code libraries, that are approved to run on a device. In hash-based whitelisting, each entry is the hash of an approved file. Allowlist enforcement applies the list to every file that is launched. It works as follows:

  • Building the list: Administrators can create the list by scanning a clean device that users have never accessed and recording the hash of each executable file on it. Using a clean device reduces the risk of including malware on the list.
  • Applying default deny: A launched file runs only if its hash is on the allowlist. This is known as a default-deny rule, because any file that has not been approved is blocked. Blocked attempts can be logged for administrators to review.
  • Approving updates: Updating software changes its files and their hashes. The new versions must be approved before they run. Administrators can approve them individually or trust updates from designated sources, such as patch management software or a trusted software publisher.

Enforcement does not need to determine whether a file is malicious. A file that is not on the allowlist is blocked whether it is known malware, a new variant, or legitimate software that has not been approved.

 

Discover Faronics Anti-Executable

Faronics Anti-Executable allows only approved applications to run on workstations and servers. It identifies approved files by hash value, digital signature, and publisher. In maintenance mode, new and updated executables are added to the approved list automatically while administrators install software.

 

Discover Faronics Anti-Executable.

 

FAQs

 

Can Malware Be Modified to Match an Approved Hash?

Not with a secure hash algorithm such as SHA-256. These algorithms are designed so that it is computationally infeasible to find a different file with the same hash as an approved file. This means the computation required is too large to carry out in practice.

 

Does Hash-Based Whitelisting Cover Scripts?

It depends on the tool. Many whitelisting tools can control scripts as well as executable files. Some can approve individual scripts, while others can only allow or block a scripting language as a whole.

 

Where Is Hash-Based Whitelisting Most Practical?

It is most practical on centrally managed devices that run a consistent set of applications, such as kiosk workstations. Devices where users often install new software require more frequent allowlist updates.

 

Does Hash-Based Whitelisting Replace Antivirus?

No. Most whitelisting tools check files stored on disk but do not protect files in memory from being altered or exploited. Whitelisting complements antivirus and other security controls instead of replacing them.

About The Author

Matt Williams

A self-proclaimed ‘tech geek’, Matt has worked in technology for a decade and divides his time between blogging and working in IT. A huge New York Giants fan, expert on Reboot Restore Technology when not watching football Matt gets his game on playing Call of Duty with his friends and other tech bloggers.

Sign Up For A 30-Day Trial

BOXAE

Deep Freeze Enterprise

Centralized deployment and management as well as a host of configuration options for the Enterprise.

  • This field is for validation purposes and should be left unchanged.

Ready to find out more about Faronics? Let us know how to reach you.

We're here to help you in any way possible.