Vulnerabilities and Attacks
摘要
This chapter presents a collection of problems focused on software vulnerabilities and their exploitation. The contents are divided into five sections, each addressing a distinct category of vulnerabilities and related defenses to provide a comprehensive overview of the subject. The first section covers the writing and interpretation of vulnerability scores using the Common Vulnerability Scoring System (CVSS), offering exercises that help readers understand how to evaluate and communicate the severity of vulnerabilities. The second section introduces basic examples of memory corruption vulnerabilities, including buffer overflows and integer overflows. It also examines common mitigation techniques, such as stack canaries, Address Space Layout Randomization (ASLR), and Data Execution Prevention (DEP), which are essential for modern software security. The third section focuses on input validation vulnerabilities, with exercises centered on command injection, SQL injection, and Cross-Site Scripting (XSS) attacks. These problems provide practical insights into how improper input handling can lead to severe security risks. The fourth section explores Denial of Service (DoS) attacks, highlighting different methods such as traffic flooding, amplification, and reflection. These exercises aim to familiarize readers with the mechanisms and impact of DoS attacks, as well as possible mitigation strategies. Finally, the fifth section presents a mixed collection of classic vulnerabilities and attacks that do not fit neatly into the previous categories. Examples include the vulnerabilities in the movemail utility and the notorious Ping of Death attack. This section offers some historical context and demonstrates the enduring relevance of understanding older vulnerabilities.