Information Security Developer eBook
A Coursebook on Information Security Developer
by Regan Mui
A Coursebook on Information Security Developer
Formats
Free sample
Chapter 1: The Developer’s Blind Spot...--You just shipped code. You ran the unit tests. They passed. You did a code review—three thumbs up. You deployed to production, and for seven glorious minutes, nothing caught fire.
Then the page arrived. Not the 404 page. The other one. The Slack message that starts with “Uh oh” and ends with your manager’s name in bold.Someone found a way in. Not through a heroic zero-day or nation-state quantum cryptography.
Through your login form. Through a line of code you wrote two weeks ago at 4 PM on a Tuesday. Through a mistake so simple that when the security team explains it to you, you will want to delete your Git history and move to a cabin without internet.You are not a bad developer. You are a normal developer. And that is exactly the problem.Welcome to the first chapter of a book that will change not just how you write code, but how you think about code.
This is not a security textbook. It does not begin with definitions of “confidentiality” or long lists of attack acronyms that you will forget by Chapter 3. This book begins with a confession and a challenge.The confession: Almost every vulnerability you will ever ship comes not from advanced hacking techniques but from blind spots—assumptions you made that you did not even know you were making. The challenge: By the time you finish this chapter, you will see your own code differently. You will look at a login form and see not just a feature but a trap door.
You will read an API endpoint not as a convenience but as a promise you are making to every attacker on the internet. And you will understand why the old model—developers build features, security teams say no—has failed, is failing, and will continue to fail until someone changes the game.That someone is you.The $250,000 Default Password Let me tell you about a developer named Priya. Priya worked at a startup that built analytics software for small retailers. She was good—really good. She could spin up a REST API in an afternoon, debug race conditions in her sleep, and explain the difference between a left join and an inner join without looking up from her coffee.
Priya was exactly the kind of developer you want on your team.One Friday afternoon, her manager asked for a favor. “We need to spin up a quick reporting database for a new customer. Just throw together a Mongo DB instance, load some sample data, and we’ll lock it down later. It’s internal only, no sensitive stuff yet.”Priya did what any reasonable developer would do. She ran docker run -d -p 27017:27017 mongo, connected from her application code with the default connection string (no username, no password, because she hadn’t set one up yet), and loaded a few thousand records of anonymized transaction data.
She tested the API endpoint, confirmed that it returned JSON, and moved on to the next ticket. “We’ll add authentication next sprint,” she told herself. “It’s internal anyway.”Over the weekend, a bot scanning the entire IPv4 address space for open Mongo DB ports found Priya’s database. The bot didn’t care that it was “internal only” or that the data was “anonymized.” The bot dumped every record, posted the IP address to a public shodan database, and moved on. Three days later, a ransomware group downloaded the data, encrypted what was left, and demanded $250,000 in Bitcoin.The customer left.
The startup laid off four people. And Priya learned something that no computer science class had ever taught her: default configurations are not temporary. They are permanent until exploited.Here is what Priya did wrong, in order of increasing subtlety:She exposed a database to the public internet without authentication.She used default credentials (which, in Mongo DB’s case, means no credentials at all).She assumed that “internal only” and “not sensitive yet” meant safe.She did not think about who else might be scanning for open ports at that exact moment.She never asked the question that separates a feature developer from a security-minded developer: “What happens if someone uses this the way I did not intend?”That last question is the entire thesis of this book.The Two Mental Models Every developer operates from a mental model. Most of the time, this model is unconscious—you do not think about it any more than you think about your own breathing. But your mental model dictates everything you build, every assumption you make, and every vulnerability you create.The Feature Developer’s Mental Model asks one question: “Does it work?” You write a function, you give it valid inputs, it returns the expected outputs.
The user is happy. The ticket is closed. You have succeeded.This model is not wrong. It is incomplete.The Security-Minded Developer’s Mental Model asks two questions. First: “Does it work?” Second: “What happens when someone uses it in a way I did not expect?”That second question changes everything.
It transforms a login form from “Does it accept the correct password?” to “What happens if I send a password that is ten thousand characters long? What happens if I send Unicode characters that look like letters but are not? What happens if I send SQL syntax instead of a password? What happens if I am not logged in at all but I call the ‘reset password’ endpoint anyway?”Notice that none of these questions require advanced cryptography or a Ph D in computer science. They require curiosity.
They require paranoia. And they require a shift from the default human mindset—“Things will work as expected”—to the attacker’s mindset: “Things will break in ways I have not imagined.”This chapter—this entire book—is about making that shift automatic. You will not become a full-time security engineer. You will not memorize every CVE or build your own fuzzer. You will learn to ask the second question so consistently that it becomes part of your muscle memory, like closing parentheses or running tests before you push.The CIA Triad for People Who Write Code Security textbooks love the CIA Triad.
Confidentiality, Integrity, Availability. Three big words that sound important but feel abstract when you are staring at a pull request. Let me translate these into code.Confidentiality means that only the people who should see data can see it. In code, this means encryption at rest (your database), encryption in transit (TLS between services), and access controls (authentication and authorization). When you store a user’s email address in a database column that anyone can query, you violate confidentiality.
When you log a credit card number to your debugging console, you violate confidentiality. When you create an API endpoint that returns another user’s private data because you forgot to check user Id against the session token, you violate confidentiality.Integrity means that data is accurate and has not been tampered with. In code, this means input validation, output encoding, and cryptographic signatures. When you trust a hidden form field () and an attacker changes it to "true" using browser…
This is the end of the free sample. Get the eBook to keep going. Buy now
About this book
Details
- Author
- Regan Mui
- Publisher
- SamEnrico
- Language
- English
- Genre
- Non-Fiction, Informative, Educational
- Released
- 2026-06-02
- Pages (approx.)
- 146
- Available as
- eBook, Audiobook
Read better in the ZLOADR app
Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.
More by Regan Mui
The Mindfulness Burnout ShieldRegan Mui$11.99
Speaker's Temporal DistancingRegan Mui$11.99
Senior Hearing Loop Self Esteem WorkbookRegan Mui$11.99
Elder Care Sibling Anger GuideRegan Mui$11.99
The Attachment Wound Self Esteem GuideRegan Mui$11.99
Galileo's Rebellion: The Man Who Defied the HeavensRegan Mui$11.99
Understanding Lymphoma, Large-cellRegan Mui$17.99
Executive Summary Numbers StoryRegan Mui$12.99
Beauty Personal Care GuideRegan Mui$12.99
How to Become a Drapery OperatorRegan Mui$11.99