Actions

Router and Local Area Network Security


Introduction[edit]


Based on the threat posed by a Whonix-Gateway compromise, users who have administrator control over the home network are strongly recommended to lock down the web interface of the home router and apply the strictest settings possible.

The State of Router Insecurity[edit]

Most routers provided by ISPs and those widely available in electronics stores are profoundly insecure, have outdated software and firmware, enable settings by default that open exploit opportunities, and remain vulnerable if users fail to take appropriate steps. [1]

Many experienced users who are concerned about computing security overlook these problems and instead focus on general operating system and networking solutions, rather than this weak endpoint frequently targeted by attackers, including state-level adversaries. Compromised routers can easily spy on a user's activities, conduct man-in-the-middle attacks, alter unencrypted data, or send the user to websites that masquerade as webmail or on-line banking portals. [2]

Suitable Hardware and Router Configurations[edit]

Experts routinely advise that low-grade routers should be avoided. Cheap models often fail to notify of firmware updates that patch security vulnerabilities, have limitations on password length for administrator access, and typically come as a less-secure, combined modem/router unit.

Users should consider upgrading to a commercial-grade router that is normally intended for small businesses as a sensible investment in security. Further, it is safer to have a personally owned routing device that connects to an ISP-provided modem/router in order to maximize administrative control over routing and wireless features of the home network.

Before purchase, check the router has firewall capabilities and that it supports Network Address Translation (NAT), so internal systems cannot be directly accessed from the Internet. Also check whether the router can be configured off-line, which is an advantage. Disconnect or turn-off routers/modems when they are not in use. [2] [3]

Accessing Router Settings[edit]

To access and change router settings, the user must type the router's IP address into a web browser address bar and then enter the administrative login and password when prompted. Users who are unsure of the default login credentials can check the list here and search by manufacturer and model.

Routers usually have a common address like: 192.168.1.1, but there are many alternatives depending on the make and model of the router. Check the manual that comes with the router to determine the correct address or alternatively research the manufacturer's website to determine this address. [4]

If users cannot confirm the relevant address to access the router, terminal commands can be used to trace the ip route or various networking tools can be accessed to discover it.

Linux[edit]

On Linux operating systems, run the following command in a terminal. [5]

ip route

The output starting with "default via XXX.XXX.XXX.XXX" is the relevant router IP address for changing settings.

Alternatively, most Linux desktops have a network icon which has this information: Right-click on network icon -> Select "Connection Information" or similar.

The IP address displayed next to "Default Route" or "Gateway" is the relevant address required. [6]

macOS[edit]

In a terminal, run. [7]

ifconfig

This command will show all the interfaces and their respective IP and MAC addresses.

Alternatively, look for the relevant network settings under: System Preferences -> Network -> TCP/IP (hardwired) or Wi-Fi (wireless) section. [8]

Windows[edit]

To find the router IP address in Windows, open a command prompt.

Start -> Search box -> Type cmd


ipconfig

The output should reveal the relevant IP address next to the "Default Gateway".

Alternatively, look for the relevant network settings under: Control Panel -> Network and Internet -> View network status and tasks -> Left-click on the appropriate connection -> Left-click on "Details".

The router's IP address is to the right of the IPv4 Default Gateway. Further network and router configuration information can be found here.

Recommended Router Settings[edit]

General Router Settings[edit]

To lock down the router, the following settings are recommended: [1] [2] [9]

Router Access and Management

  • Change the default router username and password to something suitably long and random using a Diceware passphrase. [10]
  • Use the browser's incognito or private mode when accessing the administrative interface so the URL is not saved in the browser history.
  • Avoid administrating the router with a smartphone application.
  • Disable the HTTP interface and enable the HTTPS interface instead, preferably on a non-standard port. For example: https://192.168.1.1:82 instead of http://192.168.1.1
  • Disable remote administrative access and administrative access over Wi-Fi. Set administrator access only via wired ethernet connections (not possible with mesh routers).
  • Disable all other remote-access protocols like PING, Telnet and SSH.
  • If offered, disable cloud-based router management because trust is shifted to another person between the user and the router.
  • Do not use mesh router systems that do not permit local administrative access.


Router Configuration and Services

  • Change the Service Set ID (SSID) which often leaks router information. Do not use personally identifying information like the apartment number you live in.
  • Disable NAT-PMP, since it has similar functionality to UPnP.
  • Disable the Home Network Administrative Protocol since it allows remote management of network devices.
  • Do not bind services to the external interface.
  • Turn off Universal Plug and Play (UPnP), which can allow applications to open ports to external computers.
  • If port forwarding is necessary, it should be limited to a source IP address and/or source IP address subnet.
  • Set logging to on, if the feature is available. This allows for a record of unsolicited incoming connection attempts, attempted logins and so on.
  • Reconfigure the router firewall rules to drop all relevant incoming packets.
    • Firewall ports should be set to "stealth" rather than "closed". This way no response is given to unsolicited external communications from attackers probing the network.


Router Firmware

  • Keep router firmware up-to-date at all times for better security. Set the self-updating firmware option if it is available.


Router Test

  • Use Gibson Research Corp.'s Shields Up port-scanning service to test the router for hundreds of common vulnerabilities, most of which can be mitigated by the router's administrator.

Wireless Network Router Settings[edit]


The following wireless settings are recommended: [2] [4] [9]

Wi-Fi Configuration and Services

  • Do not bother disabling SSID broadcasting since it is trivial to guess.
  • Enable the "Block WAN Requests" option to conceal the network from other Internet users.
  • Enable MAC Filtering so only specific devices may connect to the network.
  • Limit the number of Dynamic Host Configuration Protocol (DHCP) leases (connects) to the Wi-Fi network to match the number of personal devices owned.
  • If you must allow use of the Wi-Fi network to visitors, set up a guest network that turns itself off after a set period.
  • Use the 5-GHz band for Wi-Fi instead of the standard 2.4GHz band (if possible), since the 5 GHz band does not travel as far.
  • If possible, schedule Wi-Fi networks to turn off at night and then turn on in the morning.


Wi-Fi Protocols

  • Disable Wi-Fi Protected Setup (WPS) because it allows any device to connect to the network with the relevant eight-digit PIN.
  • Do not rely on the WEP and WPA standards which are cryptographically weak and have known security weaknesses. Use the WPA2 standard so only authorized users can use the network. [13]
  • Use routers that exclusively use WPA2, preferably with the AES standard (CCMP) and not TKIP which is less secure.

Router Firmware[edit]

Strong consideration should be given to flashing the wired/wireless router with an open-source GNU/Linux distribution. Solutions such as OpenWrt and DD-WRT provide firmware that is suitable for a large variety of wired and wireless routers and embedded systems.

The strengths of this approach are openness, regularly updated firmware images, a great number of functionalities (fully-featured), less bloat and more control over router behavior. The downside is that open-source firmware is not free of bugs; careful research is required before attempting this procedure. Check the online guides for instructions on how to proceed and whether the home router is compatible with the available firmware.

References[edit]

  1. 1.0 1.1 https://www.defcon.org/images/defcon-18/dc-18-presentations/Heffner/DEFCON-18-Heffner-Routers.pdf
  2. 2.0 2.1 2.2 2.3 http://www.tomsguide.com/us/home-router-security,news-19245.html
  3. http://www.usar.army.mil/Portals/98/Documents/Slicksheet_BestPracticesForKeepingYourHomeNetworkSecure.pdf
  4. 4.0 4.1 http://www.pcworld.com/article/243290/how_to_lock_down_your_wireless_network.html
  5. In Qubes-Whonix, this command is run from the NetVM terminal.
  6. https://www.howtogeek.com/233952/how-to-find-your-routers-ip-address-on-any-computer-smartphone-or-tablet/
  7. https://apple.stackexchange.com/questions/20547/how-do-i-find-my-ip-address-from-the-command-line
  8. http://osxdaily.com/2011/10/05/find-router-ip-address-mac/
  9. 9.0 9.1 http://routersecurity.org/checklist.php
  10. It may be sensible to tape this on the router so it is not lost in the future.
  11. Due to flawed 802.11 random number generation (generating insufficient entropy), downgrade attacks on group keys transmitted in the 4-way handshake (forcing usage of RC4 encryption), decryption of the 128-bit group key, and injection of group traffic into unicast traffic. This means unicast wifi traffic can be decrypted.
  12. We tested this attack against an Asus RT-AC51U and a laptop running Windows 7. The group key was obtained by exploiting the weak random number generator as discussed in Section 3.4.1. In order to successfully perform the ARP poisoning attack against Windows, we injected malicious ARP requests. First, we were able to successfully inject the ARP packets using the group key. This confirms that the group key can be used to inject unicast packets. Once we poisoned the ARP cache of both the victim and router, they transmitted all their packets towards the broadcast MAC address. At this point we were able to successfully decrypt these broadcast packets using the group key, and read out the unicast IP packets sent by both the victim and router.

  13. Usually the WPA2 Personal standard is fine; the WPA2 Enterprise version is only required for businesses.

License[edit]

Whonix Router and Local Area Network Security wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Whonix Router and Local Area Network Security wiki page Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>

This program comes with ABSOLUTELY NO WARRANTY; for details see the wiki source code.
This is free software, and you are welcome to redistribute it under certain conditions; see the wiki source code for details.


Random News:

Do you wonder why Whonix will always be free? Check out Why Whonix is Free Software.


https | (forcing) onion

Share: Twitter | Facebook

This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! See Conditions for Contributions to Whonix, then Edit! IP addresses are scrubbed, but editing over Tor is recommended. Edits are held for moderation.

Whonix is a licensee of the Open Invention Network. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Libre Software license as Whonix itself. (Why?)