Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Cheat Lua Encryption

ASecurity

Encrypt/decrypt game cheats and Lua scripts.

2 stars
0 votes
0 copies
0 views
Added 9/19/2026
developmentpythongoc++shellbashgitsecurity

Works with

mcp

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add harezadmm/hermes-brutal-mod --skill cheat-lua-encryption --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cheat Lua Encryption?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Cheat Lua Encryption
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harezadmm-cheat-lua-encryption/badge)](https://www.skillsdirectory.com/skills/harezadmm-cheat-lua-encryption)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: cheat-lua-encryption
description: Encrypt/decrypt game cheats and Lua scripts.
tags: [lua, encryption, obfuscation, game-hacking, protection]
version: 1.0
author: RedMess
license: MIT
---

# Cheat & Lua Encryption/Decryption

## When to Use
Use when encrypting game cheats or Lua scripts to bypass detection, or decrypting obfuscated Lua code.

## Lua Script Encryption

### Simple XOR Encryption
```lua
-- encrypt.lua
function xor_encrypt(data, key)
    local result = {}
    for i = 1, #data do
        local byte = string.byte(data, i)
        local key_byte = string.byte(key, ((i - 1) % #key) + 1)
        table.insert(result, string.char(bit32.bxor(byte, key_byte)))
    end
    return table.concat(result)
end

-- Usage
local script = [[
gg.searchNumber("1000", gg.TYPE_DWORD)
gg.refineNumber("900", gg.TYPE_DWORD)
local r = gg.getResults(10)
for i,v in ipairs(r) do v.value = "999999" end
gg.setValues(r)
]]

local key = "MySecretKey123"
local encrypted = xor_encrypt(script, key)
print("Encrypted:", encrypted)

-- Decrypt and execute
local decrypted = xor_encrypt(encrypted, key) -- XOR is reversible
load(decrypted)()
```

### AES Encryption (Using LuaCrypto)
```lua
-- aes_encrypt.lua
local crypto = require("crypto")

function aes_encrypt(plaintext, key)
    local cipher = crypto.encrypt("aes-256-cbc", plaintext, key, key:sub(1,16))
    return crypto.hex(cipher)
end

function aes_decrypt(ciphertext, key)
    local raw = crypto.unhex(ciphertext)
    return crypto.decrypt("aes-256-cbc", raw, key, key:sub(1,16))
end

-- Usage
local script = "gg.searchNumber('1000', gg.TYPE_DWORD)"
local key = "SuperSecretKey1234567890123456" -- 32 bytes for AES-256
local enc = aes_encrypt(script, key)
print("Encrypted (hex):", enc)

local dec = aes_decrypt(enc, key)
load(dec)()
```

## Lua Bytecode Compilation
```bash
# Compile Lua to bytecode (harder to reverse)
luac -o cheat_encrypted.luac cheat.lua

# Load bytecode in GameGuardian
local chunk = load(io.open("cheat_encrypted.luac", "rb"):read("*a"))
chunk()
```

## Cheat DLL Encryption (Windows)

### RC4 Encrypt C++ Cheat
```cpp
// rc4.cpp
#include <vector>
#include <string>

std::vector<unsigned char> rc4(const std::vector<unsigned char>& data, const std::string& key) {
    std::vector<unsigned char> S(256);
    std::vector<unsigned char> result;
    
    // KSA
    for (int i = 0; i < 256; i++) S[i] = i;
    int j = 0;
    for (int i = 0; i < 256; i++) {
        j = (j + S[i] + key[i % key.length()]) % 256;
        std::swap(S[i], S[j]);
    }
    
    // PRGA
    int i = 0; j = 0;
    for (size_t n = 0; n < data.size(); n++) {
        i = (i + 1) % 256;
        j = (j + S[i]) % 256;
        std::swap(S[i], S[j]);
        result.push_back(data[n] ^ S[(S[i] + S[j]) % 256]);
    }
    return result;
}

// Encrypt cheat function code at runtime
void ExecuteEncryptedCheat() {
    std::string key = "CheatKey2024";
    std::vector<unsigned char> encrypted_code = {/* encrypted shellcode */};
    
    auto decrypted = rc4(encrypted_code, key);
    
    // Allocate executable memory
    LPVOID exec = VirtualAlloc(NULL, decrypted.size(), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
    memcpy(exec, decrypted.data(), decrypted.size());
    
    // Execute
    ((void(*)())exec)();
}
```

## Lua Deobfuscation

### Luraph Deobfuscator
```python
# luraph_decrypt.py
import re

def deobfuscate_luraph(code):
    # Remove junk strings
    code = re.sub(r'local [a-z]+ = ""[^;]+;', '', code)
    
    # Decode string table
    strings = re.findall(r'"([^"]+)"', code)
    for i, s in enumerate(strings):
        code = code.replace(f'_G[{i}]', f'"{s}"')
    
    # Simplify variable names
    vars = {}
    for match in re.finditer(r'local ([a-z_]+) = ', code):
        if match.group(1) not in vars:
            vars[match.group(1)] = f'var{len(vars)}'
    
    for old, new in vars.items():
        code = code.replace(old, new)
    
    return code

# Usage
with open("obfuscated.lua", "r") as f:
    obf_code = f.read()

clean = deobfuscate_luraph(obf_code)
with open("deobfuscated.lua", "w") as f:
    f.write(clean)
```

### Ironbrew Decompiler
```bash
# Clone decompiler
git clone https://github.com/Rerumu/Ironbrew-Deobfuscator
cd Ironbrew-Deobfuscator

# Deobfuscate
lua main.lua input.lua output.lua
```

## Advanced: Polymorphic Lua Loader
```lua
-- polymorphic_loader.lua
function generate_loader(encrypted_script, key)
    local template = [[
local k,e,r="%s","%s",{}
for i=1,#e,2 do 
    local b=tonumber(e:sub(i,i+1),16)
    local kb=k:byte(((i-1)/2%%#k)+1)
    r[#r+1]=string.char(bit32.bxor(b,kb))
end
load(table.concat(r))()
]]
    
    -- Generate random variable names
    local vars = {"k","e","r"}
    for i=1,#vars do
        local new_var = string.char(math.random(97,122))..math.random(100,999)
        template = template:gsub(vars[i], new_var)
    end
    
    return string.format(template, key, encrypted_script)
end

-- Usage: Creates different loader code each time
local enc_script = "48656C6C6F" -- hex encoded
local loader1 = generate_loader(enc_script, "key1")
local loader2 = generate_loader(enc_script, "key1") -- Different code, same result
```

## String Obfuscation for Cheats
```cpp
// obfuscated_strings.h
#define OBFUSCATE(str) []() { \
    constexpr auto encrypted = xor_compile_time(str); \
    return xor_runtime(encrypted); \
}()

// Usage in cheat
const char* cheat_name = OBFUSCATE("MyAwesomeCheat");
const char* proc_name = OBFUSCATE("game.exe");
```

## Pitfalls
1. **XOR detected easily** - Use AES/ChaCha20 for better security
2. **Hardcoded keys** - Store keys remotely or use key derivation
3. **Bytecode still reversible** - Combine with VM protection
4. **Static analysis** - Use runtime decryption only

## Verification
```bash
# Test encryption/decryption
lua encrypt.lua && lua decrypt.lua

# Check if obfuscated Lua runs
lua obfuscated.lua
```

## Related Skills
- lua-deobfuscation
- game-cheat-development
- reverse-engineering-gokil

Attribution

harezadmmharezadmm
View sourceMore from harezadmm →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

281612 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2132 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →