5 ms·
These problems all go away if you don't expose crappy management software directly to the Internet. Don't allow anonymous inbound traffic on your firewall to h
by mtlynch 3y ago
These problems all go away if you don't expose crappy management software directly to the Internet.
Don't allow anonymous inbound traffic on your firewall to hit your NAS (or any other interface that you're not updating and monitoring rigorously).
If you need remote access to your NAS, install a VPN (e.g., Tailscale, ZeroTier) on the NAS or a different host on your internal network, and then access it remotely over an SSH tunnel.
I understand that the casual home user doesn't know how to install a VPN or do SSH tunneling, so they end up exposing their NAS through the firewall, and that's why these issues are widespread. But for people who are a bit more technically savvy, you can massively reduce your attack surface by denying any inbound connections through your home firewall.
- kevincox 3y agoWhile "don't let any possible attacker see the device" is good defence in depth it is a pretty shitty only level of security. Even if it is protected outside of your local network many people have crappy IoT devices or even just laptops with malware on their network. In top of that this won't even really prevent this vulnerability as it can be triggered by a GET request. This means that if you are connected to the VPN any site you visit can trigger it. (If they can guess the hostname or IP)
- Dalewyn 3y ago>crappy IoT devices Those should all go on their own vlan, or for a more Joe Average(tm) approach the guest network. >laptops with malware on their network. At that point you've got bigger fish to fry than shitty firmware, all bets are off.
- kevincox 3y agoWhy are all bets off if you have malware on my network. My devices are hardened with the expectation of being on hostile networks. My computers, phone and home server all assume that they are exposed to malicious actors. Of course defence in depth is also important, but there is no reason that all bets should be off if an attacker can access your device over the network.
- Dalewyn 3y agoDo you consider yourself a malicious actor to yourself? Because that's what you're saying. I am assuming the hypothetical compromised laptop is your own, and thus assuming it contains credentials. What credentials? Everything. All your credentials are belong to us. At that point, the only way to defend against that is to have never trusted yourself. That's a ridiculous stance for any normal person; their home network is a trusted space. That's why I'm saying all bets are off, you have bigger fish to fry than caring about some shitass firmware written by some third rate bank clerk in Bangladesh in a plastic box made by the finest sweatshops in China.
- kevincox 3y agoWhy would you assume the compromised laptop is my own? What if I have roommates? Or a friend comes over for a LAN party? I want them on my real network for Steam game transfers and game traffic. Maybe I want them to pull mods off of my NAS.
- Dalewyn 3y agoIn that case, yes that network isn't a home network and should be untrusted as such. Personally were I in your situation, I would have individual computers for each network as needed for total and proper segregation of trust; a NAS for the home and a NAS for the public (eg: LAN party) network. I would not trust a single computer with all sorts of data to safely handle two wildly different levels of trust simultaneously like that. I consider the home network a trusted enclave. Thus, all bets are off if a compromised laptop is in the home network. I assumed the laptop was your own as a worst case scenario (Credentials! In plain arm's reach!). If an untrusted third party laptop breached or was invited into your home network, that's not immediately as bad but the bets are still off. Basically: I see worrying about shitass firmware when you haven't secured the network as pointless. The hypothetical situation presented was a compromised laptop in the network; forget the firmware, you need to deal with that laptop and then commence cleanup of the network first.
- 3y ago
- mtlynch 3y ago>While "don't let any possible attacker see the device" is good defence in depth it is a pretty shitty only level of security. If we're talking about a company, I agree. For a home, I think VPN + firewall is sufficient security against insecure management software on network devices. >Even if it is protected outside of your local network many people have crappy IoT devices or even just laptops with malware on their network. If there's a malicious laptop within your network, what difference does it make if your NAS has a security vulnerability? If your laptop is compromised, it's game over anyway because the attacker can steal your cookies or install a keylogger. If it's a housemate's laptop that doesn't have access to the NAS, they can do ARP poisoning[0] and MitM your NAS to steal your credentials (unless you're also vigorous about managing your own TLS CA). >In top of that this won't even really prevent this vulnerability as it can be triggered by a GET request. This means that if you are connected to the VPN any site you visit can trigger it. (If they can guess the hostname or IP) Other websites can trigger the behavior, but they can't read any responses because of same origin policy, so they can't exploit anything.[1] Correction: I overlooked in the writeup that the GET request allows RCE. So, you're right is that malicious websites can exploit this despite SOP. Still, firewall + VPN reduces your risk by many orders of magnitude. Instead of the attacker trivially scanning for your device or looking it up on Shodan, they have to trick you into visiting a malicious site. [0] https://en.wikipedia.org/wiki/ARP_spoofing https://en.wikipedia.org/wiki/ARP_spoofing [1] https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy https://developer.mozilla.org/en-US/docs/Web/Security/Same-o...
- kevincox 3y ago> they can do ARP poisoning[0] and MitM your NAS to steal your credentials (unless you're also vigorous about managing your own TLS CA) All traffic to my NAS is secured, even over the local network. I don't trust the network and I don't think it should be game-over for my NAS because my housemate installs some malware. I use SSH with pinned keys and TLS (thanks Let's Encrypt). I think if any NAS appliance doesn't provide some basic security like this it is a failing of that vendor. Even a self-signed TLS cert to provide TOFU validation would go a long way. (And actually in many ways be more secure than a public CA issued certificate.)
- amluto 3y agoThere are two major problems with this approach: 1. With gadgets like this, the gadget is likely to be your firewall. 2. You are almost certainly running a sandboxed agent inside your firewall that runs untrusted code: your web browser. CSRF attacks taking over crappy devices like the devices in question are a thing.
- wepple 3y agoThis advice massively reduces the largest risk, but “problems all go away” is wildly wrong There are a ton of remote access and update functionality in these things that make them fully exploitable even with no internet exposure. Theyll do crazy things like VPN back to home servers, where every single device is on a flat /8 with no additional security. So anyone who dumps the VPN keys from one is basically on your eth. Or update unsigned firmware from domains that end up abandoned and left hanging Etc etc
- mtlynch 3y ago>This advice massively reduces the largest risk, but “problems all go away” is wildly wrong By the problems all go away, I meant the problems associated with a network appliance handling malicious input that leads to a security issue. If the device isn't exposed to the Internet, it can't bungle malicious input. >Theyll do crazy things like VPN back to home servers, where every single device is on a flat /8 with no additional security. So anyone who dumps the VPN keys from one is basically on your eth. > >Or update unsigned firmware from domains that end up abandoned and left hanging Are there cases of that happening with products that have wide usage? Like 1M+ devices in the field? The only time I can recall hearing of anything like that, was for a very small time vendor.[0] Every security vulnerability I've heard about around NAS devices required the device to be exposed to the public Internet or for the attacker to be on the same local network as the vulnerable device. [0] https://news.ycombinator.com/item?id=34325695 https://news.ycombinator.com/item?id=34325695
- wepple 3y agoYeah, there have been a bunch. The last one I remember was a fairly well used security camera. VPN was how they streamed video back to storage. A really “simple” solution to turning a LAN-based video camera into an internet-connected one. I’ll see if I can drag up some references, a quick google doesn’t show what I’m looking for.