We faced here a problem called "Fake mikrotik servers"
hackers install mikrotik on virtual machine and run it in our
wlan's with proper settings he can sniff out PPPOE secrets
So I wrote this script with assisstance of this great forum
to detect any rouge mikrotik server and kick it out
Code: Select all
##############################
# # Fake MikroTik Killer #
# # BY: lnuxxunl #
# # Thank's jcem For support #
##############################
:local int;
:local machack;
:local var;
:local var1;
/ip neighbor discovery enable ether2 ;
:foreach int in=[/ip neighbor find] do={
:local machack [/ip neighbor get $int value-name=mac-address]
:if ([/ip neighbor get $int value=platform ] = "NS2" || [/ip neighbor get $int value=platform ] = "NS5" || [:len [/int w access-list find mac-address="$machack"]] > 0 ) do={
:nothing;
} else={ :local var [/ip neighbor get $int value-name=platform ];
:local var1 [/ip neighbor get $int value-name=version ];
/int w access-list add mac-address=$machack authentication=no forwarding=no;
/ip fire filter add chain=forward src-mac-address=$machack action=drop;
:log warning ( $var . $var1 . " Fake Server BlockeD!");
}
}
Here is how it work
http://youtu.be/dS5y0Fnm9r4
It's my first script so I accept any suggestions
any notes guys
Fore give me for my bad english
Thank you