[Tutorial] Alternative Anti-DeAMX using emit
#1

As I was experimenting a bit with emit today, I remembered a guy named "Y_Less" once said, including specific custom amx code using emit might be a way to stop DeAMX.

So i tried, and it really does. I tried to make the #emit code as short and as useless as possible, and this is the result.

pawn Code:
WasteDeAMXersTime()
{
    new b;
    #emit load.pri b
    #emit stor.pri b
}
I thought this loads a value from the variable b and instantly stores it back there (but it does not do that actually), but I am not a AMX coder, just had a few looks on it yet. But at least it does what it should do: nothing. And it also turns the DeAMX result to nothing.

How it works: DeAMX tries to reverse the AMX code by looking for certain patterns. But this code does not match these patterns and causes problems, just like the old array-anti-deamx does.

How to use: add the function to your script, and call WasteDeAMXersTime() in some callbacks or in your main()

pawn Code:
main()
{
    // code
    WasteDeAMXersTime();
}

public OnGameModeInit()
{
    // code
    WasteDeAMXersTime();
}
// etc.
Why use this: There are DeAMX mods that are able to decompile code with the common array-protection, but there arent any for this yet. Im not saying this is more safe, as it is also easily doable to add an exception to DeAMX to work with this, but the big advantage is that this code is easily modifyable. The upper code should just be an example, if you got some minutes, read a bit about #emit and create your own stable emit-antideamx. This way, the guy who wants to decompile your amx has no idea what kind of protection he faces. At this point, the decompiling attempt for script kiddies is already over: They dont know what tool they should download.

You can also use multiple different ones of these in your source, or combine it with the array-anti-deamx. So anyone who wants to decompile it has to go through it part by part to add exceptions for every single one. And I dont think there are lots of people here who could do that.


So, have fun with this, I hope it helps to protect some scripts against stupid kids.

PS: Just a warning/suggestion: ALWAYS back up your script properly. Especially if you might loose the .pwn and need to "decompile" your amx.
Reply
#2

If this Anti-DeAmx working i will use it.

Good Job.
Reply
#3

Nice tutorial!
Reply
#4

Hmm not really a tutorial imo but good.
Reply
#5

Seems to work, I just put it under Main()

Thanks mate
Reply
#6

Didn't work.

I've added that code in main, then I opened DeAmx, and the app completely deamxed my gamemode , there is no protection for amx code.
Reply
#7

Hm, interesting, as it seems to work for at least 2 people here, so you are probably using another version of deamx as i am. Is it the updated version to break the normal anti-deamx?
Reply
#8

I couldn't decompile my script for some reason, even without the code you provided. So I made a blank file to give it a try and it worked. I hope this is a bit more secure compared to the original Anti-DeAmx.

//Edit: Ahh, I found out the problem why I couldn't decompile my script. I thought it has something to do with YSI and I was right.

Quote:
Originally Posted by Y_Less
View Post
There is apparently also code in YSI which prevents scripts from being decompiled besides the methods listed. I do know what the proposed code is but am not going to say to limit the chances of it being "fixed".
Reply
#9

Quote:
Originally Posted by Mauzen
View Post
read a bit about #emit
Where can you do that?
Reply
#10

Quote:
Originally Posted by MadeMan
View Post
Where can you do that?
Quote:
Originally Posted by -RaZoR-
View Post
Where can i find a documentation on emit?
http://www.compuphase.com/pawn/Pawn_...nter_Guide.pdf
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)