DeFexNN/LumenInjector

GitHub: DeFexNN/LumenInjector

基于 AndLua 的模块化 Android 游戏增强框架,通过加密 ELF 模块、跨进程内存读写与 OpenGL ES overlay 实现运行时游戏修改功能。

Stars: 1 | Forks: 0

# 💉 Lumen Injector — 模块化 Android 游戏增强框架 一个原生的 Lua Android 应用框架,用于运行时游戏增强,具备模块化加密 payload 传输、实时 ESP 渲染、root 级别进程操作以及服务器端账户管理功能。 基于 **AndLua**(Lua-on-Android)、原生 ARM64 ELF 二进制文件 (NDK)、自定义 OpenGL ES overlay 渲染以及受密码保护的 ZIP 模块分发构建。 ## 理念 Lumen Injector 是一次 **在受限环境下实现极致模块化** 的实践。整个应用程序——包括 UI、网络、文件 I/O、overlay 渲染——均使用运行在 AndLua Android 框架上的 Lua 编写。每个游戏作弊模块都是独立的加密 ZIP 模块,包含其自身的原生 ELF 二进制文件,并在运行时加载和执行,实现进程级别的隔离。 该架构展示了: - **Lua 作为一流的 Android 语言** — 从 Lua 完全访问 Android API - **热插拔模块** — 无需更改主应用即可添加/删除作弊模块 - **进程间渲染** — ESP overlay 通过文件系统 IPC (`/sdcard/a.log`) 与原生扫描器通信 - **感知 ROM 的反检测** — 针对 5 大 Android OEM 厂商的窗口标题伪装 ## 架构 ``` ┌─────────────────────────────────────────────────────────────────┐ │ Lumen Injector (AndLua) │ │ │ │ ┌──────────┐ ┌──────────────┐ ┌──────────────────────────┐ │ │ │ Login UI │ │ Cheat Menu │ │ ESP Overlay │ │ │ │ Server │ │ Toggle Panel │ │ Box · Line · Info · HP │ │ │ │ Auth │ │ 5 Tab Pages │ │ Back-Alert · Damage FX │ │ │ └────┬─────┘ └──────┬───────┘ └────────────┬─────────────┘ │ │ │ │ │ │ │ ┌────┴───────────────┴───────────────────────┴──────────────┐ │ │ │ Core Engine │ │ │ │ ZIP Decrypt → chmod 777 → su -c [ELF] → rm -rf cleanup │ │ │ └───────────────────────────────────────────────────────────┘ │ └──────────────────────────────────────────────────────────────────┘ │ │ /sdcard/a.log /sdcard/stop │ │ ┌───────┴──────────┐ ┌──────────┴──────────────────────────────┐ │ Native ESP │ │ Native Cheat ELF (per module) │ │ Scanner (draw) │ │ │ │ │ │ /proc/[pid]/mem → game state → patch │ │ ▪ Find game PID │ │ process_vm_readv / writev │ │ ▪ Parse maps │ │ libunity.so / libil2cpp.so hooks │ │ ▪ Scan memory │ │ │ │ ▪ Write CSV log │ │ Modules: fps, speed, antideath, │ │ │ │ walls, teleport, soul, sleep... │ └───────────────────┘ └───────────────────────────────────────┘ ``` ## 代码示例 ### 模块化作弊执行 (Lua) ``` -- Each cheat is an independent encrypted ZIP → ELF → execute → cleanup function ExecuteELF(file) local path = activity.getLuaDir(file) if os.execute("su") then os.execute("su -c chmod 777 " .. path) Runtime.getRuntime().exec("su -c " .. path) -- root execution else os.execute("chmod 777 " .. path) Runtime.getRuntime().exec(path) -- non-root fallback end end -- Cheat toggle: decrypt ZIP, execute ELF, cleanup function speed.onClick() if speed.checked then zip4j.unZipDir( activity.getLuaDir("/cpp/speed.zip"), activity.getLuaDir("Files/"), "encrypted_password_here") -- hardcoded ZIP password ExecuteELF("Files/speed/speed_on") Safe() -- rm -rf data/data//files/Files end end ``` ### ESP 渲染引擎 (Lua) ``` -- Continuous rendering loop reading parsed enemy data from native scanner mDraw = LimoDrawable{ view = window, onDraw = function(view, canvas, paint, self, fps, data) for line in io.lines("/sdcard/a.log") do local parts = string.split(line, ",") -- Parse: x, y, w, h, distance, hp, isBot, team, downHp, name local x, y, w, h = tonumber(parts[1]), tonumber(parts[2]), tonumber(parts[3]), tonumber(parts[4]) local distance = tonumber(parts[5]) local hp = tonumber(parts[6]) -- Draw box ESP around enemy canvas:drawRect(x - w/2, y - h, x + w/2, y, paint) -- Draw health bar local barHeight = h * (hp / 100) canvas:drawRect(x - w/2 - 4, y - h + barHeight, x - w/2 - 2, y, healthPaint) -- Draw distance + name canvas:drawText(string.format("%.0fm %s", distance, parts[10]), x, y - h - 4, textPaint) end end } ``` ### 感知 ROM 的 Overlay 反检测 (Lua) ``` -- Spoof window title per ROM to mimic system screen recorder apps function setWindowTitle() if RomUtil.isMiui() then window.title = "com.miui.screenrecorder" elseif RomUtil.isEmui() then -- Huawei window.title = "ScreenRecoderTimer" elseif RomUtil.isVivo() then window.title = "screen_record_menu" elseif RomUtil.isOppo() then -- ColorOS window.title = "com.coloros.screenrecorder.FloatView" elseif RomUtil.isFlyme() then -- Meizu window.title = "SysScreenRecorder" end end ``` ### 原生内存扫描器 (C++ ELF) ``` // Native ARM64 scanner that finds game process, reads memory, and // writes parsed enemy coordinates to /sdcard/a.log for Lua ESP renderer. // Find game PID by scanning /proc/*/cmdline for package name pid_t find_game(const char* pkg_name) { DIR* proc = opendir("/proc"); struct dirent* entry; while ((entry = readdir(proc))) { if (!isdigit(entry->d_name[0])) continue; char cmdline[256] = {0}; snprintf(path, sizeof(path), "/proc/%s/cmdline", entry->d_name); // ... read cmdline, compare with pkg_name } } // Parse /proc/[pid]/maps to find libunity.so or libil2cpp.so uintptr_t find_module_base(pid_t pid, const char* module) { char maps_path[64]; snprintf(maps_path, sizeof(maps_path), "/proc/%d/maps", pid); // ... parse lines, find module, return base address } // Use process_vm_readv syscall for cross-process memory access ssize_t vm_read(pid_t pid, void* remote_addr, void* local_buf, size_t size) { struct iovec local = {.iov_base = local_buf, .iov_len = size}; struct iovec remote = {.iov_base = remote_addr, .iov_len = size}; return process_vm_readv(pid, &local, 1, &remote, 1, 0); } ``` ### 服务器端账户管理 ``` -- Login POST with device fingerprint + account expiry tracking function login(username, password) Http.post("https:///auth.php", "username=" .. username .. "&password=" .. password .. "&uuid=" .. Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID) .. "&manufacturer=" .. Build.MANUFACTURER .. "&model=" .. Build.MODEL, function(code, response) if string.find(response, "Login success") then -- Save key, show cheat menu SharedPreferences.Editor.put("key", key) showMenu() startCountdown(expiry_time) -- premium account countdown end end) end ``` ## 版本 2 新功能 ``` cpp/huligan/ ├── TroughWallsON.zip ← Walk through walls ├── cargo.zip ← Cargo teleport ├── farm.zip ← Fast resource farming ├── fastknife.zip ← Instant knife attack ├── high.zip ← High jump ├── long.zip ← Long jump ├── sleep.zip ← Enemy sleep mode └── soul.zip ← Soul hack ``` ## 技术栈 | 层级 | 技术 | |-------|-----------| | 框架 | **AndLua** (Lua-on-Android,可完全访问 Android API) | | UI DSL | AndLua 声明式布局 (`.aly`) + 内联 Lua 表 | | 原生代码 | **C/C++ 结合 Android NDK r17c**,ARM64 (aarch64) | | 图形 | **OpenGL ES 3.0** (libGLESv3, libEGL) 用于 ESP overlay | | 内存访问 | `/proc/[pid]/maps`, `/proc/[pid]/mem`, `process_vm_readv`, `process_vm_writev` | | 游戏引擎 | **Unity** (`libunity.so`, `libil2cpp.so`) | | 网络 | Lua `Http` 模块,PHP 后端 | | ZIP 处理 | `zip4j` (桥接到 Lua 的 Java 库) | | 权限 | 57 项 Android 权限(overlay、frame buffer、root 等) | *"我们信仰 Lua。我们执行 ELF。"*
标签:Android, DNS 反向解析, DSL, ELF加载, JS文件枚举, Lua, NDK开发, OpenGL ES, rizin, UML, 安卓游戏框架, 游戏外挂