High Assurance Rust
Frequently Asked Questions (FAQ)
Engage with this Book!
Sponsor Call for Proposals (CFP)
Download
Changelog
License
Novice: Systems Security
1.
Introduction
1.1.
Why this book?
1.2.
How is this book structured?
1.3.
Hands-on Learning
1.4.
About the Team
1.5.
Warmup: Environment Setup
2.
Software Assurance
2.1.
Static vs. Dynamic Tools
2.2.
Static Assurance (1/2)
2.3.
Static Assurance (2/2)
2.4.
Dynamic Assurance (1/3)
2.5.
Dynamic Assurance (2/3)
2.6.
Dynamic Assurance (3/3)
2.7.
Limitations and Threat Modeling
2.8.
DIY CLI Encryption Tool
2.9.
Operational Assurance (1/2)
2.10.
Operational Assurance (2/2)
2.11.
Challenge: Extend the CLI Tool
3.
Rust Zero-Crash Course
3.1.
On Undefined Behavior
3.2.
Rust: Low-Level Data (1/6)
3.3.
Rust: High-Level Data (2/6)
3.4.
Rust: Control Flow (3/6)
3.5.
Rust: Ownership Principles (4/6)
3.6.
Rust: Ownership in Practice (5/6)
3.7.
Rust: Error Handling (6/6)
3.8.
The Module System
3.9.
Recommended Tooling
3.10.
Rust's Release Cycle
3.11.
Challenge: Port a Program
4.
Understanding Memory Safety and Exploitation
4.1.
Software Perspective: CPU to Process
4.2.
Assurance Perspective: Stack Safety
4.3.
Attacker's Perspective: Breaking Safety (1/2)
4.4.
Attacker's Perspective: Unifying Theory (2/2)
4.5.
Debugging DIY Secret Obfuscation
4.6.
Stack Exploitation
4.7.
Software Perspective: Heap (1/2)
4.8.
Software Perspective: Heap (2/2)
4.9.
Heap Exploitation
4.10.
Rust's Memory Safety Guarantees (1/2)
4.11.
Rust's Memory Safety Guarantees (2/2)
4.12.
Language-agnostic Mitigations
4.13.
Case Study: Real-world Rust CVEs
4.14.
Challenge: Vulnerability Research
Advanced Beginner: Core Project
5.
Binary Search Tree (BST) Basics
5.1.
Core BST Operations in Python
5.2.
Problems Translating to Rust
5.3.
The Importance of Balance
5.4.
TODO
5.5.
Challenge: TODO
6.
Building an Arena Allocator
6.1.
Let's Talk Allocators
6.2.
A Stack-Only Arena
6.3.
Index-based Data Structures
6.4.
TODO
6.5.
Challenge: TODO
7.
A Self-balancing BST
7.1.
Interface-relevant Traits
7.2.
Scapegoat Trees
7.3.
Insert
7.4.
Remove
7.5.
Find
7.6.
Challenge: TODO
8.
Digital Twin Testing
8.1.
Basic QEMU Internals
8.2.
How Semi-hosting Works
8.3.
CLI REPL Harness
8.4.
Limitations
8.5.
TODO
8.6.
Challenge: TODO
9.
Building Maps and Sets
9.1.
TODO
9.2.
Challenge: TODO
10.
Implementing Iterators
10.1.
TODO
10.2.
Challenge: TODO
Competent: Validation and Deployment
11.
Static Verification
11.1.
An Introduction to 1st Order Logic
11.2.
Proving Absence of Panics
11.3.
Deductively Verifying our Arena Allocator
11.4.
Model Checking for unsafe Code
11.5.
TODO
11.6.
Challenge: Prove a Sorting Algorithm
12.
Dynamic Testing
12.1.
Introduction to Coverage-Guided Fuzzing
12.2.
Building a Differential Fuzzing Harness
12.3.
Using Miri to Detect Undefined Behavior
12.4.
Benchmarking and Optimization
12.5.
TODO
12.6.
Challenge: Bug-hunting with Fuzzers
13.
Operational Deployment
13.1.
Understanding unsafe (1/3)
13.2.
Understanding unsafe (2/3)
13.3.
Understanding unsafe (3/3)
13.4.
CFFI 101
13.5.
C99 Interoperability
13.6.
Python3 Interoperability
13.7.
Runtime Balance Reconfiguration
13.8.
TODO
13.9.
Challenge: TODO
14.
Maximizing Assurance
14.1.
Rust Security Research
14.2.
Rust's Limitations
14.3.
Best Practices Beyond Rust
14.4.
Tactical Trust (1/2)
14.5.
Tactical Trust (2/2)
14.6.
TODO
14.7.
Challenge: TODO
Conclusion
15.
Review
15.1.
Key Concepts
15.2.
Key Blue-Team Skills
15.3.
Key Red-Team Skills
16.
Appendix
16.1.
Setup: Using our Docker Container
16.2.
Inventory: Tools of the Trade
16.3.
Inventory: Recommended Reading
16.4.
Inventory: Additional Resources
16.5.
Fundamentals: Stream Ciphers
16.6.
Fundamentals: Type Systems
16.7.
Fundamentals: Component-Based Design
16.8.
Fundamentals: Memory Hierarchy
16.9.
Fundamentals: Dynamic Linking
16.10.
Theory: Inter-procedural CFGs
16.11.
Misc: Size Optimization
16.12.
Misc: The Typestate Pattern
16.13.
Misc: C++ Interoperability
16.14.
Misc: Compile-time Metaprogramming