#security

Software security / 13 posts

Newsletter
  • Get a newsletter digest every Friday:
Contact

Send me feedback, tips, bug reports, and anything else:

About me and the blog

My name is Marcin Wichary (he/him). I’ve worked as a UX designer, typographer, front-end person, and manager at Google, Medium, and Figma. I’ve also written a book about keyboards and typing, gave talks, and published essays about design, typography, and technology.

Unsung is my blog about software craft and quality.

More info about Unsung

Send me feedback, tips, bug reports, and anything else:

More info about Unsung

Linear’s login helper

One of the problems I encounter with modern login screens is remembering which sign in method I used for a particular service, and I was delighted to see Linear’s login screen help me out here:

I imagine this will only work on a machine I’ve used before – otherwise it’s a chicken-and-egg situation – so it doesn’t quite solve the entirety of the problem, but I still thought it was a nice gesture.

“From digital mischief to outright destruction”

The 1980s and 1990s PC viruses were a special breed. The MS-DOS operating system wasn’t particularly secure – few home computer operating systems were back then – so viruses could spread quickly, and many did.

Some of the viruses focused more on actually wreaking havoc and destroying things, and some primarily on effective propagation that served no additional purpose. The last group was viruses that were maybe… a little bit exhibitionist, announcing themselves with various audio-visual effects of the kind of quality you might expect from vintage computers in the hands of bored programmers.

Various antivirus programs were as much a necessity back then as ad blockers feel today. In Poland, the most popular one was called MkS_Vir – named after its creator, Marek Sell.

I believe MkS_Vir had a reputation for being great at detecting the viruses and disinfecting machines, but part of its appeal was that it also hosted something that you could call a virus zoo – a few actual viruses, completely defanged but still presenting their audio-visual effects, so you could experience them without any fear.

I emulated MkS_Vir just to show you. Here’s a virus that once in a while would make all your letters uppercase:

Here’s one that would rotate your screen on Fridays:

Here’s one that a month after the infection would show flames – and render your computer unbootable:

Here’s one that laughed at you:

Here’s one that waited three months and then ate your letters:

This one was a true classic, making your letters fall:

And this one flushed your screen like a toilet:

These all seem retro and cute today. I don’t want to trivialize them, though, even those that “only” messed up your screen. Imagine being new to home computers – already a petrifying proposition – and then seeing something like that, not knowing whether computers were even meant to do this.

Turns out, there were a lot more “virus zoo” efforts.

A Czech antivirus program called AVG also had a built-in one; YouTube has a video walking your through a lot of them in sequence.

The Internet Archive has a malware museum, created by Mikko Hypponen in 2016. What’s particularly interesting about this effort is that these 87 entries are not screenshots or videos – they are actually emulated malware, rendered inert in part by emulation’s inherent sandboxing, and in part by some careful preparation, likely similar to the ones above.

Lastly, danooct1 has been collecting and showcasing viruses, trojans, and worms on his YouTube channel. These are not the most gripping narratively, but at 672 videos (sic!), one has to admire the sheer effort. They extend the timeframe from the DOS era to early Windows, and occasionally even more platforms. This makes it possible to see more modern takes on the viruses above, like a melting screen worm, now in true graphics mode…

…or the legendary (in the derogatory sense) YouAreAnIdiot trojan:

Just visit the channel, click on Popular, and enjoy from the comfort of your timeshifted and airgapped chair.

The title of the post comes from the description of danooct1’s channel.

Book review: The Cuckoo’s Egg

It’s Halloween Week on Unsung, where we’re sharing scary, spooky, and creepy stories.

★★★★☆

My server was hacked a few months ago. It wasn’t an obvious “bad password” kind of a situation, but I believe a hole in PHP propped open by some code I wrote 25 years ago. (It’s entirely possible some ancient scripts I wrote for GUIdebook were to blame!) The hacker replaced some of my pages with garish ads for Indonesian casinos, and did some other slight damage. For a few days and nights, I played a cat-and-mouse game with the attacker, learning things, trying the newest patch, only to wake up to see some new pages on my server taken over – up until the moment I managed to close it all off.

There were times during those few days when I knew I was patching my server at the same moment as the hacker was breaking it. It was a very strange, unnerving feeling, with some part of me wanting to reach out, have a conversation, generally learn more about them, or maybe also – I’m not going to lie – kick their ass.

The Cuckoo’s Egg by Clifford Stoll is a book about a similar situation, except the story is from the mid-1980s, the server is at the Lawrence Berkeley National Laboratory, and the break-in takes longer than just a few days.

And it all begins rather innocuously:

And so it happened that on my second day at work, Dave wandered into my office, mumbling about a hiccup in the Unix accounting system. Someone must have used a few seconds of computing time without paying for it. The computer’s books didn’t quite balance; last month’s bills of $2,387 showed a 75-cent shortfall.

Now, an error of a few thousand dollars is obvious and isn’t hard to find. But errors in the pennies column arise from deeply buried problems. […]

I found the book – written by an astronomer! – much better than it had the right to be. The story gripping and continues throwing new wrinkles at the already interesting situation. I could sense some liberties taken with real-life events and chronology in service of smoother storytelling, but it all still feels pretty real, and nothing grated me too much.

Released chronologically right in between WarGames and Sneakers, it is appropriately retro and old-fashioned – but there are still techniques that feel relevant, aspects of security that I don’t think changed that much since, and fascinating details I learned from.

The only thing that bothered me was that the book should have ended a chapter or two before it did – there is a sort of second ending tacked on – but, to be fair, a lot of books have the same problem. If you feel like you’d fancy a breezy computer security espionage story from the 1980s, I’d recommend this one!

“If you’re still using Popcorn Time, we think it’s time to move on.”

It’s Halloween Week on Unsung, where we’re sharing scary, spooky, and creepy stories.

From The Verge:

Remember Popcorn Time, the app that served as an easy-to-use front end for streaming torrents of movies and TV shows? Development of the MPAA’s least-favorite app of the 2010s has been abandoned for years, but the “Netflix of Piracy” software is still installed on millions of devices that are just waiting to join a bot army. Researchers at Eye Security found the updater for a Popcorn Time fork called “Time4Popcorn” still running on tons of Windows, macOS, and Android devices located around the world, phoning home to now-abandoned web domains over unencrypted HTTP and running an outdated, insecure version of Chrome. […]

Eye Security’s Niels Teusink says the updater could have been used to install and run basically any kind of software with full privileges, easily enabling someone to create a botnet just by taking over one of the domains, using a man-in-the-middle attack to target specific devices, or perform surveillance by identifying the machines running the software.

One security company took it upon themselves to prevent that from happening, but the way to do it was to… trick the apps into… updating themselves to death.

(A more detailed information can be found on Eye Security’s website. It’s not the same story, but it reminded me of another creative way to solve a widespread problem that we talked about.)

What it says on the tin

Nice moment in Slack and Medium – when logging in, the login code that arrives via email is already there in the subject, in addition to hiding inside:

This feels good for two reasons. One is the obvious one: you see the code earlier, it might show up in a notification, etc.

But also, this should prevent multiple login codes to be threaded as a “conversation” inside your email client, since threading is based on the email subject – and threaded utility emails can be extra confusing.

“Maze of pages, redirects, and confirmation emails”

Nikita Prokopov on his fun Tumblr-like site Grumpy Website that collects UI transgressions with light commentary:

Why log in when you have to, when you can instead experience the same Kafkaesque maze of pages, redirects, confirmation emails, copying codes, and searching for a second device—all a week in advance?

I agree with authentication experiences being absolutely horrible, especially in the corporate context. But I think the “your login expires in 5 days” callout is actually positive. Your reauthentication will happen anyway according to the security regimen. Instead of it potentially surprising you at a wrong moment – for example just before, or in the middle of the presentation in front of a boss – you could get ahead on that process during the next moment of downtime, and have some peace of mind.

I know Slack has a similar warning, although I don’t happen to have a screenshot handy; I imagine a few other places do, too.

(However, that gesture doesn’t give apps permission to handle expiring credentials badly. There should be no excuse for losing anything the user is doing – for example writing a long comment – just because the reauthentication kicks in in the middle of them doing that. Even the app losing its mind for a while just as its separate parts are waking up to the reality of reauthentication at their own pace and throwing strange errors, but the login screen hasn’t reappeared yet, can be really confusing.)

“The evilest will-breaking browser game to exist.”

In 2023, Neal Agarwal created The Password Game, a viral browser-based game. Wikipedia has a nice summary:

Although the initial requirements include setting a minimum of characters or including numbers, uppercase letters, or special characters, the rules gradually become more unusual and complex. These can involve managing having Roman numerals in the string to multiply, adding the name of a country that players have to guess from random Google Street View imagery (as a reference to GeoGuessr), inserting the day’s Wordle answer, typing the best move in a generated chess position using algebraic notation, inserting the URL of a YouTube video of a randomly generated length, and adjusting boldface, italics, font types, and text sizes.

The explanation goes on for another paragraph, but I don’t want to spoil too many surprises. However, if you’re not a puzzle kind of person, you can just watch a 40-minute video of Bog trying to beat it:

Last year, Agarwal followed The Password Game with I’m Not A Robot game, making fun of similarly onerous CAPTCHA requirements. Here’s Bog completing it once again – and you can also find other YouTube creators doing the same for both games:

In the same category, a game designer Linternet User just launched a teaser for their game CAPTCHA Hell, which has a different take and looks fun:

I need to add that underlying all of this “fun” is not just tons of frustration with passwords and CAPTCHAs, but also a genuine accessibility problem, as described by Robin Christopherson in 2019 in an article titled AI is making CAPTCHA increasingly cruel for disabled users, or by A11y Collective a few years later. I don’t know what is the absolute latest in the battle with AI bots; anecdotally, I have been seeing almost zero text CAPTCHAs and less visual CAPTCHAs, at the expense of more and more CloudFlare turnstiles (and Google’s equivalent), which make you only click the button, and do a lot of work under the hood to determine if that button press felt human-y or robot-y:

These challenges include proof-of-work (computational puzzles), proof-of-space, probing for web APIs, and various other challenges for detecting browser-quirks and human behavior. As a result, we can fine-tune the difficulty of the challenge to the specific request and avoid showing a visual or interactive puzzle to a user.

There is no more explanation. I think the nature of the beast is that the actual details of how to tell one group from another cannot be shared, which is a shame – I’m very curious.

Noise as information and information as noise

In 1982, the videogame Yars’ Revenge for the Atari 2600 needed to show a “neutral zone” in the middle of the screen. The console was so primitive – an entire great book was written about this – that it didn’t have any video memory. Any cheap effect would do, even random noise… but something as simple as generating noise was also too much for the underpowered system. So the creator of the game decided to do something that in any other situation would mean at the very least trouble, if not a downright security disaster. He crossed the wires and output on screen… the game’s own source code:

The source code looked noisy enough, and the problem was solved. (Somewhat recently, Retro Game Mechanics Explained analyzed it carefully in this YouTube video, to make sure it’s not just a myth.)

A similar approach was used in a Nintendo GameCube game Metroid Prime, at a moment when the protagonist’s visor needed to appear disrupted. It was two decades later, but the team still bounced off of hardware limitations, this time around memory:

The GameCube only has 24MB of RAM, so every texture has to be carefully considered. If we used a low resolution texture (64x64) to save memory the “static” would be blurry and not crisp. One engineer on the team came up with a great idea: what if we just use the memory holding the Metroid Prime code itself! We quickly tried it out and it looked amazing. When you see Samus’s visor affected by electrical “noise” in game, you’re actually seeing the bits and bytes of the Metroid Prime software code itself being rendered on the screen. Turns out machine code is sufficiently random to work great as a static noise texture!

This is how it looked:

A few years later, in 2008, people working on Xbox 360 were testing a new interface for their entire console. It was called NXE – New Xbox Experience – and in the bottom-right corner it showed delightful ripples:

…or, not just delightful. While NXE was tested internally, the ripples actually encoded the serial number of the console, to prevent leaks. Apparently, it was built specifically so that Microsoft only needed just two images to find out the entire serial number.

A less surreptitious version of this idea exists today – for example, setting up a new Apple Watch shows a pretty pattern…

…that also happens to encode enough information to identify the specific one watch. It really appears to be nothing more than an obfuscated QR Code, and “boy, have they patented it.”

I know concealing a message inside another message is called steganography. I don’t think all of these fall under that umbrella, and I don’t even know all the above can be called “hacks.” I just thought they were interesting examples of information masquerading as noise, and noise pretending to be information.

“Accents are an opportunity, not a burden.”

The iOS 26 update introduced a bug in the Czech keyboard. Instead of the customary háček (ǍǎĚěǦǧǏǐǑǒǓǔY̌y̌) in the bottom row, another key was duplicated, removing access to the accent character (or, a diacritic) very popular in that language.

Here is the before and after of this situation:

Ordinarily, this can be frustrating but not insurmountable; you can always copy/​paste, rely on autocorrect to help out, or even add some topical text replacements for common phrases. The problem is that this bug only appeared on the keyboard used for logging on, and at least a few people used that character in their password. There, none of these workarounds were available – and so those people were now completely locked out of their iPhones.

The Register reported on this on April 12, and a few days later suggested that Apple was working on a fix. I won’t keep you in suspense; I just verified that the fix landed with the recent May 11 update.

This is, in an of itself, not a fascinating story, but with interesting things to talk about at its periphery.

First of all, The Register never showed a single screenshot. This led to a lot of confusion and speculation in the comments. Turns out, screenshots are valuable not just with bug reporting, but also with bug reporting.

Second, check out this Czech keyboard. Even within the limitations of the ancient QWERTY, there’s a lot of cool stuff happening here. Two new accented keys just appear on the top layer when you switch to Czech. Both have magical properties, too. They’re the modern “dead keys” that either stand alone, or get combined with the previous letter if that makes sense.

This is the stuff typewriters, and even desktop keyboards, could only dream of. But, as always, more software means more bugs, including some with unforeseen consequences; a typewriter could never break this way.

Thirdly, there is this interesting tension between us being led to believe “more interesting passwords are safer,” but then sometimes being penalized for actually making them interesting. A decade ago someone used emoji in their password without realizing they won’t be able to input it, and I’m sure there were other examples.

But the most interesting, to me, part? It’s the diacritic itself. Under one of the posts, a commenter wrote:

Stick with the 7-bit ASCII subset. You will never go wrong.

7-bit ASCII basically means “26 Western letters and nothing else.”

I hate this. I know it’s objectively true – in the late 1980s I felt a sense of relief my name didn’t have any of Polish language’s nine diacritics, which would complicate my life. Even just yesterday in Germany, I spotted this:

Software still struggles beyond ASCII. But this is why we need to keep pushing. Diacritical characters are to be found everywhere in the world. They’re detailed, and varied, and filled with histories. Umlaut is not diaeresis. Kreska is not the acute. A háček is not a breve. They’re rarely optional decoration, and often not even decoration at all; learning about Turkish dotless i might completely upend your understanding of what’s an accent and what is not.

If you don’t have a favourite diacritic, you are missing out. Even the names – grave! ogonek! horn! – are beautiful. (Háček is also known as caron and a wedge depending on context, and in other regions referred to with beautiful words kvačica and strešica.)

If you’re interested, here is David J. Ross’s 22-minute talk about getting to love diacritics from the perspective of a type designer. It’s filled with craft and playfulness:

My favourite accent is, obviously, ogonek. Just looking at Adam Twardoch’s guide on how it should be drawn fills my heart with joy:

“This is where your mouse becomes a cryptographic instrument.”

A fascinating 9-minute video from PawelCodeStuff about randomness in the context of computing:

It explains those weird moments where sometimes the computer asks you to wiggle your mouse – to generate unpredictable numbers – although the specifics of what exactly was random in my wiggling was a surprise to me.

There is something poetic about computers yearning for that one thing they can never get – complete unpredictability – and collecting it in a little pool like you would something very precious. Also fascinating that in modern CPUs, there now exist hardware components that gather truly random data from the real world.

While I have never needed true randomness in my design career, knowing how to control pseudorandomness (specifically, how to replay it) has been helpful.

Here’s an example. In my essay about Gorton, there is this interactive bit where you can drag a slider for “messiness.” With regular pseudorandomness, the experience is wiggly and gross:

But when you always restart the prng from the same seed (“the Groundhog Day maneuver”), it feels much better:

Out of touch

An interesting flavour of a molly guard that can only happen in onscreen interfaces is “occasionally moving things out of the way to mess with the user.”

The messing-with-the-user part is, ostensibly, for their benefit. Making something not appear in the usual position, or not behave the usual way, becomes a speed bump, cancels out motor memory, and forces a conscious reaction rather than flying through the interface on autopilot.

The simplest example is dialogs that ask about dangerous actions suspending the “default action happens when you press Enter” behaviour:

(There is a way to continue the dialog on the right using the keyboard alone – but it’s only via ⌘R and not the default, breezy Enter.)

Another version is swapping buttons or showing them in an otherwise unusual order:

But remember when I said “can only happen in onscreen interfaces?” Well. The apotheosis of this very idea, spotted in a New York alley, proves otherwise:

It’s a Hirsch ScramblePad, inconsistent very much by design, a login mechanism where every time the digits get put in a different place.

The idea is meant to help with two problems:

  • It makes it harder for someone standing behind to learn your code from just watching your movements, as it abstracts the movements to be one step away. (The strange visual filter is meant to make the viewing angle as narrow as possible, too.)
  • It prevents uneven wear and tear of the buttons, which people could use to guess your code:

I understand “ScramblePad” was the original product (here’s the patent with some nice illustrations), and the name got genericized since. Here’s competition, MIWA Random Tenkey – once probably so much more futuristic, today equally quaint:

One can occasionally see more modern versions today:

But back to our beloved screens, where some banking web apps copied the idea:

And even recently, Motorola touted it as a feature on their phones:

I’m not a security expert, so I won’t try to opine how effective those things are. I tried to research whether forcing a password out of motor memory – which these will accomplish – is ultimately better or worse, but a lot of the papers I found were inconclusive. (As always, some of the theoretically good ideas for security bounce off of human limitations and convenience: Forcing someone to remember a password might mean they will write it down somewhere, effectively making things worse.)

Got your back, pt. 3

A nice moment spotted in Slack:

By definition security and usability coexist wearily, so it was nice someone thought about allowing me to do this at an opportune time, rather than at a random moment that might be extremely untimely or stressful.

In stereo, where available

An extremely bad click-through experience in Vimeo: a whole lot of redundant text, and a double captcha (luckily you only have to click on one).

Put the little captcha box in the middle of the screen and that’s it. Nothing else feels necessary. A great example of an insecure interface.