Can “break into” this closed source module I made, and run the method ‘p’.
Here’s some sample code:
local module = require(219856863);
module:GrantAccess(); -- Checks to see if you're allowed to use it
module.p(); -- Will throw a warning and an error if you're not allowed to use it. Should print 'hello world' if you're deemed allowed
This is the code for the module being returned, security aside
local module = {
p = function() print'hello world'; end;
}
So nothing out of the ordinary with the ‘p’ function itself.
More information can be requested but I want [whoever’s attempting this] to know as much as some random person trying to access someone else’s module that they made protected.
I can give a higher/lower bounty if the breach is big/low enough.
It’d be useful to know the place you’re using this module in. It would allow us to attempt to impersonate your game.CreatorId or game.PlaceId.
It may be more secure to hide your methods through the metamethod __index.
If you remove the possibility of people discovering elements in your module by just looping through them, it’ll be harder to use without looking at the source.
I can’t really test this for you right now, but I do know that PlaceId can be edited within studio, so your module could be run if the person had the correct PlaceId. PlaceId cannot be edited of course in an online game, so they couldn’t do too much with your code.
I can’t really test this for you right now, but I do know that PlaceId can be edited within studio, so your module could be run if the person had the correct PlaceId. PlaceId cannot be edited of course in an online game, so they couldn’t do too much with your code.
I’ve edited my above post with a suggestion.[/quote]
Everything you’ve suggested and more were all ready implemented, but I like the way you think. The big issue for me is so it can’t work online.
I’m sure, by the nature of this challenge, that obtaining the source will also qualify for “winning” because the code will then be able to be run online.
No reward necessary. I just hope that you realize patching this particular vulnerability doesn’t mean your module is secure. It just means you’ve patched all the exploits you know about.
I knew about the exploit you presented, I just didn’t perform it myself correctly and wasn’t handling it correctly in the first place. Thanks for the insight though, it’s appreciated.
Edit: Since Seranok didn’t want the reward, anyone else who finds anything has the option to redeem it.
Don’t take this the wrong way, but you guys are terrible at securing your modules.
if game.CreatorId == 78114 or game.CreatorId == 0 or game.CreatorId == 10271988 then
return function() print("you win 8765rfghj") end
else
return function() print("you have not completed the challenge") end
end
Then just set up variables to the objects and remove them from the script:
local stuff = script:FindFirstChild("Stuff")
stuff.Parent = nil
script = nil
-- rest of code
And Echo, your second module is also vulnerable:
script.Parent = nil
Game = newproxy(true)
getmetatable(Game).__metatable = function()
error("Bad boy")
end
return function()
if workspace.Parent.CreatorId == 1273918 then
print("Pass")
else
print("Fail")
end
end