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
##############################
# # 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!");
}
}
Notice: you must change “ether2” in script to your proper wireless or wire card
I agree that your script could work - but simply turning off his IP neighbour discovery would prevent your from blocking him.
I’d suggest you look into client isolation. Turning that on at the AP level will prevent the person from seeing other broadcasts – if that’s not an option you could look at the L2 (bridge) firewalling to prevent the PADI and PADR being sent back to the wlan. In addition you could block wlan clients from sending PADO or PADS towards the AP.
If you run a central PPPoE with multiple APs that complicates matters but you could still apply the L2 firewalling and/or look into switches (such as some of the HP ones) that apply client isolation on a port level.
Thank you for your these intersted info. for some reason all of this not preventing the fake virtual Mikrotik activity
ya right if the attacker turning neighbor discovery the script become useless. So I chose another variable
which is the fake PPPOE server itself take a look to this one: