Showing posts with label IP address. Show all posts
Showing posts with label IP address. Show all posts

Hardening a wireless DSL router

Avoid that someone else uses your wireless DSL router

Most homes in developed countries use a home wireless DSL router to connect to the Internet. Remember that, in an increasing number of countries, the owner of the router is legally responsible for the data coming in and out of that home network to the Internet. Avoid being in an unwanted legal case by preventing that your DSL router (and your Internet connection) is used by an intruder to commit any illegal action. Make your DSL router relatively secure with the following preventive (and a final one, detective) security measures:

- Change the private IP address that the router has by default. How many routers come with 192.168.1.1 or with 10.0.0.1? Please, let your router be other than 192.168.1.1.

- Change the default IP addressing schema of your home LAN (cable or wireless). There is no obligation to always use 192.168.1.x or 10.0.0.x. As long as it is a private IP address (see RFC 1918), dare trying with e.g. 172.16.x.x.

- Limit the mac addresses that can connect to your router. Find out the mac addresses of all the gadgets that connect to your wireless LAN and input them into your router's mac ACL.

- Use WPA2 with a long password, you can get it for example here.

- Make the admin interface only available to your internal LAN (avoid making it available through the Internet). Easy way to check this: Find out your public IP address (e.g. using myipaddress), try to reach that public IP address and the admin web page.

- Are you a hardliner? Then disable the DHCP server in your router. Add the IP addresses. routing gateway (your router) and DNS servers in each of your wireless clients manually. Use different DNS servers on each of the gadgets (so that no unique DNS server gets a complete idea of your browsing behaviour).

These measures follow a defense-in-depth approach. None of them constitute the silver bullet, but the entire set of measures is a valid starting point.

If you would like to check your router's threat exposure to the Internet:
- Find your public IP address here.
- Install nmap in your box and launch the following two lines:

$ sudo nmap -sT -n -v -T4 -O -p- --reason yourpublicaddress
$ sudo nmap -sV -n -v -T4 -O -open ports coming out from first command yourpublicaddress


The nmap command line usage help can be found here.
- Limit the services you offer to the Internet.
Nmap should produce an output similar to this one:
All 65535 scanned ports on are filtered because of 65350 no-responses and 185 host-unreaches. Too many fingerprints match this host to give specific OS details.

If the result shows some open ports, identified by the -sV option as UPnP, review the expert view of the admin interface in your router, it is probable that you allow some firmware update, or push service provision coming from your ISP or a specific server app. Just check that it corresponds to your needs (e.g. a VPN server, a file server... or maybe, nothing is published to the Internet).
Finally, a detective measure: Check your router's logs frequently. Most routers can send their logs regularly to an email address. Use this feature. It is priceless to identify abnormal uses.

Happy scanning and happy secure home DSL router!
p.s. The "--reason" is a suggestion coming from a network jedi ;-)

Avoid misuses of your DSL router while you are on the beach
Additional measure (inspired by a comment left by an anonymous reader left)
Broadcast (but as little as you need ;-)
Scan the wireless networks that surround your place, choose a wireless channel that is not used, or at least very little used. This will enable you to decrease the level of energy used by your wireless router when broadcasting its signal. 
Fine tune the energy level so that the wireless signal is almost constrained to your place. This will definitely make a wireless attack to your network a little bit more "physically challenging". Here you are some command line tips to scan the wireless spectrum using aircrack-ng from a Linux box.

$ sudo apt-get install aircrack-ng
Information on aircrack-ng installation can be found here
Disconnect from your wireless network (keep the wireless driver working though)
$ sudo airmon-ng start wlan0
airmon will tell you the name of a wireless interface that can be used to scan (it will normally be mon0)
$ sudo airmon-ng start mon0
$ sudo airodump-ng mon0
and you will get a real-time list of active wireless networks (incluing channel numbers)

Thanks to the anonymous reader!

Identifying the ownership of a website

This is a quick step-by-step guide with the steps to follow to identify Internet web site coordinates (IP address, registration data, connectivity and name service provider).

Step 0 Download a copy of the website (if required for investigation purposes)

You can do that using wget, compressing using tar and gzip and finally keeping an md5 hash.
wget -m -k -K -E webname
tar -cf webname.tar *
gzip webname.tar (or get both steps together with tar -czvf webname.tar.gz)
md5sum webname.tar.gz > webname.tar.gz.md5

Step 1 Obtaining the IP address of the site (e.g. with www.google.com)
Launch a nslookup query (in Linux or Windows) to get the IP address of the site

$ nslookup www.google.com

An alternative to this command is

$ dig +qr www.google.com

There are many online sites providing online nslookup services e.g.
http://centralops.net/asp/co/NsLookup.vbs.asp
http://www.kloth.net/services/dig.php

If you need a name server IP address to bind to, some examples are

142.77.1.1
193.196.32.1
208.07.222.222
129.206.100.126
70.84.161.11

Step 2 Determine the owner of the IP address
Go to arin whois service and introduce the IP address from step 1 and you will read something like NetType: Allocated to RIPE NCC. The RIPE NCC is one of five Regional Internet Registries (RIRs) providing Internet resource allocations, registration services and co-ordination activities that support the operation of the Internet globally. Others are AfriNIC, APNIC, LACNIC, RIPE and InterNIC.

Step 3 Obtain the hosting company name
Go to the Internet register that the previous step signalled as owner of the IP range requested e.g. http://www.db.ripe.net/whois/ and insert the same IP address. You will get the hosting company.

Step 4 Name service provider
$ dig +qr www.website NS (ns in lower letters will also work - provides information on the authoritative name servers for that website)
Search on the Internet infomation on the name service (company name and contact point)
More on this command
$ dig +qr www.website MX (tells about the mail server associated to the site)
$ dig +qr www.website A (tells the IP address of the site)
$ dig +qr www.website ANY (provides a subset of the three commands above)

This step will tell us which authoritative name servers provides the name to the website (there are occasions when the name server provider differs from the hosting company).

N.B. Thanks to Melkiades for his help on this entry.