
Find backdoors in FiveM resources before you start them: hidden loaders, remote load(), obfuscated payloads, leaked tokens. CLI, CI step, library.
Checks FiveM resources for backdoors before you start them. It reads .lua and .js files, parses the Lua and looks
for the patterns known FiveM backdoors use: a loader hidden behind thousands of spaces, code downloaded over HTTP and
passed to load(), obfuscated payloads, reads of your license key or RCON password, and tokens left in the files.
It also flags executables and unsafe paths in a package.
Nothing is executed and nothing is uploaded. Same rules as the free browser version on RPScripts, which also takes a ZIP or a whole server folder by drag and drop.
Node.js 18 or newer. No install needed:
npx github:rpScripts/fivem-backdoor-scanner ./resources
Scan a single resource, several folders, a ZIP (up to 300 MB), or get JSON for your own tooling:
npx github:rpScripts/fivem-backdoor-scanner ./resources/[shops]/my_shop ./resources/[jobs]
npx github:rpScripts/fivem-backdoor-scanner ./downloaded-pack.zip
npx github:rpScripts/fivem-backdoor-scanner ./resources --json > report.json
Exit code 0 = nothing found, 1 = findings, 2 = wrong usage, 3 = a scan could not run (missing path, ZIP that is
not readable or over 300 MB). That makes it usable as a CI step:
# .github/workflows/backdoor-scan.yml
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npx --yes github:rpScripts/fivem-backdoor-scanner ./resources
| Code | Severity | Finds |
|---|---|---|
| LAB-SEC-107 | error | Code pushed out of view after 400+ spaces or tabs (the loader trick of a known backdoor family) |
| LAB-SEC-101 | warning | load() / loadstring() on the body of an HTTP response |
| LAB-SEC-102 | warning | load() on text decoded at runtime (string.char, escaped bytes, base64/hex decoders) |
| LAB-SEC-103 | warning | Obfuscated data: long escaped-byte strings, 400+ character base64/hex, long string.char lists |
| LAB-SEC-104 | warning | Reads sv_licenseKey, rcon_password, sv_tebexSecret, or the MySQL string in a file that sends HTTP |
| LAB-SEC-105 | warning | HTTP requests to a public raw IP or to an address decoded at runtime |
| LAB-SEC-106 | warning | os.execute, io.popen, writes outside the own resource, SaveResourceFile into other resources |
| LAB-SEC-108 | warning | A real-shaped Discord bot token, Discord webhook, Cfx license key or GitHub token in the files |
| LAB-PKG-004 | warning | .exe, .dll, .bat, .cmd, .ps1, .sh, .vbs, .jar, .scr in a folder or archive (.dll is expected next to a *.net.dll, a C# resource) |
| LAB-PKG-005 | warning | Archive entry with .., an absolute path or a drive letter: extracting it can write outside the target folder |
Warnings are patterns, not proof: a webhook logger can legitimately call a raw IP. Read the reported line and decide.
An error (LAB-SEC-107) means treat the package as compromised. Every finding carries severity, confidence,
method, a fix text and references; the texts are in rules/catalog.json, versions in
rules/CHANGELOG.md. Rule codes never change meaning.
.fxap folders, compiled
Lua, Lua that did not parse, JavaScript where only the text checks run, files over 2 MB, archives inside the upload).Findings always win over coverage. A clean result covers these patterns only. It does not prove a resource is safe.
+=, ?., <const>, backtick hashes, /* */) is supported..zip, .rar, .7z) are listed, not unpacked. Only .zip is read.node_modules and .git are skipped in a folder scan. stream folders are scanned.import { scanFiles, scanPath, securityRules } from "fivem-backdoor-scanner";
const one = securityRules("server.lua", source); // { findings, parsed }
const report = await scanPath("./resources"); // folder, ZIP or file
const inMemory = scanFiles({ "server.lua": source });
console.log(report.verdict, report.findings);
Found a backdoor the scanner misses, or a false positive in a well-known resource? Open an issue with the pattern (never a live payload or a token); see CONTRIBUTING.md. To report a family without publishing it, see SECURITY.md.
git clone https://github.com/rpScripts/fivem-backdoor-scanner.git
cd fivem-backdoor-scanner && npm ci && npm test
Maintained by RPScripts. MIT licensed. The software is provided "as is", without warranty of any kind.