Lua Protection ( Anti-Virus )!

Hey Developers :cool:

I’m pleased to introduce to you:

Lua Protection V1.0

We spent hours on end to find 100+ viruses and how to detect them with Lua Protection,
This script is great for everyone, from beginners, to advanced developers!

Just flick the toggle button for the plugin and boom! Within a minute, Lua Protection will find, and show you all the info needed to know about the viruses found!

Here’s the script in action!:

Wow! Where can I find this at?

Enjoy your new found plugin, and keep developing!

This is supposed to be very basic, and I don’t think I’ll add anything new to it anytime soon

6 Likes

Is there an option to manually scan? How often does it scan? Can we change anything about it? Where does it scan? What does it scan for?

1 Like

Is there an option to manually scan: I don’t really know what you mean by that, but when you toggle the plugin, it should begin scanning.

How often does it scan: ^^

Can we change anything about it: Unfortunately no… ( For now )

Where does it scan: The whole game?..

What does it scan for: Viruses / Scripts with malicious intent

1 Like

I have viewed the code of the plugin and it simply checks if all the descendants of the datamodel have a name equal to an item in a table. It does not check the contents of any scripts or look for anything with actual malicious intent nor does it take any action, simply returning the total number of items flagged.

I advise you begin to view the source of scripts that attempt to require published modules, or request users to purchase items on the marketplace

2 Likes

Yay, an antivirus thing
Just for people like me who use free models, sometimes

Looks good, but can you show it in action?

2 Likes

Well, decompiling code to detect if it has a malicious purpose, is pretty complex. And I don’ even know if it can be done of roblox, if you know a decompiling devforum, or something like that, please tell me!.

2 Likes

Of course! I’ll add that soon!
Added it! :happy3:

3 Likes

You can check the scripts source with script.Source. A lot of viruses are the same and new ones don’t arise unless of a new vulnerability.

2 Likes

Adding onto what @2jammers has said, you can simply use string.find or string.match, with the latter usually being more powerful. If you’d like to go even further, make a parser generator, copy and paste Luau’s formal grammar, and make an advanced checker.

I don’t get why people name viruses differently. Isn’t a virus supposed to be hidden?

1 Like

If for whatever reason you’d like to keep the name checking code, there is room for significant improvement in performance.

For example, you use an array with 125 names in it, and you iterate over the entire array and you do that to every script in the game. Not going to mention that you don’t break out of the loop if the name matches, or that you don’t use the much simpler table.find, or that you didn’t use dictionaries.

Using a dictionary would be the fastest out of everything I’ve listed. Right now, you index the array 125 times per script. However, with a dictionary, you would be indexing it just once per script. This is a classical improvement which my eyes got used to searching for, whenever I see someone else’s code.

TL;DR: Instead of doing something like this:

local t = {
    "some string",
    "lol",
    "1+1=2"
}
for i, v in ipairs(t)
    if name:lower() == v then
        print("match")
    end
end

you can just do this:

local t = {
    ["some string"] = true,
    ["lol"] = true,
    ["1+1=2"] = true
}
if t[name:lower()] then
    print("match")
end
1 Like

Use script.Source, look for things like require. Most modern viruses use require to load a module they upload somewhere on the toolbox., which can harm your game.

There are other ways virus scripts can work, require is just one of them.

EXTREMELY IMPORTANT: Please keep in mind not all scripts that use require are viruses, do NOT make the script delete them! Scripters use modules all the time, so instead, have the user look through the script instead of completely deleting it!!

2 Likes

I would like to add on to this, not all scripts that use getfenv and setfenv are bad as well. If they use a combination of getfenv() and then call require, that is malicious intent as it is hiding.

1 Like

Yes, that aswell. I forgot to put getfenv in my post