Rick Sanchez explains command injection

Rick and Morty returned this weekend, and the third season premiere unexpectedly showcased just how devastating a successful command injection attack can be.
Held prisoner in a simulation of his own memories, sometimes-great, always-mad scientist Rick Sanchez is forced to relive the moment he created his portal gun so his alien captors can discover its secrets. As his former self makes frantic calculations on the garage floor, his adversaries greedily rub their hands together as they get the precious input they seek.
In fact, Rick’s alien accomplice is so keen to relay the information that he snaps a picture of it on his phone and beams it back to his celebrating colleagues outside of the simulator. But there’s a problem – they can’t hear his requests for extraction over the radio.
“The code you just uploaded wasn’t actually my portal gun formula,” Rick smugly explains to his captor. “It was a virus giving me full control over the brainalyser!”
Sure, the circumstances are typically silly, but this snippet from Rick and Morty perfectly summarises one of the most commonly repeated mottoes at the recent SANS Cyber Retraining Academy: All user input is evil and cannot be trusted.
What Rick’s alien captors should have done is built some kind of filter into the brainalyser to prevent malicious code from being parsed and executed.
If that last sentence sounded ridiculous, that’s because it is – but it’s a neat analogy for some of the biggest cyber breaches in recent years. For example, the TalkTalk breach, which involved the personal details of nearly 160,000 customers, was the result of a SQL injection attack. In short: A teenager managed to execute some code where he shouldn’t have been able to.
So next time you’re about to deploy an app or service, stop and think: What harm could a hacker (or a mad and quite probably drunk scientist) do if they supplied the wrong input?
📓 Field Notes // A newsletter by MattCASmith
Personal observations, things I'm reading and watching, and ideas that didn't make it to the blog – delivered to your inbox once a month, no more.
📓 |
Field Notes newsletter |
Personal observations, things I'm reading and watching, and ideas that didn't make it to the blog – delivered
to your inbox once a month, no more.
No spam. Unsubscribe anytime.
Other posts
- A reminder that you can just do things... kind of
- FIFA's failed sell-off and the duty of custodianship
- Will the RAM crunch force a return to optimisation?
- Field Notes 12 // Heatwaves, agency, and the Kindle
- Claude's café pop-up convinced me to switch LLMs
- There's no substitute for real-world experience
- Field Notes 13 // Hotel life, Waymo, and the World Cup
- We are witnessing the death of the games console
- Cheap AI got us hooked — now it wants its Uber moment
- Field Notes 14 // Hospitals, grindset cafés, and Weezer
- AI labs make their case to humanity as agents run amok
- You will never own another PlayStation game again
- Staying productive when everything feels urgent
- Your new feature is clever — but does it work in real life?

