Security is prevention from harm:
Note the relationship between these fields:
An information system is secure if users are unable to force it do things it was not intended to do, such as: divulge confidential information, modify or erase protected data, or fail to work because it is too slow or has crashed.
Correctness is concerned with a system always doing what it should; security is concerned with a system never doing what it shouldn’t. Depending on how we specify what exactly the correct behavior is, the terms may overlap, but the emphasis sure is different! The former focuses on use cases and the latter on misuse cases.
Always does what it should
(considers use cases)
Never does what it shouldn’t
(considers abuse cases)
Whether we are securing people, products, or organizations, security is about asset protection. That which you are protecting your assets against are called threats. Assets can be:
People, buildings, equipment
Code, data, intellectual property, service availability, reputation
In order to build and maintain secure systems, we have questions to consider, strategies to employ, and a mindset to enter.
Start with some deep thoughts:
We should be able to deploy knowledge and tools from each of these areas:
The construction of systems immune to attack
Alarms for intruders, performance degradation, malware, weird traffic patterns, fraud, and similar things
Readiness to implement a disaster recovery plan, perform repairs, replace assets, and so on
Building something? Prepare yourself!
There is a mindset to security, much like that of a QA engineer.
The security mindset is concerned with:
The more complex a system, the easier it is to attack
Most incidents are due to sloppy code
Avoid single points of failure, defend in depth
There may also be certain ways of looking at the world like:
...but in a well-layered system, there will some inputs you can trust. Wariness is not necessarily the same as paranoia.
Story Time
There was once this e-commerce company that did not check the bounds on the quantity field in the order, so customers figured out they could order a negative number of units of a product and ... (story continues in class)
You may be tempted to think of your users as your friends. They are also your adversaries.
But what about people in your organization? Should they be just given access to everything behind the firewall? No! Malicious insiders do exist! But even if everyone is good, maybe their machines were compromised with malware. Maybe they made a typo that wiped out data.
Then again, pragmatism and context is important too. Security is often in opposition to convenience. Think about context.
Watch the following video and note these takeaways: (1) Backdoors (lawful intercepts) get exploited by hackers, (2) Even with a huge list of mitigation strategies and tactics, it just takes one person to miss just one of the hundreds of checklist items to allow attackers in, (3) Stay current on your security patches and replace old vulnerable pieces of hardware constantly. If you are a user, (4) always use messaging systems with end-to-end encryption.
Threats are everywhere. But what kind of threats are there? What can attackers do? Understanding threats and thinking like an attacker is crucial to a good defense. Here is a very incomplete list, but it gets you started:
Type | What it is | Examples |
---|---|---|
Eavesdropping | Tapping in to a communication line | Stealing info such as company secrets, military plans, credit card numbers, keys, credentials, or PII (personally identifiable information) such as SSNs, birthdates, family members, medical information |
Spoofing | Modifying data in transit | Making it look like the sender said something they didn’t; replacing the source IP address to make it look like a packet came from somewhere else; changing a purchase shipping address to the attacker’s secret PO Box |
Denial of Service | Making information unavailable to users that need it. | Preventing data from getting to its intended target by rerouting packets in a network; flooding a network host or router with so many packets that nothing effectively gets through; forcing a program to perform a nasty long-running computation or generate a massive amount of data; causing a program to fill up its filesystem |
Breaking In | Loading and executing malicious code on a victim machine or process | Updating or deleting data; installing a key logger to record everything the victim does and send to another server that collects stolen data; having the host join a botnet; opening a remote shell |
How these attacks are carried out will be covered later. Right now we’re just introducing bigger themes.
Don’t forget about non-technical dimensions
Phishing is a problem too—Humans can fall for lots of stuff. Know what else is a problem? Malicious insiders.
Don’t get caught up in security features
Your design and implementation should have requirements such as “only allow authorized users to access this resource“ and NOT “Make a login screen” or “Use SHA-512” or “Make sure the password has non-alphanumeric characters”.
“It is the night of March 25, 1854, and the Swedish Öst-Götha Bank is soon to be robbed. The military corporal and former farmer Nils Strid walks silently up to the bank together with his companion, the blacksmith Lars Ekström....The bank has invested in high-quality locks for the vault—more or less impossible to pick. But for blacksmith Lars it is not a big job to splinter the hinges and open the vault door backward.” [Secure By Design, Section 1.1.1.]
It is helpful to describe attributes of a secure system. This gives you a model for structuring your security strategy. The big three are sometimes called CIA, for confidentiality, integrity, and availability :
Attribute | What it is | Some Techniques |
---|---|---|
Confidentiality | Preventing data from being disclosed (leaked) to the wrong people, either accidentally or by malicious eavesdroppers | Encryption (both at rest and in transit), User authentication (passwords, passphrases, tokens with cryptographic digital signatures), User authorization (roles and permissions) |
Integrity | Preventing data from being accidentally or maliciously modified or corrupted (or if there is tampering, to know that it happened) | Message Authentication Codes (MACs), CRCs, Checksums, Secure programming practices |
Availability | Services must always be accessible and up as much as possible. | Monitoring, Fault tolerance (e.g., secure software practices such as bounding numbers), Restore/restart, Scaling (scale-out so attackers cannot block all paths), Upstream filtering |
For more on CIA, you can read this short introductory article.
Sometimes you will see others:
Attribute | What it is | Some Techniques |
---|---|---|
Accountability | Tracing actions back to the person that performed them | Logs |
Non-repudiation | The impossibility of someone denying they carried out an action | Trusted third parties such as Certificate Authorities |
There is no one security module in a system. Just like correctness is a concern at all levels, so is security! There’s a quote that says “Security is a concern, not a feature”
It is an important quote.
Again, security is not a feature that you can add on at the end of a project. It is a concern that must be addressed at every level of the system.
At this level you will find:
The O.S. can provide:
/etc/password
is -rw-r--r-- root
and holds everything but the passwords, while /etc/shadow
is -r-------- root
and has uids and passwords.Here you will see things like:
Applications should have security in their design (authentication, authorization, permissions, roles, etc.) and should implement range checks, disallow weak passwords, and handle password-reset properly. They might even expire passwords and support security questions, but these two things are very controversial.
Programmers should be aware of as many known categories of vulnerabilities as possible and know how to avoid them. There are zillions of known vulnerabilities; some are generic, some are related to C programming (pointers, etc.) and some specific to webapps, such as the OWASP Top Ten (But don’t just focus on the top 10, focus on all of them.)
Secure software development is a fascinating field. There are two main themes here. (1) You may be surprised how far careful design, particularly the understanding of your domain, goes in prevention. (2) You have to consider security at every level of the software lifecycle:
During | You might |
---|---|
Requirements Definition | Misstate or omit permissions and roles, or fail to capture any number of security requirements |
Architecture and Design | Incorrectly specify security zones and boundaries, or simply produce designs with logic errors |
Programming | Introduce bugs (surprise), especially those that create technical vulnerabilities |
Code Reviews | Miss a vulnerability |
Testing | Miss a vulnerability |
Deployment | Use the wrong configuration script or environment variables |
Maintenance | Introduce a regression (a flaw that was not there before) |
Here’s a little step-by-step guide that elaborates just a little bit more.
Be wary about phishing and other personal scams. People can pretend to be someone else (misrepresentation) and just ask you for credentials or even money. These may incidentally use a network but can also happen over other communication channels, including face-to-face.
And don’t give network analyzer tools (like packet filters, packet sniffers, tcpdump
and others) to non-trusted folks.
More generally, within an organization:
You should even be careful about the rights you give even to trusted people, because their machines may be compromised (be running malware)!
If you like to divide up a field into chunks for studying, here’s a somewhat arbitrary and very rough start, identifying three areas:
SECURITY ARCHITECTURE (outside the code) |
SOFTWARE SECURITY (inside the code) |
---|---|
Defense, intrusion and malware detection; Auditing; Firewalls and similar things; Forensics; Anti-virus software; Configuring security groups, VPNs, zones, and so on; Security protocols such as IPsec and others; Management, governance, compliance, ethical, and legal issues; Enterprise cyberoperations; Privacy. | The practice of secure software development (at all levels: requirements, analysis, design, coding, code reviews, testing, deployment, maintenance); Knowledge of known vulnerabilities and strategies and tactics to mitigate them. |
MATHEMATICAL FOUNDATIONS | |
Cryptology = Cryptography + Cryptanalysis; How to prevent eavesdropping; How to ensure the integrity of messages; Digital signatures; Symmetric vs. asymmetric cryptography; Secure distribution of keys. |
Henry Jiang has made an awesome map of the field:
You can find an extension of the diagram here.
It is helpful to agree on some basic vocabulary up front. Let’s start with six basic terms:
The adversary wants to find vulnerabilities and exploit them. The system designers want to prevent vulnerabilities or at least make them really hard to exploit if they do get through the design, implementation, review, testing, and deployment safety protocols. The goal is to design and implement the software so that no vulnerabilities are introduced.
There are hundreds more terms you will be learning. To get a feel for more terms, browse the NICCS glossary.
Don’t miss:
Here are some questions useful for your spaced repetition learning. Many of the answers are not found on this page. Some will have popped up in lecture. Others will require you to do your own research.
We’ve covered: