Since IP Cameras are network devices, lets have a chat about security and best practices, feel free to ask me anything.. This is my specialty.
Ive got 3 areas I wish to discuss, I will summarize the areas here and we can have a more indepth discussion as the thread goes along.
Part 1 - Remote Access
So you want to view your cameras from anywhere on the internet right? Of course you do, thats a great thing about IP Cameras!
Part 2 - Local and Physical Security
Links:
Open Source Router Firmware has support to run a VPN Server, checkout:
Ive got 3 areas I wish to discuss, I will summarize the areas here and we can have a more indepth discussion as the thread goes along.
Part 1 - Remote Access
So you want to view your cameras from anywhere on the internet right? Of course you do, thats a great thing about IP Cameras!
Consideration #1: Do you trust your remote network? Answer is clearly no you should not. If your using a Public WiFi, Work Internet, Hotel Internet, Friends Internet you should assume that not only can your traffic be monitored by others on that network it can be monitored as it traverses the internet and back into your network.. Its a trivial procedure to monitor packets as they travel over WiFi, Across Routers/Switches and anything that is not encrypted (such as your video streams) is fair game to intercept; infact it is often a policy to do this in work and public environments to keep tabs on appropriate network usage and prevent abuse or policy violations, etc.
Consideration #2: Do you trust your camera? Vast majority of IP Cameras have backdoors, hardcoded logins, unnessicary services running on them.. Here is a port scan of one of my cameras:
Consideration #2: Do you trust your camera? Vast majority of IP Cameras have backdoors, hardcoded logins, unnessicary services running on them.. Here is a port scan of one of my cameras:
Code:
# nmap 192.168.42.21
Starting Nmap 6.47 ( http://nmap.org ) at 2014-09-23 18:52 MDT
Nmap scan report for 192.168.42.21
Host is up (0.0023s latency).
Not shown: 994 closed ports
PORT STATE SERVICE
23/tcp open telnet
80/tcp open http
554/tcp open rtsp
3800/tcp open pwgpsi
5000/tcp open upnp
49152/tcp open unknown
MAC Address: 90:02:A9:30:18:BC (Zhejiang Dahua Technology Co.)
Nmap done: 1 IP address (1 host up) scanned in 2.39 seconds
We see above its running telnet, which has a hardcoded login, I can tell its a dahua camera and none of these services offer encrypted authentication, so your login credentials are sent in plain text all the way across the internet... NOT GOOD.
Since we cant really trust our firmware to be 100% secure we should take special precautions with it.
Consideration #3: Hackers are constantly scanning every IP on the internet they can reach looking for known vulnerabilities to let them into a network, constantly 24/7 your being scanned and its your firewall's job to block most of these. If you port forward your cameras to expose them directly to the internet scanners can find your camera; dont believe me? Google search has a special token called inurl that lets you search the web for specific strings.. for example do a google search for inurl:"ViewerFrame?Mode=" and look at all the cameras you find, the majority of which the owner has no idea strangers are watching.
Solution: There is really one solution that negates all these issues and that is a Virtual Private Network, aka VPN.. All modern Smart Phones/Tablets/Operating Systems have VPN Clients built in, you just need to setup and configure a VPN Server on your network and forward the ports needed to that.. This will give you full access to your home network while away, from remote desktop, to printers and each and every IP camera's configuration and all the traffic will be encrypted as it traverses the internet so your logins and video streams are considerably more safe from prying eyes.. First place to check is to see if your home router has built in VPN Server support; if so read up on the documentation and get it working.. If not you can turn any reliable machine on your network, such as your BI server to also run a VPN Server.. a google search should yield guides that walk you through this..
TIP: Create a VPN User account for each device, say Ryan-Android for my phone.. if my phone gets lost/stolen I can always just change that password and not have to change everything.
TIP: If your up to the task you cant beat TLS authentication, its more complicated to setup and deploy but it uses Encryption Certificates as authentication tokens, no password to break and its as secure as you can keep your authorized devices from physical access.. (ie put a password on your phone thats not 4 numbers)
Since we cant really trust our firmware to be 100% secure we should take special precautions with it.
Consideration #3: Hackers are constantly scanning every IP on the internet they can reach looking for known vulnerabilities to let them into a network, constantly 24/7 your being scanned and its your firewall's job to block most of these. If you port forward your cameras to expose them directly to the internet scanners can find your camera; dont believe me? Google search has a special token called inurl that lets you search the web for specific strings.. for example do a google search for inurl:"ViewerFrame?Mode=" and look at all the cameras you find, the majority of which the owner has no idea strangers are watching.
Solution: There is really one solution that negates all these issues and that is a Virtual Private Network, aka VPN.. All modern Smart Phones/Tablets/Operating Systems have VPN Clients built in, you just need to setup and configure a VPN Server on your network and forward the ports needed to that.. This will give you full access to your home network while away, from remote desktop, to printers and each and every IP camera's configuration and all the traffic will be encrypted as it traverses the internet so your logins and video streams are considerably more safe from prying eyes.. First place to check is to see if your home router has built in VPN Server support; if so read up on the documentation and get it working.. If not you can turn any reliable machine on your network, such as your BI server to also run a VPN Server.. a google search should yield guides that walk you through this..
TIP: Create a VPN User account for each device, say Ryan-Android for my phone.. if my phone gets lost/stolen I can always just change that password and not have to change everything.
TIP: If your up to the task you cant beat TLS authentication, its more complicated to setup and deploy but it uses Encryption Certificates as authentication tokens, no password to break and its as secure as you can keep your authorized devices from physical access.. (ie put a password on your phone thats not 4 numbers)
Part 2 - Local and Physical Security
VLAN: Is there anyone on your local network you dont want to have access to the cameras? Employees? Or is there anything on your network so private you need to keep it as secure as possible? The best strategy to this is to segregate your networks and put the cameras on a different subnet (range of ip addresses). You need a switch and router that supports vlans and you can externally firewall off your IP Cameras from your normal network.. opening up access to only those whom should have it.. all the other machines on the network wont even get a login screen or response from the camera.. I would avoid messing with any onboard firewall settings on your IP Cameras; its an easy way to lock your self out without many choices on getting back in.
Port Authentication (802.1x): Higher end switches can actually authenticate network access at the switch port level; this is great if you have alot of cameras in a public area, dorm, etc.. If setup properly someone cannot access the security camera network by simply taping into a ethernet cable or somehow unplugging the camera and hooking in there own device. My Dahua cameras all support it and on my network if you unplug a VoIP Phone or IP camera and try to use that network port it puts you onto the guest vlan by default; my phones and cameras authenticate with the switch when plugged in and this process grants them access to there own network segments... if no auth is attempted it puts them in a special garden with almost no access. This requires a radius authentication server and some network know how so I wont go into too much depth I just want you to be aware what it is and if you need it.
Part 3 - Wireless Security
In my PROFESSIONAL opinion Wireless and Security are two technologies that oppose each-other dramatically; like hitlers WW2 enigma devices tought the world that you can never be sure if your BROADCASTING your communications to anyone in listening range, despite technology advancements.. Its like trying to keep a conversation private between two people with mega-phones a block apart.
The only acceptable place for a WiFi security device is a portable monitoring device such as your phones/tablets, since your security will not be compromised if those loose connectivity.
Lets go over our wireless security options:
WEP = Cracked quite quickly with enough captured packets; and IP Cams generate a constant stream of them.
WPA = Easily brute forced, if WPS is enabled its basically wide open... Can be hijacked with ease, I can run an access point with same Name/ID and your devices will gladly connect and tell me the password to your network.
WPA-TLS = Only one left standing hasn't been broken; you cant hijack or man in the middle it because of certificate authentication.. needlessly complex for individual users and few WiFi devices even support this.
Did you know anyone can send a deauth packet to knock your cameras off the wireless network? despite encryption? Within 30mins I could make a small hand held device that knocks everything off there wifi networks with parts I have laying about.. check this out:
What good is your security camera when anyone could just make a universal remote to "turn it off" when they approach to steal some shit?
same can be said for wireless security sensors, I have a 5w handheld walkie talkie that can broadcast on the same frequencies most GE wireless sensors work on.. If I broadcast noise with that transmitter I am basically jamming out all the little 100mW security sensors for a mile or so.. not to mention my 50w HAM radio that if used nefariously could jam out all wireless sensors to the horizon.
The only acceptable place for a WiFi security device is a portable monitoring device such as your phones/tablets, since your security will not be compromised if those loose connectivity.
Lets go over our wireless security options:
WEP = Cracked quite quickly with enough captured packets; and IP Cams generate a constant stream of them.
WPA = Easily brute forced, if WPS is enabled its basically wide open... Can be hijacked with ease, I can run an access point with same Name/ID and your devices will gladly connect and tell me the password to your network.
WPA-TLS = Only one left standing hasn't been broken; you cant hijack or man in the middle it because of certificate authentication.. needlessly complex for individual users and few WiFi devices even support this.
Did you know anyone can send a deauth packet to knock your cameras off the wireless network? despite encryption? Within 30mins I could make a small hand held device that knocks everything off there wifi networks with parts I have laying about.. check this out:
What good is your security camera when anyone could just make a universal remote to "turn it off" when they approach to steal some shit?
same can be said for wireless security sensors, I have a 5w handheld walkie talkie that can broadcast on the same frequencies most GE wireless sensors work on.. If I broadcast noise with that transmitter I am basically jamming out all the little 100mW security sensors for a mile or so.. not to mention my 50w HAM radio that if used nefariously could jam out all wireless sensors to the horizon.
Links:
Open Source Router Firmware has support to run a VPN Server, checkout:
Last edited by a moderator: