prometheus-lua / Prometheus

Lua Obfuscator written in pure Lua
https://levno-710.gitbook.io/prometheus/
GNU Affero General Public License v3.0
234 stars 69 forks source link

[BUG] Script obfuscated with strong preset is always failing to execute inside Roblox environment! #163

Open Infraction7 opened 9 months ago

Infraction7 commented 9 months ago

So the bug is pretty weird so when trying to run obfuscated with strong preset script in roblox env it fails with error: attempt to call a nil value

Steps to reproduce:

  1. Obfuscate anything to run in roblox using strong preset (i used CLI)
  2. Place obtained script to a script in roblox studio and publish place then go to roblox serer
  3. Open console and you shall see an error

Screenshot: [Host]

Source script that is being obfuscated: (don't mind im obfuscating random things that shouldn't be obfuscated im just playing around)

local Scripts = game:GetService("ServerScriptService")["Server"]

for _, module in pairs(Scripts:GetChildren()) do
    if module:IsA("ModuleScript") then
        task.spawn(require(module))
    end
end
SpinnySpiwal commented 9 months ago

me when vm antitamper

9382 commented 7 months ago

To be specific, the AntiTamper step (this has nothing to do with the VM) relies on debug.getinfo, which doesn't exist in the LuaU library. LuaU does have debug.info, which works slightly differently. I might make a PR soon to support this difference

9382 commented 7 months ago

Turns out fixing this is harder than I thought, since AntiTamper will avoid hard erroring if debug.sethook doesn't exist, but requires it to exist so that we don't become invalid anwyays. We should probably either just not try specific anti tamper logic if missing the functions it depends on or check beforehand and give a clear error message if missing stuff to avoid future issues like these

SpinnySpiwal commented 4 months ago

no because that opens a loophole to bypass it

levno-710 commented 3 months ago

Adding the --LuaU command line option should in theory disable the parts of anti-tamper, that are not compatible with Roblox LuaU.