<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE FL_Course SYSTEM "https://www.flane.de/dtd/fl_course095.dtd"><?xml-stylesheet type="text/xsl" href="https://portal.flane.ch/css/xml-course.xsl"?><course productid="30311" language="fr" source="https://portal.flane.ch/swisscom/fr/xml-course/cydrill-sect-cca" lastchanged="2026-01-12T11:28:29+01:00" parent="https://portal.flane.ch/swisscom/fr/xml-courses"><title>Security testing C and C++ applications</title><productcode>SECT-CCA</productcode><vendorcode>CY</vendorcode><vendorname>Cydrill</vendorname><fullproductcode>CY-SECT-CCA</fullproductcode><version>1</version><objective>&lt;ul&gt;
&lt;li&gt;Getting familiar with essential cyber security concepts&lt;/li&gt;&lt;li&gt;Understanding security testing methodology and approaches&lt;/li&gt;&lt;li&gt;Correctly implementing various security features&lt;/li&gt;&lt;li&gt;Identify vulnerabilities and their consequences&lt;/li&gt;&lt;li&gt;Learn the security best practices in C and C++&lt;/li&gt;&lt;li&gt;Input validation approaches and principles&lt;/li&gt;&lt;li&gt;Getting familiar with security testing techniques and tools&lt;/li&gt;&lt;/ul&gt;</objective><audience>&lt;p&gt;C/C++ developers and testers&lt;/p&gt;</audience><contents>&lt;ul&gt;
&lt;li&gt;Cyber security basics&lt;/li&gt;&lt;li&gt;Memory management vulnerabilities&lt;/li&gt;&lt;li&gt;Memory management hardening&lt;/li&gt;&lt;li&gt;Security testing&lt;/li&gt;&lt;li&gt;Common software security weaknesses&lt;/li&gt;&lt;li&gt;Wrap up&lt;/li&gt;&lt;/ul&gt;</contents><outline>&lt;h4&gt;Cyber security basics&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;What is security?&lt;/li&gt;&lt;li&gt;Threat and risk&lt;/li&gt;&lt;li&gt;Cyber security threat types &amp;ndash; the CIA triad&lt;/li&gt;&lt;li&gt;Cyber security threat types &amp;ndash; the STRIDE model&lt;/li&gt;&lt;li&gt;Consequences of insecure software&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Memory management vulnerabilities&lt;/h4&gt;&lt;h5&gt;Assembly basics and calling conventions&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;x64 assembly essentials&lt;/li&gt;&lt;li&gt;Registers and addressing&lt;/li&gt;&lt;li&gt;Most common instructions&lt;/li&gt;&lt;li&gt;Calling conventions on x64
&lt;ul&gt;
&lt;li&gt;Calling convention &amp;ndash; what it is all about&lt;/li&gt;&lt;li&gt;Calling convention on x64&lt;/li&gt;&lt;li&gt;The stack frame&lt;/li&gt;&lt;li&gt;Stacked function calls&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;Buffer overflow&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Memory management and security&lt;/li&gt;&lt;li&gt;Vulnerabilities in the real world&lt;/li&gt;&lt;li&gt;Buffer security issues&lt;/li&gt;&lt;li&gt;Buffer overflow on the stack
&lt;ul&gt;
&lt;li&gt;Buffer overflow on the stack &amp;ndash; stack smashing&lt;/li&gt;&lt;li&gt;Exploitation &amp;ndash; Hijacking the control flow&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Buffer overflow 101, code reuse&lt;/li&gt;&lt;li&gt;Exploitation &amp;ndash; Arbitrary code execution&lt;/li&gt;&lt;li&gt;Injecting shellcode&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Code injection, exploitation with shellcode&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Pointer manipulation
&lt;ul&gt;
&lt;li&gt;Modification of jump tables&lt;/li&gt;&lt;li&gt;Overwriting function pointers&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;Best practices and some typical mistakes&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Unsafe functions&lt;/li&gt;&lt;li&gt;Dealing with unsafe functions&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Fixing buffer overflow&lt;/li&gt;&lt;li&gt;What&amp;#039;s the problem with asctime()?&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; The problem with asctime()&lt;/li&gt;&lt;li&gt;Using std::string in C++&lt;/li&gt;&lt;li&gt;Unterminated strings&lt;/li&gt;&lt;li&gt;readlink() and string termination&lt;/li&gt;&lt;li&gt;Manipulating C-style strings in C++&lt;/li&gt;&lt;li&gt;Malicious string termination&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; String termination confusion&lt;/li&gt;&lt;li&gt;String length calculation mistakes&lt;/li&gt;&lt;li&gt;Off-by-one errors&lt;/li&gt;&lt;li&gt;Allocating nothing&lt;/li&gt;&lt;li&gt;Testing for typical mistakes&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Memory management hardening&lt;/h4&gt;&lt;h5&gt;Runtime protections&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Runtime instrumentation&lt;/li&gt;&lt;li&gt;Address Space Layout Randomization (ASLR)
&lt;ul&gt;
&lt;li&gt;ASLR on various platforms&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Effects of ASLR&lt;/li&gt;&lt;li&gt;Circumventing ASLR &amp;ndash; NOP sleds&lt;/li&gt;&lt;li&gt;Circumventing ASLR &amp;ndash; memory leakage&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Non-executable memory areas
&lt;ul&gt;
&lt;li&gt;The NX bit&lt;/li&gt;&lt;li&gt;Write XOR Execute (W^X)&lt;/li&gt;&lt;li&gt;NX on various platforms&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Effects of NX&lt;/li&gt;&lt;li&gt;NX circumvention &amp;ndash; Code reuse attacks
&lt;ul&gt;
&lt;li&gt;Return-to-libc / arc injection&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Return Oriented Programming (ROP)
&lt;ul&gt;
&lt;li&gt;Protection against ROP&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Security testing&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Security testing vs functional testing&lt;/li&gt;&lt;li&gt;Manual and automated methods&lt;/li&gt;&lt;li&gt;Black box, white box, and hybrid testing&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;Security testing methodology&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Security testing &amp;ndash; goals and methodologies&lt;/li&gt;&lt;li&gt;Overview of security testing processes&lt;/li&gt;&lt;li&gt;Identifying and rating assets
&lt;ul&gt;
&lt;li&gt;Preparation and scoping&lt;/li&gt;&lt;li&gt;Identifying assets&lt;/li&gt;&lt;li&gt;Identifying the attack surface&lt;/li&gt;&lt;li&gt;Assigning security requirements&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Identifying and rating assets&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Threat modeling
&lt;ul&gt;
&lt;li&gt;SDL threat modeling&lt;/li&gt;&lt;li&gt;Mapping STRIDE to DFD&lt;/li&gt;&lt;li&gt;DFD example&lt;/li&gt;&lt;li&gt;Attack trees&lt;/li&gt;&lt;li&gt;Attack tree example&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Crafting an attack tree&lt;/li&gt;&lt;li&gt;Misuse cases&lt;/li&gt;&lt;li&gt;Misuse case examples&lt;/li&gt;&lt;li&gt;Risk analysis&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Risk analysis&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Accomplishing the tests&lt;/li&gt;&lt;li&gt;Reporting, recommendations, and review&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Common software security weaknesses&lt;/h4&gt;&lt;h5&gt;Security features&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Authentication&lt;/li&gt;&lt;li&gt;Password management
&lt;ul&gt;
&lt;li&gt;Inbound password management&lt;/li&gt;&lt;li&gt;Storing account passwords&lt;/li&gt;&lt;li&gt;Password in transit&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Is just hashing passwords enough?&lt;/li&gt;&lt;li&gt;Dictionary attacks and brute forcing&lt;/li&gt;&lt;li&gt;Salting&lt;/li&gt;&lt;li&gt;Adaptive hash functions for password storage&lt;/li&gt;&lt;li&gt;Password policy&lt;/li&gt;&lt;li&gt;NIST authenticator requirements for memorized secrets
&lt;ul&gt;
&lt;li&gt;Case study &amp;ndash; The Ashley Madison data breach&lt;/li&gt;&lt;li&gt;The ultimate crack&lt;/li&gt;&lt;li&gt;Exploitation and the lessons learned&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Password database migration&lt;/li&gt;&lt;li&gt;Testing for password management issues&lt;/li&gt;&lt;li&gt;Using password cracking tools&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Password audit with John the Ripper&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Common software security weaknesses&lt;/h4&gt;&lt;h5&gt;Input validation&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Input validation principles&lt;/li&gt;&lt;li&gt;What to validate &amp;ndash; the attack surface&lt;/li&gt;&lt;li&gt;Where to validate &amp;ndash; defense in depth&lt;/li&gt;&lt;li&gt;When to validate &amp;ndash; validation vs transformations&lt;/li&gt;&lt;li&gt;Validation with regex&lt;/li&gt;&lt;li&gt;Injection
&lt;ul&gt;
&lt;li&gt;Injection principles&lt;/li&gt;&lt;li&gt;Injection attacks&lt;/li&gt;&lt;li&gt;Code injection&lt;/li&gt;&lt;li&gt;OS command injection&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Command injection&lt;/li&gt;&lt;li&gt;OS command injection best practices&lt;/li&gt;&lt;li&gt;Avoiding command injection with the right APIs&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Command injection best practices
&lt;ul&gt;
&lt;li&gt;Case study &amp;ndash; Shellshock&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Lab - Shellshock&lt;/li&gt;&lt;li&gt;Testing for command injection&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Integer handling problems
&lt;ul&gt;
&lt;li&gt;Representing signed numbers&lt;/li&gt;&lt;li&gt;Integer visualization&lt;/li&gt;&lt;li&gt;Integer promotion&lt;/li&gt;&lt;li&gt;Integer overflow&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Integer overflow&lt;/li&gt;&lt;li&gt;Signed / unsigned confusion&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; The Stockholm Stock Exchange&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Signed / unsigned confusion&lt;/li&gt;&lt;li&gt;Integer truncation&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Integer truncation&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; WannaCry&lt;/li&gt;&lt;li&gt;Best practices
&lt;ul&gt;
&lt;li&gt;Precondition testing&lt;/li&gt;&lt;li&gt;Postcondition testing&lt;/li&gt;&lt;li&gt;Best practices in C&lt;/li&gt;&lt;li&gt;Best practices in C++&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Integer handling best practices in C++&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Testing for numeric problems&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Files and streams
&lt;ul&gt;
&lt;li&gt;Path traversal&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Path traversal&lt;/li&gt;&lt;li&gt;Path traversal best practices&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Path canonicalization&lt;/li&gt;&lt;li&gt;Testing for path traversal&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Security testing&lt;/h4&gt;&lt;h5&gt;Security testing techniques and tools&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Code analysis
&lt;ul&gt;
&lt;li&gt;Static Application Security Testing (SAST)&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Using static analysis tools&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Dynamic analysis
&lt;ul&gt;
&lt;li&gt;Security testing at runtime&lt;/li&gt;&lt;li&gt;Penetration testing&lt;/li&gt;&lt;li&gt;Stress testing&lt;/li&gt;&lt;li&gt;Dynamic Application Security Testing (DAST)&lt;/li&gt;&lt;li&gt;Fuzzing&lt;/li&gt;&lt;li&gt;Fuzzing techniques&lt;/li&gt;&lt;li&gt;Fuzzing &amp;ndash; Observing the process&lt;/li&gt;&lt;li&gt;American Fuzzy Lop (AFL)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Wrap up&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Secure coding principles&lt;/li&gt;&lt;li&gt;Principles of robust programming by Matt Bishop&lt;/li&gt;&lt;li&gt;Secure design principles of Saltzer and Schroeder&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;And now what?&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;Software security sources and further reading&lt;/li&gt;&lt;li&gt;C and C++ resources&lt;/li&gt;&lt;li&gt;Security testing resources&lt;/li&gt;&lt;/ul&gt;</outline><objective_plain>- Getting familiar with essential cyber security concepts
- Understanding security testing methodology and approaches
- Correctly implementing various security features
- Identify vulnerabilities and their consequences
- Learn the security best practices in C and C++
- Input validation approaches and principles
- Getting familiar with security testing techniques and tools</objective_plain><audience_plain>C/C++ developers and testers</audience_plain><contents_plain>- Cyber security basics
- Memory management vulnerabilities
- Memory management hardening
- Security testing
- Common software security weaknesses
- Wrap up</contents_plain><outline_plain>Cyber security basics


- What is security?
- Threat and risk
- Cyber security threat types – the CIA triad
- Cyber security threat types – the STRIDE model
- Consequences of insecure software
Memory management vulnerabilities

Assembly basics and calling conventions


- x64 assembly essentials
- Registers and addressing
- Most common instructions
- Calling conventions on x64

- Calling convention – what it is all about
- Calling convention on x64
- The stack frame
- Stacked function calls
Buffer overflow


- Memory management and security
- Vulnerabilities in the real world
- Buffer security issues
- Buffer overflow on the stack

- Buffer overflow on the stack – stack smashing
- Exploitation – Hijacking the control flow
- Lab – Buffer overflow 101, code reuse
- Exploitation – Arbitrary code execution
- Injecting shellcode
- Lab – Code injection, exploitation with shellcode
- Pointer manipulation

- Modification of jump tables
- Overwriting function pointers
Best practices and some typical mistakes


- Unsafe functions
- Dealing with unsafe functions
- Lab – Fixing buffer overflow
- What's the problem with asctime()?
- Lab – The problem with asctime()
- Using std::string in C++
- Unterminated strings
- readlink() and string termination
- Manipulating C-style strings in C++
- Malicious string termination
- Lab – String termination confusion
- String length calculation mistakes
- Off-by-one errors
- Allocating nothing
- Testing for typical mistakes
Memory management hardening

Runtime protections


- Runtime instrumentation
- Address Space Layout Randomization (ASLR)

- ASLR on various platforms
- Lab – Effects of ASLR
- Circumventing ASLR – NOP sleds
- Circumventing ASLR – memory leakage
- Non-executable memory areas

- The NX bit
- Write XOR Execute (W^X)
- NX on various platforms
- Lab – Effects of NX
- NX circumvention – Code reuse attacks

- Return-to-libc / arc injection
- Return Oriented Programming (ROP)

- Protection against ROP
Security testing


- Security testing vs functional testing
- Manual and automated methods
- Black box, white box, and hybrid testing
Security testing methodology


- Security testing – goals and methodologies
- Overview of security testing processes
- Identifying and rating assets

- Preparation and scoping
- Identifying assets
- Identifying the attack surface
- Assigning security requirements
- Lab – Identifying and rating assets
- Threat modeling

- SDL threat modeling
- Mapping STRIDE to DFD
- DFD example
- Attack trees
- Attack tree example
- Lab – Crafting an attack tree
- Misuse cases
- Misuse case examples
- Risk analysis
- Lab – Risk analysis
- Accomplishing the tests
- Reporting, recommendations, and review
Common software security weaknesses

Security features


- Authentication
- Password management

- Inbound password management
- Storing account passwords
- Password in transit
- Lab – Is just hashing passwords enough?
- Dictionary attacks and brute forcing
- Salting
- Adaptive hash functions for password storage
- Password policy
- NIST authenticator requirements for memorized secrets

- Case study – The Ashley Madison data breach
- The ultimate crack
- Exploitation and the lessons learned
- Password database migration
- Testing for password management issues
- Using password cracking tools
- Lab – Password audit with John the Ripper
Common software security weaknesses

Input validation


- Input validation principles
- What to validate – the attack surface
- Where to validate – defense in depth
- When to validate – validation vs transformations
- Validation with regex
- Injection

- Injection principles
- Injection attacks
- Code injection
- OS command injection
- Lab – Command injection
- OS command injection best practices
- Avoiding command injection with the right APIs
- Lab – Command injection best practices

- Case study – Shellshock
- Lab - Shellshock
- Testing for command injection
- Integer handling problems

- Representing signed numbers
- Integer visualization
- Integer promotion
- Integer overflow
- Lab – Integer overflow
- Signed / unsigned confusion
- Case study – The Stockholm Stock Exchange
- Lab – Signed / unsigned confusion
- Integer truncation
- Lab – Integer truncation
- Case study – WannaCry
- Best practices

- Precondition testing
- Postcondition testing
- Best practices in C
- Best practices in C++
- Lab – Integer handling best practices in C++
- Testing for numeric problems
- Files and streams

- Path traversal
- Lab – Path traversal
- Path traversal best practices
- Lab – Path canonicalization
- Testing for path traversal
Security testing

Security testing techniques and tools


- Code analysis

- Static Application Security Testing (SAST)
- Lab – Using static analysis tools
- Dynamic analysis

- Security testing at runtime
- Penetration testing
- Stress testing
- Dynamic Application Security Testing (DAST)
- Fuzzing
- Fuzzing techniques
- Fuzzing – Observing the process
- American Fuzzy Lop (AFL)
Wrap up


- Secure coding principles
- Principles of robust programming by Matt Bishop
- Secure design principles of Saltzer and Schroeder
And now what?


- Software security sources and further reading
- C and C++ resources
- Security testing resources</outline_plain><duration unit="d" days="3">3 jours</duration><pricelist><price country="DE" currency="EUR">2250.00</price><price country="CH" currency="EUR">2250.00</price></pricelist><miles/></course>