Aray: Deterministic-First Synthesis of Benign Artifacts for YARA Validation
Aray is a deterministic-first system that synthesizes benign, non-malicious artifacts to validate YARA rules, achieving a 97.6% success rate in generating fixtures that match their original rules without requiring access to the underlying malware samples.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of cybersecurity, defenders rely on digital fingerprints to spot dangerous software. These fingerprints, known as rules, describe specific patterns of bytes—tiny pieces of data—that appear in malicious programs. When a computer scans a file and finds a match, it raises an alarm. However, a significant problem arises when security teams need to test these rules. To prove a rule works, they usually need a real piece of malware to trigger it. But storing and moving actual malware is dangerous, expensive, and often impossible in secure environments where internet access is blocked or where data must be kept in isolated vaults. This creates a bottleneck: teams have the rules to catch threats, but they cannot safely test them without risking the very threats they are trying to contain.
A team of researchers has developed a solution that breaks this cycle. They created a tool called Aray, which acts as a builder of safe, harmless test files. Instead of trying to recreate a virus, Aray reads the description of what a virus looks like and constructs a completely benign file that contains only the specific patterns the rule is looking for. Imagine a security guard who needs to check if a metal detector works. Instead of bringing a real gun to the test, which is risky and requires special permits, the guard uses a tool to build a harmless plastic replica that triggers the alarm exactly the same way. Aray does this for digital rules. It takes the complex instructions for a malware signature and assembles a file that satisfies those instructions without containing any of the harmful code, persistence mechanisms, or dangerous behaviors of the original threat.
The researchers tested this approach on a large collection of 416 public security rules. They wanted to see if the tool could successfully build a test file for every rule without needing to touch a single piece of real malware. The process involves two main stages. First, the system analyzes the rule to understand what it needs. Some rules are simple and can be handled entirely by the computer's standard code. Others are more complex, involving patterns that are harder to pin down. For these, the system uses a large language model—a type of artificial intelligence—to suggest how to simplify the rule into something that can be built. Crucially, the researchers designed the system so that the AI never gets to write the final file or access the computer's core systems. The AI only offers suggestions, and the computer's standard code verifies every suggestion before building anything. This ensures that the AI cannot accidentally create something dangerous or break the safety of the system.
The results of the test were highly successful. The system managed to construct valid test files for 406 out of the 416 rules, a success rate of nearly 98 percent. The ten rules that failed were not due to errors in the tool, but because those specific rules asked for things that are mathematically impossible to build, such as a file that must have a specific cryptographic hash of its entire content, which cannot be faked. For the 406 successful cases, the researchers verified that the new files actually triggered the original security rules when scanned. This confirmed that the tool created files that were functionally equivalent to the dangerous ones for the purpose of testing, but were entirely safe to store, move, and use in disaster recovery drills.
What makes this work particularly significant is how it handles the relationship between the artificial intelligence and the final output. In many modern systems, AI is allowed to generate code or files directly, which can lead to unpredictable or unsafe results. Aray takes a different path. It treats the AI as a consultant that can only propose ideas, while the actual construction is done by rigid, predictable computer programs that follow strict rules. The researchers even set up a safety check where the AI was told to connect to a server that did not exist. If the AI tried to reach out, the test would fail immediately. The system passed this check perfectly, proving that the AI never attempted to bypass the safety boundaries during the entire process. This separation of duties allows the system to use the creativity of AI to solve difficult problems while keeping the dangerous parts of the process under strict, deterministic control.
The implications for security operations are practical and immediate. Organizations that scan files uploaded to cloud storage or those that need to test their disaster recovery plans can now do so without maintaining a library of live viruses. They can generate a safe test file on demand, upload it to a test environment, and verify that their detection systems work correctly. If a system fails to detect the test file, the team knows they have a problem with their rules or their scanner, and they can fix it before a real attack occurs. This removes the need to keep dangerous malware in every testing environment, reducing the risk of accidental leaks and the cost of maintaining isolated, secure labs. The tool does not claim to solve every possible security problem or to understand every nuance of every virus, but it provides a reliable, auditable way to turn a digital threat description into a safe, testable object.
The researchers were careful to define the limits of their work. They did not prove that their tool could handle every single type of security rule in existence, nor did they claim that the files it creates are the only possible versions of a match. Instead, they demonstrated that for a vast majority of common rules, the tool can reliably produce a witness—a single file that proves the rule works. They also showed that the process is transparent; every step from the original rule to the final file can be traced and verified. By keeping the AI in a supporting role and letting standard code drive the construction, they created a system that is both powerful and safe. This approach offers a new way forward for cybersecurity testing, allowing teams to validate their defenses with confidence without ever needing to handle the dangerous artifacts they are designed to stop.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.