Community discussions

MikroTik App
 
newuser69
just joined
Topic Author
Posts: 17
Joined: Mon Feb 06, 2017 6:16 am

Hostname Shield (hotspot Mac spoof-clone) updated

Tue Jan 02, 2018 10:18 am

#delete all mac cookies before adding script
Onlogin script will detect the user host-name+mac format .. and add it to a firewall list if the user only log-ed in by HTTP chap - pap or HTTP cookie
if user log-ed in by mac cookie the script will compare hostname+mac with the list and remove user if not in list
very good vs mac spoof
here is the script
{
:delay 500ms
:local x $user;
:local y [/ip hotspot active get [find user=$x] address];
:local f [/ip hotspot host get [find to-address=$y] address];
:local c [/ip hotspot active get [find user=$x] login-by];
:local b "http-pap";
:local k "http-chap";
:local v "cookie";
:local n [/ip dhcp-server lease get [find active-address=$f] host-name];
:local s [/ip dhcp-server lease get [find active-address=$f] mac-address];
if (c = b || c = k || c = v) do={
:log warning "Hostname Shield - $x Login is valid"
if ( [ :len [ ip firewall address-list find where list="$n$s" ] ] = 0 ) do={
/ip firewall address-list add list="$n$s" comment=$user }} else={
if ( [ :len [ ip firewall address-list find where list="$n$s" ] ] > 0 ) do={ :log warning "Hostname Shield - Login is valid" } else={ip hotspot active remove [find user=$x]
:log warning "Hostname Shield -login not allowed "
/ip firewall address-list add list="$user - Account" comment="$n - $s - Hacked account"
}}}
##added hostname and mac combo to overcome devices with duplicated hostname plus spoofed mac and account list entry
You do not have the required permissions to view the files attached to this post.
Last edited by newuser69 on Sun Jan 14, 2018 3:58 am, edited 7 times in total.
 
User avatar
ADahi
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Sep 21, 2017 7:16 pm
Location: Iraq, Ninavah
Contact:

Re: Hostname Shield (hotspot Mac spoof-clone)

Tue Jan 02, 2018 9:09 pm

uncheck Login by: MAC
may be easier solution
You do not have the required permissions to view the files attached to this post.
 
newuser69
just joined
Topic Author
Posts: 17
Joined: Mon Feb 06, 2017 6:16 am

Re: Hostname Shield (hotspot Mac spoof-clone)

Wed Jan 03, 2018 5:47 am

uncheck Login by: MAC
may be easier solution
Thats not a solution !
most hotspot providers still prefer mac cookie logins because clients don't like writing the account credentials each time they connect to the hotspot
Last edited by newuser69 on Sun Jan 14, 2018 3:47 am, edited 2 times in total.
 
man0with0cap
just joined
Posts: 1
Joined: Mon Jan 08, 2018 2:20 pm

Re: Hostname Shield (hotspot Mac spoof-clone)

Mon Jan 08, 2018 2:26 pm

thanks for script
but can you add exception for samsung mobile because new samsung have same host name like Galaxy-J5-Prime , Galaxy-A5-2016 ..etc
 
newuser69
just joined
Topic Author
Posts: 17
Joined: Mon Feb 06, 2017 6:16 am

Re: Hostname Shield (hotspot Mac spoof-clone)

Sun Jan 14, 2018 3:24 am

thanks for script
but can you add exception for samsung mobile because new samsung have same host name like Galaxy-J5-Prime , Galaxy-A5-2016 ..etc
added hostname and mac combo so there will be no duplicate in the list
 
User avatar
mohmadtnnari
just joined
Posts: 9
Joined: Sun Jan 17, 2016 11:46 pm
Location: syria-idleb
Contact:

Re: Hostname Shield (hotspot Mac spoof-clone) updated

Sun Jan 14, 2018 7:38 pm

plz give me your number on telegram or whatsapp
Last edited by mohmadtnnari on Sun Jan 14, 2018 7:45 pm, edited 1 time in total.
 
User avatar
mohmadtnnari
just joined
Posts: 9
Joined: Sun Jan 17, 2016 11:46 pm
Location: syria-idleb
Contact:

Re: Hostname Shield (hotspot Mac spoof-clone) updated

Sun Jan 14, 2018 7:39 pm

but we need script for remove User from address when logout from active

Who is online

Users browsing this forum: No registered users and 5 guests