Community discussions

MikroTik App
 
PaRaN0iD
newbie
Topic Author
Posts: 28
Joined: Sun Jan 08, 2012 7:46 pm

Protect Your Script against kiddies!

Tue Jan 08, 2013 12:42 pm

Hi Guys

For a while I was looking for protecting my own scripts
against kiddies .So here we go may be it's simple
but your script will be useless to most of them

asm code

:global cont [/system script get "Your Script Name" value-name=source] ;
:global contentLen [ :len $cont ] ;
:if ([:len $cont] = "Your script length") do={
:if ([sy ro g s] = "Mikrotik Router Serial Number converted to HEX (e.g \32\39\33\39\30\31\37\30\45\39\37\36)" do={

#
# Your Script Goes Here 
#

} else={:log error "kiddie!"
}
} else={:log error "Not even kiddie!"
}
First it will check for your script length then check for Mikrotik Router Serial Number
which is unique for every router in Encrypted format (HEX)
If the above conditions Applied then your script will executed
else it will give log warning
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Protect Your Script against kiddies!

Tue Jan 08, 2013 5:51 pm

I'm not sure I get it.

Can you give a concrete sample scenario (with pseudo data of course) where without this, a script kiddie would succeed, and with this, they would fail and/or give up halfway or whatever.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7054
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Protect Your Script against kiddies!

Tue Jan 08, 2013 5:54 pm

That would work for very stupid kiddies :D

But anyway nice idea.
 
nonac
newbie
Posts: 27
Joined: Tue Sep 02, 2014 7:36 pm

Re: Protect Your Script against kiddies!

Thu Sep 25, 2014 2:30 am

can anyone revive the script? it does not work.. where to convert hex? can you give example? thanks im new to mikrotik
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Protect Your Script against kiddies!

Thu Sep 25, 2014 1:24 pm

Run
:put [/sy ro g s]
and see what it outputs.

Whatever that is, place it there at the if.



But, as pointed out already, this so called script... or should I say "script enclosure"... would only protect you from really stupid script kiddies. If someone can view this script's source, they can always just remove the serial number and length checks, and be on their way, as if this enclosure was never there at all. They have to be completely unaware of how scripting works (AND be unwilling to learn) to give up without doing that. And if they have their eye on your script, chances are they're already aware of scripting at least enough to remove such an enclosure.
 
nonac
newbie
Posts: 27
Joined: Tue Sep 02, 2014 7:36 pm

Re: Protect Your Script against kiddies!

Thu Sep 25, 2014 3:50 pm

:put [/sy ro g s]
i tried and nothing happened :shock:
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Protect Your Script against kiddies!

Thu Sep 25, 2014 5:01 pm

Do you have a RouterBoard, or a PC? The above command outputs the serial number of a RouterBOARD. It doesn't work on x86.

Who is online

Users browsing this forum: eldoncito2019 and 29 guests