Showing posts with label Smart Home. Show all posts
Showing posts with label Smart Home. Show all posts

Wi-Jacking: Accessing your neighbour’s WiFi without cracking

UPDATE (5th September 2018). Since we published our original report, Google has now resolved the underlying vulnerability. The latest update of Chrome (tested against version 69.0.3497.81) addresses the issue we highlighted in this blog, where credentials are auto-filled on unencrypted HTTP pages. This makes the attack require significantly more user interaction, in the same way that Firefox, Edge Internet Explorer and Safari do.  This makes the exploit much closer to a phishing attack and much less likely to succeed.
It is important to note that the latest version of Opera is still vulnerable as of 2018-09-05, but will hopefully also be quickly patched. This is a positive response from Google and is great to see following our original report to them in March 2018.
As per our originally-proposed solution, it would also be great to see Microsoft adjust captive portals in Windows to behave in a similar way to those in MacOS (separate browser) and for router manufacturers to enforce HTTPS management by defaults on their devices. These changes would further limit this vector of attack.

Original Article:

During a recent engagement we found an interesting interaction of browser behaviour and an accepted weakness in almost every home router that could be used to gain access a huge amount of WiFi networks.
The browser behaviour relates to saved credentials. When credentials are saved within a browser, they are tied to a URL and automatically inserted into the same fields when they are seen again. The accepted home router weakness is simply the use of unencrypted HTTP connections to the management interfaces.
By combining these two components it was possible to gain access to various networks without cracking a single handshake, which is the currently most-used method of gaining access to a WPA/WPA2 network but requires a weak passphrase. The attack should work on most networks, but there are a few pre-requisites that need to be met for the attack to succeed:
  • There MUST be an active client device on the target network
  • Client device MUST have previously connected to any other open network and allowed automatic reconnection
  • Client device SHOULD* be using a Chromium-based browser such as Chrome or Opera
  • Client device SHOULD** have the router admin interface credentials remembered by the browser
  • Target network’s router admin interface MUST be configured over unencrypted HTTP
auto-connect to open wifiremember router admin password
Without those five pre-requisites, the attack is not possible. However, those are all somewhat likely occurrences given that most browsers prompt users to save credentials automatically. The main pre-requisites that lower the likelihood are Chromium usage and saved router credentials, but this will still affect a huge number of people.
*Firefox, IE/Edge and Safari require significant user interaction, so attack does work, but is more of a social engineering based. With Chrome it is significantly more seamless.
**If the router’s admin interface credentials are not saved, it is still possible to attempt to guess default values
It is also important to note that the attack has been demonstrated against home routers by extracting the WiFi key directly from the web interface. However, other devices can be targeted if they have a semi-predictable URL that is exposed over unencrypted HTTP. Many IoT devices fit into this category but none were specifically tested here.
Before getting to the meat of the attack, we are assuming that you are already familiar with the Karma/Jassager attack. Karma is used in part of the workflow and if you are not familiar with it, consider reading the following article:

Now for the actual walkthrough


Step 1. Bring the client device onto a network we control:

The first step is to start sending deauthentication requests with aireplay-ng and with the Karma attack using ‘hostapd-wpe’, both with an Alfa AWUS036NHA.
connected to home wifi
deauth attack
connected to open network

Step 2. Trigger the browser to load our URL:

We did this with ‘dnsmasq’ and a Python script. When we see a HTTP request, we create a response redirecting to our URL and serve our own page.
The URL and served page are different depending on the router we’re targeting. We can detect which URL/Page pair to send based on BSSID and ESSID or just take a guess, the range of options is limited anyway.
There are some extra options for redirection too. By default, we allow HTTPS through untouched and wait for an HTTP request. But if this is taking too long, triggering captive portal detection on Windows will automatically launch the default browser at a URL we specify. However, there are limitations to triggering a captive portal, primarily against MacOS, which launches a separate browser specific to dealing with captive portals, preventing us from accessing stored credentials.
portal flask app
wifi credential capturing page

Step 3. Steal the autocomplete credentials:

This is where things get interesting. When our page loads, the browser makes two initial checks.
  1. Does our URL origin match the router’s admin interface origin (protocol & IP address/hostname)
  2. Do the input fields on the page match what the browser remembers of the router’s interface
If these two checks pass, then the browser automatically populates our page with the saved credentials. In this case, the router’s admin details. Naturally these input fields are completely hidden from the target.
If the target is using Chrome, there is one more step: The Chromium feature “PasswordValueGatekeeper” requires a user to interact with the page in some way. A click anywhere on the page is fine, and after the click we can harvest the credentials.
If the target is using Firefox, Internet Explorer, Safari or Edge, then we can’t have the input fields hidden. The attack would still work, but only if the target clicks on our form field and select their credentials from the drop-down instead. At this point the attack is mostly social engineering.
But let’s not stop here, these credentials are almost useless right now. There’s even a good chance we might have guessed them before we even started the attack (for example, admin:password) but we can’t use them from our current position on the outside of the network.

Step 4. Send the target to their home WiFi

Once we have the credentials, we want the target to keep our page open just a little longer. At this point we stop our Karma attack, releasing the target back to their own network.
connected to home wifi
Once the target device is successfully connected back to their original network, our page is sitting on the router admin interface’s origin with the admin credentials loaded into JavaScript. We then login using an XMLHttpRequest and grab the PSK or make whatever changes we need. In most WiFi routers that we tested, we could extract the WPA2 PSK directly from the web interface in plaintext, negating the entire need to capture a handshake to the network. But if a router hides the key, we could enable WPS with a known key, create a new access point or anything else we can do from within the router’s interface.
We wouldn’t even need to know the HTML structure of the router’s interface. We could just grab the entire page DOM, send it home and extract anything useful by hand. Using BeEF Project it would also be possible to proxy through to the page, granting the attacker access to the router interface as if they were logged in directly.
credentials captured

Solution

Fundamentally this is just a flaw in the way origins are shared and trusted between networks. In the case of home routers, they are predictable enough to be a viable target.
The easiest solution would be for browsers to avoid automatically populating input fields on unsecured HTTP pages. It is understandable that this would lower usability, but it would greatly increase the barrier to credential theft.
The most complete solution would be to implement HTTPS with trusted keys and certificates on these devices. But this requires support for custom HTTPS certificates as well as your own certificate management infrastructure, in an enterprise this is commonplace but for home users this is extremely unlikely. Vendors might consider implementing HTTPS on their devices by default, but those keys could simply be stolen by anyone with one of the devices by reverse-engineering the firmware.
Microsoft could also make the process more difficult to exploit by using a separate captive portal browser instead of simply launching the default browser similar to how MacOS behaves.

Disclosure Timeline

Chromium:
  • SureCloud: Disclosed March 2nd
  • Chromium: Response Received March 2nd (“working as designed”)
Microsoft
  • SureCloud: Disclosed March 27th
  • SureCloud: Chase Sent April 13th
  • [Microsoft’s messages were all being flagged as spam]
  • Microsoft: Response Received May 25th (Clarification requested)
  • SureCloud: Clarification Sent June 4th
  • Microsoft: Case opened June 5th
  • Microsoft: Requested disclosure details June 6th
  • SureCloud: Clarification sent June 6th
  • Microsoft: Flagged for consideration, but no immediate action June 21st
Asus
  • SureCloud: Disclosed March 21st
  • Asus: Responded March 22nd (Discussing with engineers)
  • SureCloud: Discussing solutions April 4th
  • SureCloud: Sent notice to publish May 25th
  • Asus: Discussing solutions June 11th
  • SureCloud: Discussing solutions and notice to publish July 11th
Following the discussions with ASUS, it’s became clear we’d exhausted all options for ethical disclosure with this Proof of Concept.

References

While this was only discovered after disclosing to Chromium, someone named Chris had beaten us to the underlying idea. We have however taken it much further and demonstrated a real-world attack.
Our submission (merged into original): https://bugs.chromium.org/p/chromium/issues/detail?id=818156

Tools

All the tools used to perform the attack are standard components of Kali except for router specific payloads themselves and the selection script.
A copy of the scripts we’ve used can be found here:
These are Proof of Concept only and the community will no doubt take this attack much further. The long-term goal is to build a module for the WiFi Pineapple to automate the attack, with this is expected in the coming months.

Video

Mitigations


As highlighted we are exploiting ‘by design’ features, which will hopefully change with public release of this article. However, in the meantime there are a few key steps that can be taken to help protect yourself:
  • Only login to your router using a separate browser or incognito session
  • Clear your browser’s saved passwords and don’t save credentials for unsecure HTTP pages
  • Delete saved open networks and don’t allow automatic reconnection
  • As it is nearby impossible to tell if this attack has already happened against your network, change your pre-shared keys and router admin credentials ASAP. Again, use a separate/private browser for the configuration and choose a strong key.



Amazon wants to let strangers into your home 👀

Fbcaba99 5520 4d23 a354 23f17893610a?auto=format
This morning Bezos and team announced Amazon Key, an in-home camera and smart lock. As expected, the news was met with hugs and disgust.

“Hell no. There’s no way I’m letting a stranger into my home.” – 😐 Person on the Internet.

Regardless of your position, Amazon’s chess move to get a key to your door is brilliant. This gives the “A” in FANG (Facebook, Amazon, Netflix, and Google) a gateway to in-home services, including:

🍎 Grocery delivery
🐶 Dog walking
✨ House cleaning
👵 Elderly care
🛠 Home repairs

Amazon’s playing a very long game. The seeds planted today will enable a new wave of exciting (and society altering) automation as robots clean your home, walk your dog, and deliver eggs.

If you’re looking for a security camera but not ready to give strangers a key to your home, check out this $19.99 smart camera. It’s #3 on Product Hunt today.
AMAZON KEY 🔑

Everything you need to know about wireless mesh networks

You would be forgiven for thinking that wireless mesh networking is just another marketing bullet point for new Wi-Fi routers, a phrase coined to drive up prices without delivering benefits. But we can avoid being cynical for once: mesh technology does deliver a significant benefit over the regular old Wi-Fi routers we’ve bought in years past and that remain on the market.
Mesh networks are resilient, self-configuring, and efficient. You don’t need to mess with them after often minimal work required to set them up, and they provide arguably the best and highest throughput you can achieve in your home. These advantages have led to several startups and existing companies introducing mesh systems contending for the home and small business Wi-Fi networking dollar.
Mesh networks solve a particular problem: covering a relatively large area, more than about 1,000 square feet on a single floor, or a multi-floor dwelling or office, especially where there’s no ethernet already present to allow easier wired connections of non-mesh Wi-Fi routers and wireless access points. All the current mesh ecosystems also offer simplicity. You might pull out great tufts of hair working with the web-based administration control panels on even the most popular conventional Wi-Fi routers.
house with traditional routerLuma Home, Inc.
A conventional wireless router delivers limited coverage if you can't hardwire additional Wi-Fi access points to it.

What mesh means

The concept of mesh networks first appeared in the 1980s in military experiments, and it became commercially available in the 1990s. But hardware, radio, and spectrum requirements; cost; and availability made it truly practical for consumer-scale gear only in the last couple of years. That’s why we’re seeing so many systems hit the market all at once.
Mesh networking treats each base station as a node that exchanges information continuously about network conditions with all adjacent nodes across the entire set. This allows nodes that aren’t sending and receiving data to each other to still know all about each other. This knowledge might reside in a cloud-based backend or in firmware on each router.
Mesh networks don’t retransmit all the data passing through among a set of base stations. The systems on the market dynamically adjust radio attributes and channels to create the least possible interference and the greatest possible coverage area, which results in a high level of throughput—far higher than anything that’s possible with WDS (Wireless Distribution System) and similar broadcast-style systems.
luma mesh networkLuma Home, Inc.
Mesh network routers, such as Luma, connect multiple wireless nodes to blanket your home with Wi-Fi.
The principle behind all wireless networking is “how do I transmit this number of bits in the smallest number of microseconds and get off and let someone else use it?” explains Matthew Gast, former chair of the IEEE 802.11 committee that sets specs used by Wi-Fi. Mesh networks manage this better than WDS.
In some cases, Gast notes, a mesh node might send a packet of data to just one other node; in others, a weak signal and other factors might route the packet through other nodes to reach the destination base station to which the destination wireless device is connected.
Some mesh routers have single-band-at-a-time radios, and are meant more as smart extensions. But it’s more common that the nodes have radios for two or even three frequency bands, like the latest Eero. This lets mesh dedicate bands to intra-node data, switching channels to reduce congestion, or mixing client data and “backhaul” data on the same channel.
netgear nighthawk x10
Netgear
High-end conventional routers offer high-performance features not currently found in mesh Wi-Fi systems. The Netgear Nighthawk X10, for instance, has a 10Gbps ethernet port for network storage.
The ultimate goal is to make sure as much throughput remains reserved for actual productive traffic, such as streaming 4K video from one end of a house to the other or making fast connections to internet multiplayer games, relative to that consumed by moving data around the network.
If a node is powered down or crashes—your cat gets a little too interested and knocks one off a shelf—the network doesn’t go down, too. As long as every node can continue to communicate with at least one other node, you still have a fully functioning network.
You typically rely on a smartphone to help set up the first node and network parameters and add additional nodes to an existing network. Because you don’t have to plan where mesh nodes go, mesh systems automatically reconfigure as you add nodes. Most of the systems available offer help in figuring out where to locate units, some of them using indicators on the nodes themselves while others require smartphone software. “There is an immense amount of engineering effort to make something very simple,” says Gast.

Is it smart to invest in mesh?

The price you pay for this better efficiency? Proprietary protocols. While Wi-Fi remains standardized, and extremely and reliably compatible among equipment from different makers, no two mesh systems on the market work with each other. An early mesh protocol, 802.11h, wound up being not just insufficient to the task, but entirely ignored by companies as they pursued better results and competitive advantages. It’s also unlikely that any time in the next few years a compatible industry standard would arise and get uptake, given no such standard is currently working its way through the pipeline.
router size comparison
Michael Brown
Every major router manufacturer, and a number of startups, have jumped on the mesh network bandwagon.
You have three reasons to want compatibility: a way to acquire cheaper equipment if one manufacturer charges more than you want to pay for additional nodes; as an escape route if a company or product line goes under; or as a way to upgrade a network gradually to incorporate new standards. That’s not possible with mesh.
Being locked in to one manufacturer increases risk, because several companies making mesh gear—Eero, Luma, and Securifi—are startups, and not all startups succeed. More established firms, such as D-Link, Linksys, Netgear, and TP-Link, make mesh networking hardware, but if those product lines don’t produce profit, they won’t continue to make units forever.
All of this could affect you in six ways:
  • Inability to get technical support when something goes wrong.
  • Lack of warranty coverage for failed hardware. (Companies in bankruptcy, however, might be required to fund some amount of repair and replacement.)
  • No way to purchase new units to expand your network.
  • Smartphone apps, which some systems rely upon exclusively, stop receiving updates and stop working.
  • Cloud-based elements for configuration and management get turned off, rendering the nodes inoperable or locked into the last configuration. A Wi-Fi camera memory card maker at one point intended to disable configuration updates to its cloud-linked product. This can be an issue even with active products: Google accidentally reset its non-mesh OnHub and mesh Google Wifi routers in February because of a cloud-based account login issue.
  • Critical security flaws are discovered, but can’t be updated. While it seems unlikely that a mesh device that didn’t sell enough to be a success would be exploited, most standalone hardware of any kind—from DVRs to internet-connected cameras—use a variation of Linux and one of a handful of widely used chipsets.
Balanced against this is the lifecycle of Wi-Fi routers. In my nearly 20 years of buying and testing wireless networking hardware, I’ve found that it either fails in three to five years or needs an upgrade in that time to take advantage of newer networking features. Consider the price tag on a mesh system your rental price across that period, and think about whether the value of $70 to $150 a year, depending on the system and number of nodes, delivers enough utility. If you’re lucky, it will last much longer.
Netgear Orbi and satellite
Michael Brown
The Netgear Orbi RBK50 is our current top pick in Wi-Fi routers (even if it isn't a true mesh router).

Weaving a finer mesh

The future of mesh isn’t more and more and more nodes. Rather, it’s nodes that have more and different kinds of radios and other features built in. Already, some mesh nodes have Bluetooth for configuration and personal area networking control and up to three Wi-Fi radios supporting the full 802.11a/b/g/n/ac range.
Future nodes could add more radios or slice-and-dice an 802.11ac Wave 2 feature that allows beamforming and device targeting to further separate intra-node traffic from device-to-device traffic. And they could throw in 802.11ad/Wi-Gig for superfast ultra-high-definition streaming or ZigBee and other smart-home standards.
But the baseline set already today is for fast, efficient, and simple. Newer nodes can put more icing on the cake.
To comment on this article and other TechHive content, visit our Facebookpage or our Twitter feed.