Bypass Roblox userdata readonly restrictions – while tracking and monitoring all environment behavior in Lua.
- Overview
- Features
- Installation
- Usage
- API Reference
- How It Works
- Example Monitored Log Output
- Performance Considerations
- Contributing
- License
This Lua module is designed for Roblox environments and allows developers to:
- Bypass readonly restrictions on Roblox userdata fields (e.g.,
game.CreatorId) - Continuously monitor all access and modifications to Roblox objects, functions, and properties
- Detect, log, and analyze data exfiltration or unauthorized access behaviors
- Build a secure, observable execution environment for scripts
Note: This module facilitates security research and development, not hacking or misuse!
- Readonly Bypass: Access and manipulate properties normally blocked by Roblox's metatable protections.
- Full Access Monitoring: Track every get, set, function call, and object creation in your scripts.
- Detailed Exfiltration Logs: Every monitored event is timestamped and contextualized for security audits.
- Exportable Logs: Output logs in JSON or pretty ASCII table for post-analysis.
- Custom Env Emulation: Create locked-down, monitored script environments with custom function replacements.
- Add this module as a ModuleScript in your Roblox game.
- Require the module in your controlling scripts:
local SecurityMonitor = require(path.to.SecurityMonitorModule)-- Initialize and wrap your script environment
local secureEnv = SecurityMonitor.Init({})
-- To monitor a specific script in isolation:
setfenv(targetScript, secureEnv)-- Directly access or modify Roblox protected fields (e.g., CreatorId)
local creatorId = secureEnv.game.CreatorId -- Will be intercepted and accessible!
secureEnv.game.CreatorId = 133742-- Enable immediate log display for each monitored event:
SecurityMonitor.EnableAutoDisplay()
-- Print a formatted log at any time:
SecurityMonitor.PrintExfiltrationLog()
-- Export the entire log in JSON format:
local json = SecurityMonitor.ExportExfiltrationLog()local customHttpService = SecurityMonitor.Emulate_Libraries(game:GetService("HttpService"), {
RequestAsync = function(params)
-- your custom networking stub here
end
})| Function | Description |
|---|---|
Init(customData) |
Initializes a monitored environment for your scripts. |
Emulate_Libraries(original, custom) |
Wraps Roblox libraries and overrides their methods for custom behavior and monitoring. |
Emulate_Lua_Functions(map) |
Spoofs/replaces global Lua functions (like print) within the monitored environment. |
Overwrite_Environment(newEnv) |
Swaps the current script environment for a new one. |
ClearCache() |
Clears all internal proxy caches, freeing memory. |
EnableAutoDisplay() |
Automatically displays log entries in real time. |
DisableAutoDisplay() |
Turns off real-time log display. |
PrintExfiltrationLog() |
Print a pretty-formatted ASCII log of all monitored actions. |
ExportExfiltrationLog() |
Get the entire event log as a JSON string. |
ClearExfiltrationLog() |
Remove all entries from the event/exfiltration log. |
GetExfiltrationCount() |
Returns the total number of tracked actions/events so far. |
-
Bypassing Readonly Restrictions: This module injects proxy objects and metatable overrides that allow property access and modification even on fields Roblox usually marks as readonly (e.g.,
game.CreatorId). -
Access Monitoring: Every get, set, or method call on Roblox objects, instances, or libraries is tracked, logged, and made observable by the module.
-
Proxy Creation: When a Roblox Instance/function is accessed, a unique proxy object is created. This proxy intercepts all standard metamethods (
__index,__newindex,__call, etc.), enabling both logging and readonly-bypass logic. -
Custom Environments: Initialize execution environments that wrap globals, intercept libraries, and allow per-script tracking and function replacement.
-
Data Exfiltration Logging: Each access is timestamped, contextualized (path, action, value, etc.), and can be displayed in real-time (auto-display) or exported for post-mortem review.
┌─────┬───────────────────┬──────────────────────────┬──────────────────────────────────┬────────┬───────────────────────────────────────────────────────┐
│INDEX│TIMESTAMP │OBJECT PATH │ACTION │TYPE │VALUE │
├─────┼───────────────────┼──────────────────────────┼──────────────────────────────────┼────────┼───────────────────────────────────────────────────────┤
│1 │2025-04-23 18:41:02│Environment │EnvAccess │index │game │
├─────┼───────────────────┼──────────────────────────┼──────────────────────────────────┼────────┼───────────────────────────────────────────────────────┤
│2 │2025-04-23 18:41:02│Game.GetService │LibAccess │function│function: 0x6e19b198bcd7ff1b │
├─────┼───────────────────┼──────────────────────────┼──────────────────────────────────┼────────┼───────────────────────────────────────────────────────┤
│3 │2025-04-23 18:41:02│HttpService.GetAsync │LibAccess │function│function: 0x07fb3122d000609b │
├─────┼───────────────────┼──────────────────────────┼──────────────────────────────────┼────────┼───────────────────────────────────────────────────────┤
│4 │2025-04-23 18:41:02│HttpService.GetAsync │LibFuncCall │function│args:{ https://example.com } │ ▶ {...} -- << args
├─────┼───────────────────┼──────────────────────────┼──────────────────────────────────┼────────┼───────────────────────────────────────────────────────┤
│5 │2025-04-23 18:41:03│HttpService.GetAsync │LibReturn │string │<!doctype html> │
└─────┴───────────────────┴──────────────────────────┴──────────────────────────────────┴────────┴───────────────────────────────────────────────────────┘
- There is some performance overhead due to proxy and metatable interception on every property and function access.
- Use
ClearCache()andClearExfiltrationLog()to manage memory during long sessions. - To reduce impact, only wrap scripts or libraries that truly require monitoring/bypass.
- All content is laid out without scrollbars or extra breaks for PDF-friendly continuous export.
- Fork this repository and create a new feature branch.
- Make changes and add tests where appropriate.
- Submit a pull request with a clear description of your changes.