Google+

Pretty good computer security

I don’t cut my own hair. I can’t change my own engine oil. At the grocery store, I always pick Tide and Skippy, even though the generic brand is probably cheaper and just as good. “Well, that’s dumb,” you say. “Don’t you know you could save a lot of money?”, you say. But that isn’t the point. Sure, my haircut is simple. I could buy some hair clippers, and I’d love to save a trip to the dealership every year. But there are people who are professionals at cutting hair and fixing cars, and I wouldn’t trust them to program their own computers. So why should they trust me to evaluate different brands of peanut butter?

Fortunately, they’ve made the choice really simple, even for amateurs like me. In fact, everyone relies on modern convenience to some extent. Even if you cut your own hair and even if you’re not as much of a Skippy purist, you’d have to admit. People today do all kinds of crazy complicated tasks, and none of us has time to become experts at all of them.

Take driving, for example. Cars are crazy complicated. Most people aren’t professional drivers. In fact, most people aren’t even halfway decent drivers. But thanks to car engineers, you can do a pretty good job at driving by remembering just a few simple rules1. There are lots of other things whose simplicity goes unappreciated: filing taxes and power outlets and irradiating food with freaking death rays (okay, yes, I’m just naming things I see in my immediate vicinity). We’re lucky that people long ago had the foresight to realize how important/dangerous these things could be, and so they’ve all been aggressively simplified to protect people from themselves.

Are we done then? Has everything been child proofed already? It’s easy to believe so. But if you’re unfortunate enough to still own a computer in 2018, then you’ll know that we still have a ways to go. Computer are deceptively simple. Lots of people use them: adults and little kids and old folks. But despite their wide adoption, it’s still far too easy to use a computer the wrong way and end up in a lot of trouble. Here are a few things I’ve learned about computer security that I want to share. I won’t claim that following these steps will make you invulnerable, because that’s an unattainable goal. But I think these form a pretty good baseline, with which you can at least say you’ve done your due diligence.

Stop using a computer

I’m serious. How about an iPad? Not an option? Keep reading.

Use multi-factor authentication

This is the number one easiest and most effective thing you can do to improve your security posture right away. Many websites offer a feature where you’re required to type in a special code, in addition to your username and password, before you can log in. This code can either be sent to you via text message, or it can be generated using an app on your smartphone2. Multi-factor authentication is a powerful defense against account hijacking, but make sure to keep emergency codes as a backup in case you lose your MFA device.

Get a password manager

People are bad at memorizing passwords, and websites are bad at keeping your passwords safe. You should adopt some method that allows you to use a different, unpredictable password for each of your accounts, whether that’s a password manager or just a sheet of notebook paper with cryptic password hints (but see my post about data loss).

Try post-PC devices

Mobile operating systems (iOS and Android) and Chromebooks are the quintessential examples of trusted platforms with aggressively proactive protection (hardware trust anchors, signed boot, sandboxing, verified binaries, granular permissions). Most people already know this. But perhaps it’s not so obvious how poorly some of these protections translate to traditional programs.

Every program on your computer interacts with the file system, and while most well-behaved programs keep to themselves, every single one technically has access to all of your files. This puts everything on your filesystem, like your documents and even your browser cookies3, at risk. Programs have evolved with this level of flexibility, so filesystem access isn’t something that can easily be taken away. There have been attempts to sandbox traditional computer programs, like those found on the Mac App Store and Windows Store. But these features are strictly opt-in, and most computer programs will likely never adopt them.

There’s plenty of stuff to steal in the filesystem, but that’s not all. Modern operating systems offer debugging interfaces, which allow you to read and write the memory of other programs. They also offer mechanisms for you to read the contents of the clipboard, or take screenshots of other programs, or even control the user’s input devices. These all sounds like terrifying powers in the hands of a malicious program. But don’t forget that poorly-written and insecure programs can just as easily undermine your security, by allowing remote or web-based attackers to take control of them.

Because mobile and web-based platforms are newer, they’ve been able to lock down these interfaces. These new platforms don’t need to support a long legacy of older programs that expect such broad and unfettered access. Each mobile app typically gets an isolated view of the filesystem, where it can only access the files relevant to it. Debugging is disabled, and screenshots are a privilege reserved for system apps.

Don’t type passwords in public

If you film somebody typing their password, it’s surprisingly easy to play it in slow motion and see each key as it’s being pressed. This is especially true if you have a high frame rate camera, or if the victim is typing their password into a smartphone keyboard (or is just really slow at typing). Even if the attacker can’t see your fingers, there’s lots of new research in using acoustic or electromagnetic side channels to record typing from a distance. When you have to type your password, try covering your fingers by closing your laptop halfway, or go to the bathroom and do it there.

Don’t type passwords at all

Lots of people use a simple 6-digit PIN number or a pattern to unlock their smartphone. At a glance, this seems safe, because the number of possible PINs and patterns greatly exceeds how many times the phone lets you attempt to unlock it. But 10-digit keypads and pattern grids are also easily discernible from a long distance. Plus, phones that use at-rest encryption typically derive encryption keys from the unlock passphrase. There isn’t enough entropy in your 6-digit PIN or pattern to properly encrypt your data.

If you care about locking your phone securely, then you should use its fingerprint sensor and set up a long alphanumeric passphrase. You’ll rarely need to actually type your passphrase, as long as your fingerprint sensor works correctly. Thieves can’t steal your fingerprint (unless they’re really motivated), and you can rest assured that your strong password will protect your phone’s contents from brute force attacks.

Full disk encryption

If you have a computer password, but you don’t use full disk encryption, then your password is practically useless against a motivated thief. In most computers, the storage medium can be easily removed and transplanted into a different computer4. This technique allows an adversary to read all your files without needing your computer password.

To prevent this, you should enable full disk encryption on your computer (FileVault on macOS, or BitLocker on Windows). Lots of modern computers and smartphones enable full disk encryption by default. Typical FDE implementations use your login password and encrypt/decrypt files automatically as they’re read from and written to disk. Once the computer is shut down, the key material is forgotten and your data becomes inaccessible. Since the encryption keys are derived from your login password, you should make sure that it’s strong enough to stand up to brute force attacks.

Don’t use antivirus software

What is malware? Antivirus software use a combination of heuristics (patterns of behavior) and signatures (file checksums, code patterns, C&C servers, altogether known as indicators of compromise) to detect bad programs. They’re really effective in stopping known threats from spreading on vulnerable computer networks (picture an enterprise office network). But nowadays, all that antivirus software buys you is some peace of mind, delivered via a friendly green check mark.

A doctor in the United States wouldn’t recommend you buy a mosquito net. Similarly, antivirus software is a superfluous and unsuitable countermeasure for the modern day threats. It doesn’t protect against OAuth worms. It doesn’t protect against network-exploitable RCEs. It doesn’t protect against phishing (and when it tries to, it usually just makes everything worse). Since you’re reading this blog post, I assume you’re at least making an effort to improve your security posture. That fact alone puts you squarely in the group of people who don’t need antivirus software. So get rid of it.

Get a gaming computer

Games need to be fun. They don’t need to be secure. Given the amount of C++ code found in typical high-performance 3D games, I think it’s fairly like that most of them have at least one or two undiscovered network-exploitable memory corruption vulnerabilities. Plus, lots of games come bundled with cheat detection software. These programs typically use your operating system’s debugging interfaces to peek into the other programs running on your computer. I like computer games, but I’d be uncomfortable running them alongside the programs that I use to check my email, fiddle with money, and run my servers. So if you play games, you should consider getting a separate computer that’s specifically dedicated to running games and other untrusted programs.

Get an iPhone

You need a phone that receives aggressive security updates. You need a phone that doesn’t include obscure unvetted apps, preloaded by the manufacturer. You need a phone with million dollar bounties for security bugs. You need a phone made by people who take pride in their work, people who love presenting about their data encryption schemes, people with the courage to stand up against unreasonable demands from their government.

Now, that phone doesn’t need to be an iPhone, per se. But that’s the phone I’d feel most comfortable recommending to others. And if that’s not an option, maybe a Google Pixel?

Research your software

Who makes your software? Do you know? Have you met them? (If you live in Silicon Valley, that’s not such a rhetorical question.) Because security incidents happen all the time, it’s easy to think that they’re random and unpredictable, like getting struck by lightning. But if you pay attention, you’ll notice that a lot of incidents can be attributed to negligence, laziness, or apathy. Software companies that prioritize security are quite rare, because security is a never ending quest, it costs lots of money, and in most cases, it produces no tangible results.

If you’re a computer programmer, you should get in the habit of reading the source code of programs that you use. And if that’s unavailable, then you can use introspection tools5 to reverse engineer them. After all, how can you trust a piece of software to be secure if you’ve never even tried to attack it?

You should also research the software publishers, and decide which ones you do and don’t trust. Do they have a security incident response team? Do they have a security bug bounty? A history of negligent security practices? Are they known for methodical engineering? Or do they prefer getting things done the quick and easy way? If you only run programs written by publishers that you trust, then you can greatly limit your exposure against poor engineering.

Use secure communication protocols

The gold standard in secure communication is end to end encryption with managed keys. This is where your messages are only readable by you and the recipient, but you rely on a trusted third party to establish the identity of the recipient in the first place. You don’t always need to use end to end encryption, since other methods might be more widely adopted or convenient.

Don’t use browser extensions

Browser extensions are so incredibly useful, but I don’t feel comfortable recommending any browser extension to anybody (except those that don’t require any special permissions). There have been so many recent incidents where popular browser extensions were purchased from the original developer, in order to force ads and spyware onto their large preexisting user base. Browser extensions represent one of the few security weaknesses of the web, as a platform. So, you should only trust browser extensions published by well-established tech companies or browser extensions that you’ve written (or audited) yourself.

Turn off JavaScript

I mentioned before that websites run in an isolated sandbox, away from the rest of your computer. That fact supposedly makes web applications more secure than traditional programs. But as a result, web browsers don’t hesitate to boldly execute whatever code they’re fed. To reduce your exposure, you should consider only allowing JavaScript for a whitelist of websites where you actually need it. For example, there are plenty of news websites that are perfectly legible without JavaScript. They’re also the sites that use sketchy ad networks full of drive-by malware, probing for vulnerabilities in your browser.

Browsers allow you to disable JavaScript by default and enable it on a site-by-site basis. When you notice that a site isn’t working without JavaScript, you can easily enable it and refresh the page.

Don’t get phished

The internet is full of liars. You can protect yourself by paying attention to privileged user interface elements (like the address bar), using bookmarks instead of typing URLs, and maintain a healthy amount of skepticism.

Get ready to wipe

If you suspect that malware has compromised your computer, then you should wipe and reinstall your operating system. Virus removal is a fool’s errand. As long as you have recent data backups (and you’re certain that your backups haven’t also been infected), then you should be able to wipe your computer without hesitation.

  1. One pedal goes vroom. The other brakes. Clockwise goes to your right, and counter-clockwise, to your other right. If the dashboard lights up orange, pull over and check your tires. These simple rules are all you need to know in order to drive a car. The other parts don’t really matter. We expect cars to Just Work™, and for the most part, they do. ↩︎
  2. Or a U2F security key, if you really love spending money. ↩︎
  3. Encryption using kernel-managed keys makes this more difficult ↩︎
  4. Soldered components can make this harder. ↩︎
  5. Look at its open files, its network traffic, and its system calls. ↩︎

13 CommentsAdd one

Reading a bunch of blog posts
Thu, 29 Apr 2021 17:13:54 GMT

Hey, thanks for writing these enjoyable posts! Quick question – what was the video that you linked under your "Stop using a computer" recommendation (https://www.youtube.com/watch?v=sQB2NjhJHvY)? It is now private.

Roger: Sorry, I don’t remember!

Xolia Carter
Fri, 11 Jan 2019 21:26:43 GMT

Don't get me wrong, this was well written, but you have to also consider than most people cannot afford to purchase two computers and an iPad and an iPhone/Google Pixel and everything else. Most people don't have that luxury. Also, is it not an unrealistically paranoid response? Perhaps I read the post wrong or am misinterpreting it, but that is how I examined it.

Roger: That’s a good point. Security shouldn’t be a privilege for the wealthy. But at the same time, security research and software maintenance comes with a nonzero cost. Newer and more premium devices tend to get more attention when it comes to software updates. Security research generally targets only the most popular phones/computers/network devices/etc (at least, when the work is device-specific). Lots of people use their devices even after manufacturers drop support. But that should be a conscious trade-off between saving money and putting yourself at risk. Same deal with, for example, sharing a single device for your financial and gaming workloads. Nothing here strikes me as particularly paranoid (although those are the words of a paranoid person), but if something sticks out to you, I’d be happy to discuss more.

Hyperbolic Abnormality of the Mind
Fri, 04 Jan 2019 02:15:05 GMT

version. Then, all my hope refilled. Maybe there was a chance afterall. The advanced calculator version would obviously be better in determining the right answer. So, I filled in all the necessary information and—I needed a 211% to get an A. Welp. Desperate for some hope, I reensured myself by thinking that maybe the calculator was wrong or that I did something wrong. But, I always doubted myself, no matter what. Then the big day came. My math final. This was the only hope I had, even if the hope was less than stellar. So, I tried my absolute hardest and waited days for my results. When they finally came, I was mortified. 70%. I kept thinking, "Is this it? Is this the end? Is this my fate?" I figured out when the grades closed that the final wasn't even going to be put into my class grade. So, it wouldn't have worked out anyway. From the time I'm writing this, there are four days until my report card comes. I dread the moment that I have to get my parents to sign it, and they see that grade. This is basically a ticking timebomb, and the boom is coming soon.

Very soon.

Roger: Haha

Hyperbolic Abnormality of the Mind
Fri, 04 Jan 2019 02:07:33 GMT

Last quarter, I had an 89% in math. My parents are irrationaly strict regarding grades, and anything below ∞ is a death sentence. So that 89 was a big deal. I needed to fix that grade, and fast. Unfortunately, it was the end of the quarter, so I almost lost hope. Until I realised that I hadn't taken my final in math yet. For days, that was the only thing I could think about. That final. I studied basically all night so I could pass that final and get an A. But then a horrific thought came across my mind. What if a final grade wasn't enough to boost my grade? My finals are only worth 5% of my grade, so that realisation haunted me for days. The only thing I could focus on was if my final grade could raise my grade just 1%. I kept hoping that maybe, just maybe, there was a sliver of hope. But deep down, I doubted it. After a while, I couldn't take the anxiety anymore. I absolutely needed to find out if I could do it. But how? At first, I tried using a regular old calculator. It was very time consuming, and I was never certain if my final answer was valid or not. I needed something else. I looked up if there was any tool that could help me, and there was. The RogerHub Final Grade Calculator. I was so excited when I found it. All I needed to do was answer three questions, and voila. So, I did the necessary steps and—I needed a 109% to get an A. Panicked, I was certain that maybe the calculator wasn't accurate, and there was something else more reliable. Then I found the advanced

happy holidays
Thu, 20 Dec 2018 06:22:31 GMT

spent half my studying time for finals on this :) good skillz

Roger Hubschman
Tue, 18 Dec 2018 02:56:32 GMT

Roger I love reading your work. You are so insightful

Roger: Haha, thanks!

Anna
Mon, 17 Dec 2018 23:13:47 GMT

I love how you add random nature pictures. Very pretty

Roger: Thanks! I took all of them.

penny
Fri, 14 Dec 2018 06:15:49 GMT

I actually took the time to read all of this. You are very well spoken, and i may have learned a few things. Can you tell I'm procrastinating? well back to watching grey's anatomy.

Roger: Thanks for reading!

thanks
Tue, 11 Dec 2018 18:37:38 GMT

thank you roger

Roger: Sure thing

cool...
Thu, 06 Dec 2018 04:12:40 GMT

Roder you should do another blog soon... could you explain what booleans are? or maybe explain the pros and cons of apple product security vs. android security? or maybe just explain why you purchased this domain and blessed us with your existance? or last minute study tips for those of us who just spent 3 hrs reading and developing comments that were too good to post about all of your previous blogs instead of studying for their finals that are less than one week away *hypothetically speaking* ????
-Thanks m8

Roger: Haha, sure. I’ll work on that.

anna
Tue, 23 Oct 2018 15:26:36 GMT

wow, this gave me some info i never knew cough

Anonymous
Thu, 06 Sep 2018 20:58:04 GMT

I

Roger I Love You
Sun, 19 Aug 2018 03:11:07 GMT

Thanks Roger! I have learned so much and you are truly an inspiration to this world :)

Roger: Aw, thanks.

Post a Comment

Sat, 21 Dec 2024 16:09:08 GMT