MUMID17 - MikroTik Hotspot Audit & Hardening PDF
MUMID17 - MikroTik Hotspot Audit & Hardening PDF
MUMID17 - MikroTik Hotspot Audit & Hardening PDF
2
Objective #NoOffense #Censored
3
What We Need To Do?
4
What is Firewall?
- Wikipedia, https://en.wikipedia.org/wiki/Firewall_(computing)
5
What is Firewall?
6
What is Network Security
- Wikipedia, https://en.wikipedia.org/wiki/Network_security
7
Before we go to hotspot, we need to audit our router
Oopss sorry, I mean before doing a setup
8
MikroTik Router Login – User
9
MikroTik Router Login – Groups
10
MikroTik Router Login – Active Users
11
MikroTik Router Login Policies
12
MikroTik Router Config Policies
• ftp - policy that grants full rights to log in remotely via FTP and to
transfer files from and to the router.
• reboot - policy that allows rebooting the router
• read - policy that grants read access to the router's configuration.
All console commands that do not alter router's configuration are
allowed. write - policy that grants write access to the router's
configuration, except for user management.
• policy - grants user management rights. Should be used together
with write policy.
• test - policy that grants rights to run ping, traceroute, bandwidth-
test, wireless scan, sniffer, snooper and other test commands
• sensitive - to see sensitive information in the router
• sniff - to use packet sniffer tool.
• romon - accessing romon
13
MikroTik Access Login Service
14
Port Service Change & Whitelist
• Activate Only What You Need & Don’t Use Default Port
• Port: The port particular service listens on
• Available From: List of IPv4/IPv6 prefixes from which the service is
accessible.
15
Login Comparison
16
MikroTik Neighbor Discovery
17
MikroTik Neighbor Discovery
18
MikroTik MAC-Server
19
Turn off Router Public Services
• Besides SSH, Telnet, WinBox, API, FTP, WWW. Router
also have commonly public services like:
• Recursive DNS Server
• You must disable this services before you got DNS Amplification
attack, more about DNS Amplification is available from MUM
Indonesia 2014: Filtering DNS Amplification
https://www.youtube.com/watch?v=wd0LQcJ1j-c&t=80s
• Web Proxy
• You must disable this services before someone use this services to
use your internet connection, for the example i have IIX
connection 10Gbps only and You have 1Gbps to International and
10Gbps to IIX, I can do web proxy to you (without authentication)
and i can enjoy your High Speed International Connection
• Bandwidth Test Server
• Bandwidth Test Server is a feature to allow anyone to test how
much their throughput and generate real traffic to the server
20
Turn off Router Vulnerable Public Services
21
Protect The Physical
22
Protect The Physical
• Protected bootloader
https://wiki.mikrotik.com/wiki/Manual:RouterBOARD_setting
s#Protected_bootloader
• EXTREMELY DANGEROUS, will disabled reset button &
netinstall. If you forget the RouterOS password, the only
option is to perform a complete reformat of both NAND and
RAM with the following method, but you have to know the
reset button hold time in seconds.
23
Protect The Physical
• Power Redundancy
24
Other Things To Do
25
Are we done? I don’t know
hackers always have an unexpected things
But, let’s continue to hotspot
26
MikroTik Hotspot
The MikroTik HotSpot Gateway provides authentication for clients before access to
public networks .
- HotSpot Gateway features:
1. different authentication methods of clients using local client database on the
router, or remote RADIUS server
2. users accounting in local database on the router, or on remote RADIUS server
3. walled-garden system, access to some web pages without authorization
4. login page modification, where you can put information about the company
5. automatic and transparent change any IP address of a client to a valid address
https://wiki.mikrotik.com/wiki/Manual:IP/Hotspot
27
How MikroTik Hotspot Works?
28
MikroTik Hotspot Component
1. Firewall Filter
2. Firewall NAT
3. Firewall Mangle
4. DHCP Server + IP Pool
5. Proxy Server
6. DNS Server
7. Queue
29
Next to MikroTik Hotspot Security
30
If you know the enemy and know
yourself you need not fear the
results of a hundred battles
- Sun Tzu
31
MikroTik Hotspot Authentication Method
• MAC Cookie
• HTTP CHAP
• HTTP PAP
• Cookie
• HTTPS
• MAC
• Trial
32
Password Authentication Protocol (PAP)
1. Username : mum_takeuchi
Password : mum2k17_takeuchi
2. Accept/Reject
33
Challenge Authentication Handshake Protocol (CHAP)
1. Initiate
3. Response
2. Challenge
4. Accept/Reject
34
HyperText Transfer Protocol Secure (HTTPS)
35
HTTP Cookie (First Time Login)
1. Login (PAP/CHAP)
2. set-cookie:
loginID=3356857343
36
HTTP Cookie (Login Again)
1. cookie: loginID=3356857343
2. Accept
37
MAC Cookie (First Login)
1. Login (PAP/CHAP)
38
MAC Cookie (Login Again)
1. Device UP
2. Accept
if there is a mac cookie record
39
MAC
1. Device UP
2. Accept
if match with user database
40
Trial
2. Accept
41
MikroTik Router & Hotspot Audit
42
MikroTik Router & Hotspot Hardening
44
MikroTik Router & Hotspot Penetration Test Step
1. Information Gathering
(neighbor discovery is also powerful )
2. Try default router login information
3. See your neighbor
4. Try to be your authenticated neighbor by using :
1. Hotspot MAC Clone (can use TMAC & macchanger)
2. Login Information Sniffing (can use wireshark)
3. Cookie Stealing (can use wireshark)
5. Brute Force (can use brutus)
Don’t forget to make a documentation for report
45
MikroTik Hotspot Auth. Packet (HTTP PAP)
username=mum_takeuchi&password=mum2k17_takeuchi
46
MikroTik Hotspot Auth. Packet (HTTP CHAP)
username=mum_takeuchi&password=d5b8bceabcee921685cc7f1bdd335814
47
MikroTik Hotspot Auth. Packet (HTTP CHAP)
https://www.md5decrypter.com
48
MikroTik Hotspot Auth. Packet (HTTP CHAP)
https://md5hashing.net/hash/md5/
49
MikroTik Hotspot Auth. Packet (HTTPS)
Encrypted
50
MikroTik Hotspot Auth. Packet (HTTPS)
Encrypted
51
MikroTik Hotspot Auth. Packet (HTTP Cookie)
Cookie: loginID=3356857343
52
MikroTik Hotspot Auth. Packet (Trial)
login?dst=&username=T-02%3AE2%3AFD%3ADE%3ADA%3A67
53
MikroTik Hotspot Auth. Packet (MAC/MAC Cookie)
54
Summary
Secure ≠ Easy
55
Book Reference – MikroTik Hotspot Server
56
Link Reference
• https://wiki.mikrotik.com/wiki/Manual:Hotspot_Introduction
• https://wiki.mikrotik.com/wiki/Manual:IP/Hotspot
• http://mikrotik.co.id/artikel_lihat.php?id=125
• https://mum.mikrotik.com/archive
• https://en.wikipedia.org/wiki/Password_Authentication_Protocol
• https://en.wikipedia.org/wiki/Challenge-
Handshake_Authentication_Protocol
• https://en.wikipedia.org/wiki/HTTP_cookie
• http://www.ilmuhacking.com/cryptography/understanding-https/
57
Feel So Hard To Securing, Auditing, Hardening Your Network?
58
Any Questions?
59
60