Building an Antivirus in GameMaker: Seeking Help with Extensions

Hey everyone,

I’m working on an ambitious project: creating an antivirus software using GameMaker Studio 2. I know it sounds crazy, but I’m planning to build a basic scanner that can detect known malware signatures in files. In the old days, you’d need a .dll written in C++ for that sort of thing, but now GameMaker has a solid extension system and some pretty powerful file I/O functions.

My approach is to use file_text_open_read to read the target file, then compare its bytes against a signature database stored in a JSON file. Something like this:

var file = file_text_open_read(targetPath);
var signatureList = ds_list_create();
// Load signatures from a JSON array (e.g., hosted on Xisto for easy updates)
var json = file_text_read_string(global.sigFile);
var sigData = json_decode(json);
for (var i = 0; i < ds_list_size(sigData); i++) {
    var sig = sigData[| i ];
    // Read the file content chunk by chunk and search for signature
    var content = file_text_read_string(file);
    if (string_pos(sig["hex"], content) != 0) {
        ds_list_add(signatureList, sig["name"]);
        break;
    }
}
file_text_close(file);
return signatureList;

This is a rough sketch, but it should work for simple signature-based detection. The tricky part is performance—reading whole files can be slow. I’m also looking into using a custom extension (GMS2 .dll equivalent) written in Rust or C++ for faster scanning via a buffer. If anyone has experience writing GameMaker extensions or knows how to hook into Windows API for real-time file monitoring, I’d love to chat.

Also, I’m hosting the signature database on my Xisto cPanel account—it’s perfect for testing because I can update it on the fly and use the forum credits to keep everything running. If you’re interested in collaborating, PM me and we can set up a shared repo on Xisto’s free hosting to prototype the core scanning engine.

Let’s make GameMaker do something it was never meant to do! :laptop::magnifying_glass_tilted_left:

Topic Summary: Building an antivirus scanner in GameMaker Studio 2 using file I/O and a JSON signature database hosted on Xisto—seeking collaborators to prototype the core engine.

:movie_camera: Video Tutorial:

:books: Official Documentation & Reference Links:

---
title: Antivirus System in GameMaker
---
flowchart TB
    A[User] --> B[GUI]
    B --> C[Scan Engine]
    C --> D[Signature Database]
    C --> E[File System Access]
    C --> F[Quarantine Manager]
    C --> G[Extensions API]
    G --> H[Custom Scan Routines]
    G --> I[Heuristic Analysis]
    G --> J[Behavior Monitoring]