Secure Coding in C and C++
Secure Coding in C and C++
4-day course
Syllabus
C and C++ Secure Coding 4-Day Course
Course description
Secure Programming is the last line of defense against attacks targeted toward our systems.
This course shows you how to identify security flaws & implement security countermeasures in
different areas of the software development lifecycle and apply these skills to improve the
overall quality of the products and applications. Using sound programming techniques and best
practices shown in this course, you can produce high-quality code that stands up to attack.
The course covers major security principles in C/C++ and software vulnerabilities caused be
unsecure coding. The objectives of the course are to acquaint students with security concepts
and terminology, and to provide them with a solid foundation for developing software using the
best practices in C/C++. By course completion, students should be proficient in secure
programming and have learnt the basics of security analysis and design. Students should then
be able to develop, design and maintain applications using security methods and techniques for
the C/C++ language.
Target audience
Prerequisites
1|P age
Course topics
Day 1
Integer Overflows
Safe API
2|P age
Secure Memory Usage
LAB
Hands on lab #1
Day 2
Input Validation
3|P age
Application Denial of Service vulnerabilities
Application / OS crash
CPU starvation
Memory starvation
File system starvation
Resource starvation
Triggering high network bandwidth
User level DOS
Exploiting a specific vulnerability to cause DoS
LAB
Hands on lab #2
Day 3
Network Security
Introduction to Networking
Network attacks
Insecure Services
Application Layer Threats and attacks
Traffic Sniffing
Traffic Manipulation
Man-in-the-Middle
Avoiding Server Socket Hijacking
Firewall Friendly Application
Encryption in C/C++
Introduction to cryptography
ATTACK SCENARIO: Weak Encryption
Symmetric encryption
Asymmetric encryption
Transport Level Encryption
Storage Level Encryption
Cryptographic API's – CryptoApi, DPAPI, Crypro++
4|P age
Authentication & Authorization
Authentication scenarios
Common mistakes
Attack scenario: brute force
Authentication protocols
Attack scenario: weak passwords
Authorization models
Access Control List (ACL)
Role Based Access Control (RBAC)
Attack scenario: exposed functionality via anonymous authentication
LAB
Hands on lab #3
Day 4
Thread safety
5|P age
Secure Coding Tips
Anti-reversing
LAB
Hands on lab #4
6|P age