Turris: secure open-source routers
The Czech Republic top-level domain registrar, CZ.NIC, wondered about the safety of home routers, so it set out to gather some information on the prevalence of attacks against them. It turns out that one good way to do that is to create a home router that logs statistics and other information. Michal Hrušecký from CZ.NIC came to the 2019 Southern California Linux Expo (SCALE 17x) in Pasadena, CA to describe the experiment and how it grew into a larger project that makes and sells open-source routers.
CZ.NIC is legally an association of competing companies, but in reality it is run like a non-profit, Hrušecký said. Beyond just domain registration, CZ.NIC has various other activities around making the internet more accessible and secure. That includes projects like the BIRD internet routing daemon and the Knot DNS resolver, as well as books, translations, and even a television series on "How to handle the internet". Beyond that, the Czech Computer Security Incident Response Team (CSIRT) is part of CZ.NIC.
One of the other things it is doing is creating open-source home routers. It started because CZ.NIC wondered about how safe home users are from network attacks. Are there active attacks against home users? And, if so, how frequent are they and what kinds of attacks are being made? To figure out the answer, the organization created Project Turris to create a secure router that it gave away. These routers would monitor the network and report suspicious traffic back to the project. They also served as endpoints for some honeypots that the project was running.
CZ.NIC wanted to make the Turris router "the right way", he said, so the organization made it all open source. The router has automatic security updates and users are given root access on the device. It also sported some "interesting hardware", Hrušecký said; it had a two-core PowerPC CPU, 2GB of RAM, and 256MB of NAND flash.
Based on the information provided by the Turris routers, CZ.NIC researchers started publishing reports about what they were finding. That led some people to ask if they could get the routers themselves, because they felt that other router makers were "not doing things right". That led to the creation of commercial Turris routers: the Turris Omnia (which was reviewed here in 2016) and the upcoming Turris Mox. Those routers will still allow people to participate in the research if they choose to.
Building the routers with free and open-source software (FOSS) is really the only way to go, he said. The project knew that it was not going to be able to compete with small, cheap routers, so it created routers with lots of capability that would allow them to run lots of different kinds of services. FOSS makes it easy to get started on a project like this because there is lots of available software that can be easily integrated into the OS.
These routers allow users to do whatever they want and people believe they are more capable than they truly are, Hrušecký said. That means they break things in "really creative ways". Sometimes they will make custom changes, completely outside of the OS framework, which get overwritten with the next automatic update. These are "tricky problems" to handle; the project would not have if it locked its users out. At some "dark moments" he understands why some companies do that.
Another tricky piece is upstreaming, he said. Turris works on getting its code upstream, but it takes longer than "anyone would want", he said. The project can take shortcuts that the upstream project will find lacking. Upstream projects want the code to be polished and generalized, which takes time. The "upstream project" in this case is OpenWrt, which is a distribution for routers. But OpenWrt is optimized for routers with far less resources than the Turris routers.
Typically, OpenWrt installs a highly compressed filesystem image into flash and has a small overlay where packages can be installed—generally only a few, however. Turris is not using the compressed image, but is instead using the "coolest filesystem for Linux": Btrfs. The project is using Btrfs snapshots and "went crazy" with them. It does a snapshot automatically weekly and before any update; it also allows manual snapshots. A "factory" reset can go back to the previous snapshot, the factory snapshot, or reflash the system.
Turris created its own web interface for the router, which is simpler than the standard OpenWrt interface. OpenWrt is targeted at more-technical users, while Turris wanted an interface for less-technical users, but to still allow them to use advanced features, such as VPNs or adding a guest WiFi network. Since Turris does things a bit differently, it sometimes runs into problems that OpenWrt does not have. In addition, OpenWrt packages are sometimes too trimmed down feature-wise, so Turris must build its own versions. Some packages use LXC containers, which may seem crazy, he said, but does make sense in some cases; it requires a different kernel configuration from the standard OpenWrt kernels, though.
Hrušecký introduced the honeypots as a service (HaaS) project by saying: "Honeypots are cool, right? Everyone wants a honeypot at home." But it takes time to set up and maintain a honeypot and there is some risk, so why not have someone else run it for you? CZ.NIC will run the honeypot; users just need to run the HaaS proxy on their system, which will relay potentially malicious traffic (e.g. connections to the SSH port) to a honeypot on the HaaS server. It will simulate a device and record what is sent by the attack. Users can then check out the attacks aimed at their server on the HaaS web site. HaaS is something that came from the security research but has now been separated out from the router project so it can be used elsewhere.
Turris Sentinel is a work in progress that will make some of the other security-research pieces available outside of the router framework. It will collect firewall logs and send them to a central location. It also has "minipots", which pretend to be a service on some port (e.g. telnet, HTTP), ask for login credentials that get logged, then close the connection. There was an earlier version of this, but it was closely tied to the Turris routers, so it has been rewritten to be more general. The Turris project was a bit surprised how willing people are to provide this data to it. The data will be made available on the site eventually, but is currently being shared with the Czech and other countries' CSIRT organizations.
The project has integrated the Suricata open-source intrusion-detection system (IDS) and intrusion-prevention system (IPS). It can look deeply into the packets and log or block a network flow based on its rules. For unencrypted communication, it has access to all of the information exchanged. But even for encrypted connections, there is a fair amount of information that can be extracted from things like the IP and MAC addresses, parts of certificate exchange, the length of the connection, and the amount of data transferred.
Suricata can be used to monitor untrusted devices and detect suspicious anomalies. There are open-source rules available to detect malware attacks, which can be used to block the traffic, for example. There is also the PaKon tool for Suricata that will aggregate information about the traffic on the network. It will alert when a new computer connects to the network. It will allow you to find out what your refrigerator is doing on the network when you are not at home, Hrušecký said with a grin.
Something that has come out of the research that CZ.NIC is doing is a "list of bad guys". If certain hosts are repeatedly attacking servers and routers that are reporting back, they will get added to the list, which is sent out to all of the routers. They can then block those IP addresses to reduce the malicious traffic they are handling.
Something that people have been asking for is Nextcloud support. It makes good sense, he said, because the Turris routers are the ultimate in self-hosting. They live at your home and you are root, so it is natural fit. Turris is also working with Nextcloud on a device that will specifically target hosting that service. So far, much of the software side is working, though there are still some areas that need work.
One of the "little bit crazier" uses is to turn the router into a digital video recorder (DVR). Adding a USB DVB-T device and a disk drive gives you a DVR, he said. Adding TVHeadend along with Nextcloud turns the Turris device into a router and home server combo box.
Hrušecký demonstrated the HaaS interface and took questions at the end of the talk. He showed how you can look at the kinds of attacks that are being attempted against your router (but are actually being handled by the CZ.NIC HaaS server) including the credentials used, the commands the attacks are trying, and the locations where they are trying to download code from. The Turris routers cost around €300, he said in response to an attendee question. They are not directly available in the US, but that is being worked on; there is lots of paperwork that needs to be completed. Until then, he suggested looking on eBay and similar sites.
A YouTube video of the talk is available.
[I would like to thank LWN's travel sponsor, the Linux Foundation, for
travel assistance to Pasadena for SCALE.]
| Index entries for this article | |
|---|---|
| Security | Home network |
| Security | Internet/Routers |
| Conference | Southern California Linux Expo/2019 |
Posted Mar 13, 2019 23:34 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link] (3 responses)
You do lose the ability to roll back using BTRFS snapshots and automatic upgrades though. Also some minor stuff (like nice rainbow LEDs) is not supported by the stock kernel.
Posted Mar 14, 2019 3:05 UTC (Thu)
by pabs (subscriber, #43278)
[Link]
https://osmocom.org/projects/quectel-modems/wiki
Posted Mar 18, 2019 20:00 UTC (Mon)
by diederich (subscriber, #26007)
[Link] (1 responses)
May I ask: why did you migrate back? Thanks.
Posted Mar 18, 2019 21:14 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Mar 23, 2019 5:05 UTC (Sat)
by Garak (guest, #99377)
[Link] (28 responses)
Posted Mar 23, 2019 20:59 UTC (Sat)
by mpr22 (subscriber, #60784)
[Link] (27 responses)
I pay £12/year (plus VAT) for a .com domain; if I settled for .co.uk it would only be £6/year. What kind of ridiculously lower were you thinking of?
Posted Mar 23, 2019 22:01 UTC (Sat)
by Garak (guest, #99377)
[Link] (26 responses)
Posted Mar 23, 2019 22:19 UTC (Sat)
by mpr22 (subscriber, #60784)
[Link] (4 responses)
Posted Mar 24, 2019 23:43 UTC (Sun)
by Garak (guest, #99377)
[Link] (3 responses)
Posted Mar 25, 2019 0:41 UTC (Mon)
by mpr22 (subscriber, #60784)
[Link]
That's a fascinating hypothesis. I'd be interested to see what evidence there is to support it.
Posted Mar 25, 2019 1:20 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link]
And this is cheap, compared to $50 fees just a year and a half ago.
Keep in mind, that each transaction on the blockchain has to be kept there _forever_, replicated to all the nodes that host the full chain. This is quite expensive and wasteful in itself.
Posted Mar 25, 2019 15:13 UTC (Mon)
by anselm (subscriber, #2796)
[Link]
We may eventually find a use for cryptocurrencies (other than “ripping off suckers”) but certainly micropayments are not it.
To make micropayments viable at scale, transactions must be very, very cheap, and it must be efficient to process very large numbers of them. Cryptocurrency transactions – certainly the blockchain-based ones that people mean when they say “cryptocurrency” today – are very expensive indeed, and it is nearly impossible to process even ridiculously low numbers of them efficiently. So, bad theory.
Posted Mar 23, 2019 23:45 UTC (Sat)
by Cyberax (✭ supporter ✭, #52523)
[Link] (5 responses)
Ok....
/me backs slowly away
Posted Mar 24, 2019 23:34 UTC (Sun)
by Garak (guest, #99377)
[Link] (4 responses)
Posted Mar 25, 2019 1:10 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
Posted Mar 25, 2019 2:28 UTC (Mon)
by Garak (guest, #99377)
[Link] (1 responses)
Posted Mar 25, 2019 2:46 UTC (Mon)
by corbet (editor, #1)
[Link]
Thanks.
Posted Mar 27, 2019 12:50 UTC (Wed)
by nix (subscriber, #2304)
[Link]
Posted Mar 24, 2019 16:16 UTC (Sun)
by Wol (subscriber, #4433)
[Link] (4 responses)
I know pennies add up, but that really is peanuts compared to all the other costs!
Cheers,
Posted Mar 24, 2019 23:37 UTC (Sun)
by Garak (guest, #99377)
[Link] (3 responses)
Posted Mar 25, 2019 0:54 UTC (Mon)
by pizza (subscriber, #46)
[Link] (2 responses)
When you make public comments you open yourself up to public responses.
Posted Mar 25, 2019 2:25 UTC (Mon)
by Garak (guest, #99377)
[Link]
Posted Mar 25, 2019 12:51 UTC (Mon)
by Wol (subscriber, #4433)
[Link]
Cheers,
Posted Mar 25, 2019 9:35 UTC (Mon)
by farnz (subscriber, #17727)
[Link] (9 responses)
There are three counterarguments that you're simply dismissing as they don't fit your narrative:
In other words, most of what you say would exist if the FCC barred providers from putting "home server" restrictions in their T&Cs already exists, people are willing to ignore that restriction if they see a benefit from doing so, and that restriction is not universal and yet foreign countries don't have a market for the devices you say would appear if the FCC barred that term. What evidence do you have that counters all of this?
Posted Mar 25, 2019 15:32 UTC (Mon)
by Wol (subscriber, #4433)
[Link] (8 responses)
"Here's a dial-up, here's an IPv4, off you go ..."
Trouble is, most of the decent ISPs like that have been bought out by the likes of Clueless & Witless.
Cheers,
Posted Mar 25, 2019 16:05 UTC (Mon)
by farnz (subscriber, #17727)
[Link] (7 responses)
Not all - at least AAISP in the UK are still at that quality, although it's now a "here's an Openreach link, here's a small amount of IPv4, here's a /48 of IPv6, off you go". But I have a VDSL2 (aka FTTC, BT Infinity, Sky Fibre etc) connection, my Fedora box runs PPPoE over that link, and I get nice Internets from it.
Posted Mar 25, 2019 20:33 UTC (Mon)
by Wol (subscriber, #4433)
[Link] (6 responses)
Cheers,
Posted Mar 25, 2019 21:00 UTC (Mon)
by farnz (subscriber, #17727)
[Link] (5 responses)
AAISP do all the normal options - ADSL2+ (Annex A and Annex M) included. Back before FTTC was an option for me, I used two ADSL2+ Annex M lines to get me enough upload (4 Mbit/s was enough for me back then), and wrote this AAISP wiki page to explain how I split traffic across the two upload links from a Debian system doing PPPoA using an ADSL2+ card from Traverse Technologies. Nowadays, I'd probably buy a pair of Draytek Vigor 130s to act as PPPoA to PPPoE translators, then use PPPoE on the Linux side.
Posted Mar 26, 2019 10:18 UTC (Tue)
by Wol (subscriber, #4433)
[Link] (4 responses)
Only thing is, if as I suspect it's the exchange, will that actually improve matters?
Cheers,
Posted Mar 26, 2019 14:33 UTC (Tue)
by farnz (subscriber, #17727)
[Link] (3 responses)
Well, AAISP are (IME) very good at getting the exchange-end equipment fixed for you (finding via their CQM that there's a reproducible explicable problem), or at least determining what tradeoffs you can make to get stability (e.g. slower speed such as 10 Mbit/s down and total stability if it's noise between you and exchange).
Posted Mar 27, 2019 13:02 UTC (Wed)
by nix (subscriber, #2304)
[Link] (2 responses)
I switched to A&A -- for telco as well, so I had no conctractual arrangement with BT that BT could use to try to avoid interacting with A&A -- and A&A just kept calling BT out: BT kept cancelling the callout because nothing was wrong, whereupon A&A would wave the evidence of hundreds of linedrops whenever it rained in their faces and tell them, you have a contract, you are not providing the stated service to an acceptable standard, fix it. After a while A&A pushed me up to business-priority (free of charge) to give BT more, ah, encouragement. BT ended up closing the fault nineteen times before they considered actually doing their jobs and tracing the line fault and found a bunch of dry joints near the exchange equipment in the town centre. (These days, of course, with FTTC, they'd only have to fail to trace the fault as far as the cabinet...)
Posted Mar 27, 2019 14:49 UTC (Wed)
by Wol (subscriber, #4433)
[Link] (1 responses)
Reminds me of one of these "true crimes" programs I saw. The guy was accused of murdering his wife, but he said "we were crawling through the undergrowth, the rifle fell off my back and fired, killing her".
Despite the safety being on.
The prosecution said "we've tried every which way we can to make the rifle fire with the safety on, and we can't".
Then the defence said "let us have a go" and came back the next day with "we tried to reproduce the scenario described by the defendant, and the rifle fired reliably roughly 80% of the time".
Different approach, different outcome ...
Cheers,
Posted Mar 29, 2019 14:18 UTC (Fri)
by jezuch (subscriber, #52988)
[Link]
Different incentives? Like O.J. Simpson proving that the gloves don't fit?
Turris: secure open-source routers
Turris: secure open-source routers
https://osmocom.org/news/63
http://git.gnumonks.org/laforge-slides/plain/2016/cellula...
https://media.ccc.de/v/33c3-8151-dissecting_modern_3g_4g_...
Turris: secure open-source routers
Turris: secure open-source routers
Crazy Obvious Home DVR Server
One of the "little bit crazier" uses is to turn the router into a digital video recorder (DVR). Adding a USB DVB-T device and a disk drive gives you a DVR, he said.
you mean I could like- program and watch my dvr's library from my phone or laptop wherever I am with an internet connection. Wow. Seriously, that should have existed in a much more advanced form many years ago. Along with asterix-level voicemail functionality (both on the router/homeserver and on the phone itself). And throw in home email server with domain registration price ridiculously lower than current rates. Maybe next year. Though I won't be happy till it comes with a complete self hosting set of its own FOSS code by default with very little hassle tweaking small code fixes for any itchy perceived deficiency (of the variety that can be changed with very small code tweaks, which is to say, a very large number of them. Like seriously, why is number of rings before vmail picks up not a more prevalent user-controlled option? Along with white/black/pass/blocklist contingent configurations of that number. Robocalls are only hard to mitigate if neither you nor the masses have the easy ability to go add blaringly obvious features to phone software)
Crazy Obvious Home DVR Server
'reasonable' domain registration prices?
'reasonable' domain registration prices?
micropayment efficiency dynamics
it would literally be cheaper to not charge at all.
The theory is that cryptocurrencies/micropayments make that not true. And by charging and making a business of it, you incentivise the relevant system administrators to do a good job. Standard capitalistic theory, those who provide the best quality services considering price keep the job and are financially sustained to do so going forward.
micropayment efficiency dynamics
micropayment efficiency dynamics
micropayment efficiency dynamics
The theory is that cryptocurrencies/micropayments make that not true.
'reasonable' domain registration prices?
So you're willing to give out full email control to multiple random people running unsecured RPi-based severs at home.
I will ask a second time @Cyberax. Please cease and desist your pattern of comments I characterize as trolling and harassing. If you feel your comments are important, please start a thread of your own, do not reply to mine. I will reciprocate.
magic words
magic words
sh!t forum
Certainly I think we can all agree that this particular conversation isn't going anywhere useful; perhaps we can just stop now?
This is a good stopping point
magic words
'reasonable' domain registration prices?
Wol
And to you as well @Wol, I ask you to please cease and desist your pattern of comments I characterize as trolling and harassing. If you feel your comments are important, please start a thread of your own, do not reply to mine. I will reciprocate.
magic words
magic words
magic words
magic words
Wol
'reasonable' domain registration prices?
'reasonable' domain registration prices?
Wol
'reasonable' domain registration prices?
'reasonable' domain registration prices?
Wol
'reasonable' domain registration prices?
'reasonable' domain registration prices?
Wol
'reasonable' domain registration prices?
'reasonable' domain registration prices?
'reasonable' domain registration prices?
Wol
'reasonable' domain registration prices?
