<?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="24022" language="fr" source="https://portal.flane.ch/swisscom/fr/xml-course/cydrill-mlsec" lastchanged="2026-01-12T11:39:11+01:00" parent="https://portal.flane.ch/swisscom/fr/xml-courses"><title>Machine Learning Security</title><productcode>MLSEC</productcode><vendorcode>CY</vendorcode><vendorname>Cydrill</vendorname><fullproductcode>CY-MLSEC</fullproductcode><version>1.0</version><objective>&lt;ul&gt;
&lt;li&gt;Getting familiar with essential cyber security concepts&lt;/li&gt;&lt;li&gt;Learning about various aspects of machine learning security&lt;/li&gt;&lt;li&gt;Attacks and defense techniques in adversarial machine learning&lt;/li&gt;&lt;li&gt;Identify vulnerabilities and their consequences&lt;/li&gt;&lt;li&gt;Learn the security best practices in Python&lt;/li&gt;&lt;li&gt;Input validation approaches and principles&lt;/li&gt;&lt;li&gt;Managing vulnerabilities in third party components&lt;/li&gt;&lt;li&gt;Understanding how cryptography can support appplication security&lt;/li&gt;&lt;li&gt;Learning how to use cryptographic APIs correctly in Python&lt;/li&gt;&lt;li&gt;Understanding security testing methodology and approaches&lt;/li&gt;&lt;li&gt;Getting familiar with common security testing techniques and tools&lt;/li&gt;&lt;/ul&gt;</objective><essentials>&lt;p&gt;General machine learning and Python development&lt;/p&gt;</essentials><audience>&lt;p&gt;Python developers working on machine learning systems&lt;/p&gt;</audience><contents>&lt;ul&gt;
&lt;li&gt;Cyber security basics&lt;/li&gt;&lt;li&gt;Machine learning security&lt;/li&gt;&lt;li&gt;Input validation&lt;/li&gt;&lt;li&gt;Security features&lt;/li&gt;&lt;li&gt;Time and state&lt;/li&gt;&lt;li&gt;Errors&lt;/li&gt;&lt;li&gt;Using vulnerable components&lt;/li&gt;&lt;li&gt;Cryptography for developers&lt;/li&gt;&lt;li&gt;Security testing&lt;/li&gt;&lt;li&gt;Wrap up&lt;/li&gt;&lt;/ul&gt;</contents><outline>&lt;p&gt;&lt;strong&gt;DAY 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cyber security basics&lt;/strong&gt;
&lt;/p&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&lt;/li&gt;&lt;li&gt;Consequences of insecure software
&lt;ul&gt;
&lt;li&gt;Constraints and the market&lt;/li&gt;&lt;li&gt;The dark side&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Categorization of bugs
&lt;ul&gt;
&lt;li&gt;The Seven Pernicious Kingdoms&lt;/li&gt;&lt;li&gt;Common Weakness Enumeration (CWE)&lt;/li&gt;&lt;li&gt;CWE Top 25 Most Dangerous Software Errors&lt;/li&gt;&lt;li&gt;Vulnerabilities in the environment and dependencies&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Machine learning security&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cyber security in machine learning
&lt;ul&gt;
&lt;li&gt;ML-specific cyber security considerations&lt;/li&gt;&lt;li&gt;What makes machine learning a valuable target?&lt;/li&gt;&lt;li&gt;Possible consequences&lt;/li&gt;&lt;li&gt;Inadvertent AI failures&lt;/li&gt;&lt;li&gt;Some real-world abuse examples&lt;/li&gt;&lt;li&gt;ML threat model
&lt;ul&gt;
&lt;li&gt;Creating a threat model for machine learning&lt;/li&gt;&lt;li&gt;Machine learning assets&lt;/li&gt;&lt;li&gt;Security requirements&lt;/li&gt;&lt;li&gt;Attack surface&lt;/li&gt;&lt;li&gt;Attacker model &amp;ndash; resources, capabilities, goals&lt;/li&gt;&lt;li&gt;Confidentiality threats&lt;/li&gt;&lt;li&gt;Integrity threats (model)&lt;/li&gt;&lt;li&gt;Integrity threats (data, software)&lt;/li&gt;&lt;li&gt;Availability threats&lt;/li&gt;&lt;li&gt;Dealing with AI/ML threats in software security&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Compromising ML via model editing&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Using ML in cybersecurity
&lt;ul&gt;
&lt;li&gt;Static code analysis and ML&lt;/li&gt;&lt;li&gt;ML in fuzz testing&lt;/li&gt;&lt;li&gt;ML in anomaly detection and network security&lt;/li&gt;&lt;li&gt;Limitations of ML in security&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Malicious use of AI and ML
&lt;ul&gt;
&lt;li&gt;Social engineering attacks and media manipulation&lt;/li&gt;&lt;li&gt;Vulnerability exploitation&lt;/li&gt;&lt;li&gt;Malware automation&lt;/li&gt;&lt;li&gt;Endpoint security evasion&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Adversarial machine learning
&lt;ul&gt;
&lt;li&gt;Threats against machine learning&lt;/li&gt;&lt;li&gt;Attacks against machine learning integrity
&lt;ul&gt;
&lt;li&gt;Poisoning attacks&lt;/li&gt;&lt;li&gt;Poisoning attacks against supervised learning&lt;/li&gt;&lt;li&gt;Poisoning attacks against unsupervised and reinforcement learning&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; ML poisoning attack&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; ML poisoning against Warfarin dosage calculations&lt;/li&gt;&lt;li&gt;Evasion attacks&lt;/li&gt;&lt;li&gt;Common white-box evasion attack algorithms&lt;/li&gt;&lt;li&gt;Common black-box evasion attack algorithms&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; ML evasion attack&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Classification evasion via 3D printing&lt;/li&gt;&lt;li&gt;Transferability of poisoning and evasion attacks&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Transferability of adversarial examples&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Some defense techniques against adversarial samples
&lt;ul&gt;
&lt;li&gt;Adversarial training&lt;/li&gt;&lt;li&gt;Defensive distillation&lt;/li&gt;&lt;li&gt;Gradient masking&lt;/li&gt;&lt;li&gt;Feature squeezing&lt;/li&gt;&lt;li&gt;Using reformers on adversarial data&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Adversarial training&lt;/li&gt;&lt;li&gt;Caveats about the efficacy of current adversarial defenses&lt;/li&gt;&lt;li&gt;Simple practical defenses&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Attacks against machine learning confidentiality
&lt;ul&gt;
&lt;li&gt;Model extraction attacks&lt;/li&gt;&lt;li&gt;Defending against model extraction attacks&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Model extraction&lt;/li&gt;&lt;li&gt;Model inversion attacks&lt;/li&gt;&lt;li&gt;Defending against model inversion attacks&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Model inversion&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Denial of service
&lt;ul&gt;
&lt;li&gt;Denial of Service&lt;/li&gt;&lt;li&gt;Resource exhaustion&lt;/li&gt;&lt;li&gt;Cash overflow&lt;/li&gt;&lt;li&gt;Flooding&lt;/li&gt;&lt;li&gt;Algorithm complexity issues&lt;/li&gt;&lt;li&gt;Denial of service in ML
&lt;ul&gt;
&lt;li&gt;Accuracy reduction attacks&lt;/li&gt;&lt;li&gt;Denial-of-information attacks&lt;/li&gt;&lt;li&gt;Catastrophic forgetting in neural networks&lt;/li&gt;&lt;li&gt;Resource exhaustion attacks against ML&lt;/li&gt;&lt;li&gt;Best practices for protecting availability in ML systems&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;DAY 2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Input validation&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input validation principles
&lt;ul&gt;
&lt;li&gt;Blacklists and whitelists&lt;/li&gt;&lt;li&gt;Data validation techniques&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Input validation&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;How to validate &amp;ndash; validation vs transformations&lt;/li&gt;&lt;li&gt;Output sanitization&lt;/li&gt;&lt;li&gt;Encoding challenges&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Encoding challenges&lt;/li&gt;&lt;li&gt;Validation with regex&lt;/li&gt;&lt;li&gt;Regular expression denial of service (ReDoS)&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Regular expression denial of service (ReDoS)&lt;/li&gt;&lt;li&gt;Dealing with ReDoS&lt;/li&gt;&lt;/ul&gt;&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;SQL injection
&lt;ul&gt;
&lt;li&gt;SQL injection basics&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; SQL injection&lt;/li&gt;&lt;li&gt;Attack techniques&lt;/li&gt;&lt;li&gt;Content-based blind SQL injection&lt;/li&gt;&lt;li&gt;Time-based blind SQL injection&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;SQL injection best practices
&lt;ul&gt;
&lt;li&gt;Input validation&lt;/li&gt;&lt;li&gt;Parameterized queries&lt;/li&gt;&lt;li&gt;Additional considerations&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; SQL injection best practices&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Hacking Fortnite accounts&lt;/li&gt;&lt;li&gt;SQL injection and ORM&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Code injection
&lt;ul&gt;
&lt;li&gt;Code injection via input()&lt;/li&gt;&lt;li&gt;OS command injection
&lt;ul&gt;
&lt;li&gt;Lab &amp;ndash; Command injection in Python&lt;/li&gt;&lt;li&gt;OS command injection best practices&lt;/li&gt;&lt;li&gt;Avoiding command injection with the right APIs in Python&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Command injection best practices in Python&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Shellshock&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Shellshock&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Command injection via ping&lt;/li&gt;&lt;li&gt;Python module hijacking&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Module hijacking&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;General protection best practices&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;Integers in Python&lt;/li&gt;&lt;li&gt;Integer overflow&lt;/li&gt;&lt;li&gt;Integer overflow with ctypes and numpy&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Integer problems in Python&lt;/li&gt;&lt;li&gt;Other numeric problems
&lt;ul&gt;
&lt;li&gt;Division by zero&lt;/li&gt;&lt;li&gt;Other numeric problems in Python&lt;/li&gt;&lt;li&gt;Working with floating-point numbers&lt;/li&gt;&lt;/ul&gt;&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;Path traversal-related examples&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Path traversal&lt;/li&gt;&lt;li&gt;Additional challenges in Windows&lt;/li&gt;&lt;li&gt;Virtual resources&lt;/li&gt;&lt;li&gt;Path traversal best practices&lt;/li&gt;&lt;li&gt;Format string issues&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Unsafe native code
&lt;ul&gt;
&lt;li&gt;Native code dependence&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Unsafe native code&lt;/li&gt;&lt;li&gt;Best practices for dealing with native code&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Input validation in machine learning
&lt;ul&gt;
&lt;li&gt;Misleading the machine learning mechanism&lt;/li&gt;&lt;li&gt;Sanitizing data against poisoning and RONI&lt;/li&gt;&lt;li&gt;Code vulnerabilities causing evasion, misprediction, or misclustering&lt;/li&gt;&lt;li&gt;Typical ML input formats and their security&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;DAY 3&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Security features&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Authentication
&lt;ul&gt;
&lt;li&gt;Authentication basics&lt;/li&gt;&lt;li&gt;Multi-factor authentication&lt;/li&gt;&lt;li&gt;Authentication weaknesses &amp;ndash; spoofing&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; PayPal 2FA bypass&lt;/li&gt;&lt;li&gt;Password management
&lt;ul&gt;
&lt;li&gt;Inbound password management
&lt;ul&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;ul&gt;
&lt;li&gt;NIST authenticator requirements for memorized secrets&lt;/li&gt;&lt;li&gt;Password length&lt;/li&gt;&lt;li&gt;Password hardening&lt;/li&gt;&lt;li&gt;Using passphrases&lt;/li&gt;&lt;li&gt;Password change&lt;/li&gt;&lt;li&gt;Forgotten passwords&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Password reset weakness&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; The Ashley Madison data breach
&lt;ul&gt;
&lt;li&gt;The dictionary attack&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;/ul&gt;&lt;/li&gt;&lt;li&gt;Outbound password management
&lt;ul&gt;
&lt;li&gt;Hard coded passwords&lt;/li&gt;&lt;li&gt;Best practices&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Hardcoded password&lt;/li&gt;&lt;li&gt;Protecting sensitive information in memory
&lt;ul&gt;
&lt;li&gt;Challenges in protecting memory&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Information exposure
&lt;ul&gt;
&lt;li&gt;Exposure through extracted data and aggregation&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Strava data exposure&lt;/li&gt;&lt;li&gt;Privacy violation
&lt;ul&gt;
&lt;li&gt;Privacy essentials&lt;/li&gt;&lt;li&gt;Related standards, regulations and laws in brief&lt;/li&gt;&lt;li&gt;Privacy violation and best practices&lt;/li&gt;&lt;li&gt;Privacy in machine learning
&lt;ul&gt;
&lt;li&gt;Privacy challenges in classification algorithms&lt;/li&gt;&lt;li&gt;Machine unlearning and its challenges&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;System information leakage
&lt;ul&gt;
&lt;li&gt;Leaking system information&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Information exposure best practices&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Time and state&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Race conditions
&lt;ul&gt;
&lt;li&gt;File race condition
&lt;ul&gt;
&lt;li&gt;Time of check to time of usage &amp;ndash; TOCTTOU&lt;/li&gt;&lt;li&gt;Insecure temporary file&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Avoiding race conditions in Python
&lt;ul&gt;
&lt;li&gt;Thread safety and the Global Interpreter Lock (GIL)&lt;/li&gt;&lt;li&gt;Case study: TOCTTOU in Calamares&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Mutual exclusion and locking
&lt;ul&gt;
&lt;li&gt;Deadlocks&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Synchronization and thread safety&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Errors&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Error and exception handling principles&lt;/li&gt;&lt;li&gt;Error handling
&lt;ul&gt;
&lt;li&gt;Returning a misleading status code&lt;/li&gt;&lt;li&gt;Information exposure through error reporting&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Exception handling
&lt;ul&gt;
&lt;li&gt;In the except,catch block. And now what?&lt;/li&gt;&lt;li&gt;Empty catch block&lt;/li&gt;&lt;li&gt;The danger of assert statements&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Exception handling mess&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Using vulnerable components&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assessing the environment&lt;/li&gt;&lt;li&gt;Hardening&lt;/li&gt;&lt;li&gt;Malicious packages in Python&lt;/li&gt;&lt;li&gt;Vulnerability management
&lt;ul&gt;
&lt;li&gt;Patch management&lt;/li&gt;&lt;li&gt;Bug bounty programs&lt;/li&gt;&lt;li&gt;Vulnerability databases&lt;/li&gt;&lt;li&gt;Vulnerability rating &amp;ndash; CVSS&lt;/li&gt;&lt;li&gt;DevOps, the build process and CI / CD&lt;/li&gt;&lt;li&gt;Dependency checking in Python&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Detecting vulnerable components&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;ML supply chain risks
&lt;ul&gt;
&lt;li&gt;Common ML system architectures&lt;/li&gt;&lt;li&gt;ML system architecture and the attack surface&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; BadNets&lt;/li&gt;&lt;li&gt;Protecting data in transit &amp;ndash; transport layer security&lt;/li&gt;&lt;li&gt;Protecting data in use &amp;ndash; homomorphic encryption&lt;/li&gt;&lt;li&gt;Protecting data in use &amp;ndash; differential privacy&lt;/li&gt;&lt;li&gt;Protecting data in use &amp;ndash; multi-party computation&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;ML frameworks and security
&lt;ul&gt;
&lt;li&gt;General security concerns about ML platforms&lt;/li&gt;&lt;li&gt;TensorFlow security issues and vulnerabilities&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; TensorFlow vulnerability in parsing BMP files (CVE-2018-21233)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;DAY 4&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cryptography for developers&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cryptography basics&lt;/li&gt;&lt;li&gt;Cryptography in Python&lt;/li&gt;&lt;li&gt;Elementary algorithms
&lt;ul&gt;
&lt;li&gt;Random number generation
&lt;ul&gt;
&lt;li&gt;Pseudo random number generators (PRNGs)&lt;/li&gt;&lt;li&gt;Cryptographically strong PRNGs&lt;/li&gt;&lt;li&gt;Seeding&lt;/li&gt;&lt;li&gt;Using virtual random streams&lt;/li&gt;&lt;li&gt;Weak and strong PRNGs in Python&lt;/li&gt;&lt;li&gt;Using random numbers in Python&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Equifax credit account freeze&lt;/li&gt;&lt;li&gt;True random number generators (TRNG)&lt;/li&gt;&lt;li&gt;Assessing PRNG strength&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Using random numbers in Python&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Hashing
&lt;ul&gt;
&lt;li&gt;Hashing basics&lt;/li&gt;&lt;li&gt;Common hashing mistakes&lt;/li&gt;&lt;li&gt;Hashing in Python&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Hashing in Python&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Confidentiality protection
&lt;ul&gt;
&lt;li&gt;Symmetric encryption
&lt;ul&gt;
&lt;li&gt;Block ciphers&lt;/li&gt;&lt;li&gt;Modes of operation&lt;/li&gt;&lt;li&gt;Modes of operation and IV &amp;ndash; best practices&lt;/li&gt;&lt;li&gt;Symmetric encryption in Python&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Symmetric encryption in Python&lt;/li&gt;&lt;li&gt;Asymmetric encryption
&lt;ul&gt;
&lt;li&gt;The RSA algorithm
&lt;ul&gt;
&lt;li&gt;Using RSA &amp;ndash; best practices&lt;/li&gt;&lt;li&gt;RSA in Python&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Elliptic Curve Cryptography
&lt;ul&gt;
&lt;li&gt;The ECC algorithm&lt;/li&gt;&lt;li&gt;Using ECC &amp;ndash; best practices&lt;/li&gt;&lt;li&gt;ECC in Python&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Combining symmetric and asymmetric algorithms&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Homomorphic encryption
&lt;ul&gt;
&lt;li&gt;Basics of homomorphic encryption&lt;/li&gt;&lt;li&gt;Types of homomorphic encryption&lt;/li&gt;&lt;li&gt;FHE in machine learning&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Integrity protection
&lt;ul&gt;
&lt;li&gt;Message Authentication Code (MAC)
&lt;ul&gt;
&lt;li&gt;MAC in Python&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Calculating MAC in Python&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Digital signature
&lt;ul&gt;
&lt;li&gt;Digital signature with RSA&lt;/li&gt;&lt;li&gt;Digital signature with ECC&lt;/li&gt;&lt;li&gt;Digital signature in Python&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Public Key Infrastructure (PKI)
&lt;ul&gt;
&lt;li&gt;Some further key management challenges&lt;/li&gt;&lt;li&gt;Certificates
&lt;ul&gt;
&lt;li&gt;Chain of trust&lt;/li&gt;&lt;li&gt;Certificate management &amp;ndash; best practices&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Security testing&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security testing methodology
&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;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;Misuse cases&lt;/li&gt;&lt;li&gt;Misuse case examples&lt;/li&gt;&lt;li&gt;Risk analysis&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Security testing techniques and tools
&lt;ul&gt;
&lt;li&gt;Code analysis
&lt;ul&gt;
&lt;li&gt;Security aspects of code review&lt;/li&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;li&gt;Lab &amp;ndash; Finding vulnerabilities via ML&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 analysis tools
&lt;ul&gt;
&lt;li&gt;Dynamic Application Security Testing (DAST)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Fuzzing
&lt;ul&gt;
&lt;li&gt;Fuzzing techniques&lt;/li&gt;&lt;li&gt;Fuzzing &amp;ndash; Observing the process&lt;/li&gt;&lt;li&gt;ML fuzzing&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;strong&gt;Wrap up&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Secure coding principles
&lt;ul&gt;
&lt;li&gt;Principles of robust programming by Matt Bishop&lt;/li&gt;&lt;li&gt;Secure design principles of Saltzer and Schr&amp;ouml;der&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;And now what?
&lt;ul&gt;
&lt;li&gt;Software security sources and further reading&lt;/li&gt;&lt;li&gt;Python resources&lt;/li&gt;&lt;li&gt;Machine learning security resources&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;</outline><objective_plain>- Getting familiar with essential cyber security concepts
- Learning about various aspects of machine learning security
- Attacks and defense techniques in adversarial machine learning
- Identify vulnerabilities and their consequences
- Learn the security best practices in Python
- Input validation approaches and principles
- Managing vulnerabilities in third party components
- Understanding how cryptography can support appplication security
- Learning how to use cryptographic APIs correctly in Python
- Understanding security testing methodology and approaches
- Getting familiar with common security testing techniques and tools</objective_plain><essentials_plain>General machine learning and Python development</essentials_plain><audience_plain>Python developers working on machine learning systems</audience_plain><contents_plain>- Cyber security basics
- Machine learning security
- Input validation
- Security features
- Time and state
- Errors
- Using vulnerable components
- Cryptography for developers
- Security testing
- Wrap up</contents_plain><outline_plain>DAY 1

Cyber security basics



- What is security?
- Threat and risk
- Cyber security threat types
- Consequences of insecure software

- Constraints and the market
- The dark side
- Categorization of bugs

- The Seven Pernicious Kingdoms
- Common Weakness Enumeration (CWE)
- CWE Top 25 Most Dangerous Software Errors
- Vulnerabilities in the environment and dependencies
Machine learning security



- Cyber security in machine learning

- ML-specific cyber security considerations
- What makes machine learning a valuable target?
- Possible consequences
- Inadvertent AI failures
- Some real-world abuse examples
- ML threat model

- Creating a threat model for machine learning
- Machine learning assets
- Security requirements
- Attack surface
- Attacker model – resources, capabilities, goals
- Confidentiality threats
- Integrity threats (model)
- Integrity threats (data, software)
- Availability threats
- Dealing with AI/ML threats in software security
- Lab – Compromising ML via model editing
- Using ML in cybersecurity

- Static code analysis and ML
- ML in fuzz testing
- ML in anomaly detection and network security
- Limitations of ML in security
- Malicious use of AI and ML

- Social engineering attacks and media manipulation
- Vulnerability exploitation
- Malware automation
- Endpoint security evasion
- Adversarial machine learning

- Threats against machine learning
- Attacks against machine learning integrity

- Poisoning attacks
- Poisoning attacks against supervised learning
- Poisoning attacks against unsupervised and reinforcement learning
- Lab – ML poisoning attack
- Case study – ML poisoning against Warfarin dosage calculations
- Evasion attacks
- Common white-box evasion attack algorithms
- Common black-box evasion attack algorithms
- Lab – ML evasion attack
- Case study – Classification evasion via 3D printing
- Transferability of poisoning and evasion attacks
- Lab – Transferability of adversarial examples
- Some defense techniques against adversarial samples

- Adversarial training
- Defensive distillation
- Gradient masking
- Feature squeezing
- Using reformers on adversarial data
- Lab – Adversarial training
- Caveats about the efficacy of current adversarial defenses
- Simple practical defenses
- Attacks against machine learning confidentiality

- Model extraction attacks
- Defending against model extraction attacks
- Lab – Model extraction
- Model inversion attacks
- Defending against model inversion attacks
- Lab – Model inversion
- Denial of service

- Denial of Service
- Resource exhaustion
- Cash overflow
- Flooding
- Algorithm complexity issues
- Denial of service in ML

- Accuracy reduction attacks
- Denial-of-information attacks
- Catastrophic forgetting in neural networks
- Resource exhaustion attacks against ML
- Best practices for protecting availability in ML systems
DAY 2

Input validation



- Input validation principles

- Blacklists and whitelists
- Data validation techniques
- Lab – Input validation
- What to validate – the attack surface
- Where to validate – defense in depth
- How to validate – validation vs transformations
- Output sanitization
- Encoding challenges
- Lab – Encoding challenges
- Validation with regex
- Regular expression denial of service (ReDoS)
- Lab – Regular expression denial of service (ReDoS)
- Dealing with ReDoS
- Injection

- Injection principles
- Injection attacks
- SQL injection

- SQL injection basics
- Lab – SQL injection
- Attack techniques
- Content-based blind SQL injection
- Time-based blind SQL injection
- SQL injection best practices

- Input validation
- Parameterized queries
- Additional considerations
- Lab – SQL injection best practices
- Case study – Hacking Fortnite accounts
- SQL injection and ORM
- Code injection

- Code injection via input()
- OS command injection

- Lab – Command injection in Python
- OS command injection best practices
- Avoiding command injection with the right APIs in Python
- Lab – Command injection best practices in Python
- Case study – Shellshock
- Lab – Shellshock
- Case study – Command injection via ping
- Python module hijacking
- Lab – Module hijacking
- General protection best practices
- Integer handling problems

- Representing signed numbers
- Integer visualization
- Integers in Python
- Integer overflow
- Integer overflow with ctypes and numpy
- Lab – Integer problems in Python
- Other numeric problems

- Division by zero
- Other numeric problems in Python
- Working with floating-point numbers
- Files and streams

- Path traversal
- Path traversal-related examples
- Lab – Path traversal
- Additional challenges in Windows
- Virtual resources
- Path traversal best practices
- Format string issues
- Unsafe native code

- Native code dependence
- Lab – Unsafe native code
- Best practices for dealing with native code
- Input validation in machine learning

- Misleading the machine learning mechanism
- Sanitizing data against poisoning and RONI
- Code vulnerabilities causing evasion, misprediction, or misclustering
- Typical ML input formats and their security
DAY 3

Security features



- Authentication

- Authentication basics
- Multi-factor authentication
- Authentication weaknesses – spoofing
- Case study – PayPal 2FA bypass
- 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
- Password length
- Password hardening
- Using passphrases
- Password change
- Forgotten passwords
- Lab – Password reset weakness
- Case study – The Ashley Madison data breach

- The dictionary attack
- The ultimate crack
- Exploitation and the lessons learned
- Password database migration
- Outbound password management

- Hard coded passwords
- Best practices
- Lab – Hardcoded password
- Protecting sensitive information in memory

- Challenges in protecting memory
- Information exposure

- Exposure through extracted data and aggregation
- Case study – Strava data exposure
- Privacy violation

- Privacy essentials
- Related standards, regulations and laws in brief
- Privacy violation and best practices
- Privacy in machine learning

- Privacy challenges in classification algorithms
- Machine unlearning and its challenges
- System information leakage

- Leaking system information
- Information exposure best practices
Time and state



- Race conditions

- File race condition

- Time of check to time of usage – TOCTTOU
- Insecure temporary file
- Avoiding race conditions in Python

- Thread safety and the Global Interpreter Lock (GIL)
- Case study: TOCTTOU in Calamares
- Mutual exclusion and locking

- Deadlocks
- Synchronization and thread safety
Errors



- Error and exception handling principles
- Error handling

- Returning a misleading status code
- Information exposure through error reporting
- Exception handling

- In the except,catch block. And now what?
- Empty catch block
- The danger of assert statements
- Lab – Exception handling mess
Using vulnerable components



- Assessing the environment
- Hardening
- Malicious packages in Python
- Vulnerability management

- Patch management
- Bug bounty programs
- Vulnerability databases
- Vulnerability rating – CVSS
- DevOps, the build process and CI / CD
- Dependency checking in Python
- Lab – Detecting vulnerable components
- ML supply chain risks

- Common ML system architectures
- ML system architecture and the attack surface
- Case study – BadNets
- Protecting data in transit – transport layer security
- Protecting data in use – homomorphic encryption
- Protecting data in use – differential privacy
- Protecting data in use – multi-party computation
- ML frameworks and security

- General security concerns about ML platforms
- TensorFlow security issues and vulnerabilities
- Case study – TensorFlow vulnerability in parsing BMP files (CVE-2018-21233)
DAY 4

Cryptography for developers



- Cryptography basics
- Cryptography in Python
- Elementary algorithms

- Random number generation

- Pseudo random number generators (PRNGs)
- Cryptographically strong PRNGs
- Seeding
- Using virtual random streams
- Weak and strong PRNGs in Python
- Using random numbers in Python
- Case study – Equifax credit account freeze
- True random number generators (TRNG)
- Assessing PRNG strength
- Lab – Using random numbers in Python
- Hashing

- Hashing basics
- Common hashing mistakes
- Hashing in Python
- Lab – Hashing in Python
- Confidentiality protection

- Symmetric encryption

- Block ciphers
- Modes of operation
- Modes of operation and IV – best practices
- Symmetric encryption in Python
- Lab – Symmetric encryption in Python
- Asymmetric encryption

- The RSA algorithm

- Using RSA – best practices
- RSA in Python
- Elliptic Curve Cryptography

- The ECC algorithm
- Using ECC – best practices
- ECC in Python
- Combining symmetric and asymmetric algorithms
- Homomorphic encryption

- Basics of homomorphic encryption
- Types of homomorphic encryption
- FHE in machine learning
- Integrity protection

- Message Authentication Code (MAC)

- MAC in Python
- Lab – Calculating MAC in Python
- Digital signature

- Digital signature with RSA
- Digital signature with ECC
- Digital signature in Python
- Public Key Infrastructure (PKI)

- Some further key management challenges
- Certificates

- Chain of trust
- Certificate management – best practices
Security testing



- Security testing methodology

- Security testing – goals and methodologies
- Overview of security testing processes
- Threat modeling

- SDL threat modeling
- Mapping STRIDE to DFD
- DFD example
- Attack trees
- Attack tree example
- Misuse cases
- Misuse case examples
- Risk analysis
- Security testing techniques and tools

- Code analysis

- Security aspects of code review
- Static Application Security Testing (SAST)
- Lab – Using static analysis tools
- Lab – Finding vulnerabilities via ML
- Dynamic analysis

- Security testing at runtime
- Penetration testing
- Stress testing
- Dynamic analysis tools

- Dynamic Application Security Testing (DAST)
- Fuzzing

- Fuzzing techniques
- Fuzzing – Observing the process
- ML fuzzing


Wrap up


- Secure coding principles

- Principles of robust programming by Matt Bishop
- Secure design principles of Saltzer and Schröder
- And now what?

- Software security sources and further reading
- Python resources
- Machine learning security resources</outline_plain><duration unit="d" days="4">4 jours</duration><pricelist><price country="SI" currency="EUR">3000.00</price><price country="DE" currency="EUR">3000.00</price><price country="AT" currency="EUR">3000.00</price><price country="GB" currency="EUR">3000.00</price><price country="IT" currency="EUR">3000.00</price><price country="NL" currency="EUR">3000.00</price><price country="BE" currency="EUR">3000.00</price><price country="FR" currency="EUR">3000.00</price><price country="MK" currency="EUR">3000.00</price><price country="GR" currency="EUR">3000.00</price><price country="HU" currency="EUR">3000.00</price></pricelist><miles/></course>