<?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="24033" language="en" source="https://portal.flane.ch/swisscom/en/xml-course/cydrill-dasec-j" lastchanged="2026-01-12T11:38:37+01:00" parent="https://portal.flane.ch/swisscom/en/xml-courses"><title>Desktop Application Security in Java</title><productcode>DASEC-J</productcode><vendorcode>CY</vendorcode><vendorname>Cydrill</vendorname><fullproductcode>CY-DASEC-J</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;Identify vulnerabilities and their consequences&lt;/li&gt;&lt;li&gt;Learn the security best practices in Java&lt;/li&gt;&lt;li&gt;Input validation approaches and principles&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 Java&lt;/li&gt;&lt;li&gt;Managing vulnerabilities in third party components&lt;/li&gt;&lt;/ul&gt;</objective><essentials>&lt;p&gt;General Java development&lt;/p&gt;</essentials><audience>&lt;p&gt;Java developers working on desktop applications&lt;/p&gt;</audience><contents>&lt;ul&gt;
&lt;li&gt;Cyber security basics&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;Cryptography for developers&lt;/li&gt;&lt;li&gt;Common software security weaknesses&lt;/li&gt;&lt;li&gt;Using vulnerable components&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;SEI CERT Secure Coding Guidelines&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&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;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;Validation with regex&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;Code injection
&lt;ul&gt;
&lt;li&gt;OS command injection
&lt;ul&gt;
&lt;li&gt;OS command injection best practices&lt;/li&gt;&lt;li&gt;Using Runtime.exec()&lt;/li&gt;&lt;li&gt;Using ProcessBuilder&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;/ul&gt;&lt;/li&gt;&lt;li&gt;Script injection&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;Integer overflow&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Integer overflow&lt;/li&gt;&lt;li&gt;Signed / unsigned confusion in Java&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; The Stockholm Stock Exchange&lt;/li&gt;&lt;li&gt;Integer truncation&lt;/li&gt;&lt;li&gt;Best practices
&lt;ul&gt;
&lt;li&gt;Upcasting&lt;/li&gt;&lt;li&gt;Precondition testing&lt;/li&gt;&lt;li&gt;Postcondition testing&lt;/li&gt;&lt;li&gt;Using big integer libraries&lt;/li&gt;&lt;li&gt;Integer handling in Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Integer handling&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;Path traversal best practices&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Unsafe reflection
&lt;ul&gt;
&lt;li&gt;Reflection without validation&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Unsafe reflection&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 JNI&lt;/li&gt;&lt;li&gt;Best practices for dealing with native code&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;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;User interface best practices&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; On-line password brute forcing&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;Lab &amp;ndash; Applying a password policy&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;ul&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;li&gt;Storing sensitive data in 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;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Authorization
&lt;ul&gt;
&lt;li&gt;Access control basics&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;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;li&gt;Java platform security
&lt;ul&gt;
&lt;li&gt;The Java programming language and runtime environment&lt;/li&gt;&lt;li&gt;Type safety and security&lt;/li&gt;&lt;li&gt;Security features of the JRE
&lt;ul&gt;
&lt;li&gt;The ClassLoader and the BytecodeVerifier&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Application-level access control in Java
&lt;ul&gt;
&lt;li&gt;Permissions and the Security Manager&lt;/li&gt;&lt;li&gt;Privilege best practices&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Role-based access control
&lt;ul&gt;
&lt;li&gt;Java Authentication and Authorization Services (JAAS)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Protecting Java code and applications
&lt;ul&gt;
&lt;li&gt;Code signing&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Code signing and permissions&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;UI security
&lt;ul&gt;
&lt;li&gt;UI security principles&lt;/li&gt;&lt;li&gt;Sensitive information in the user interface&lt;/li&gt;&lt;li&gt;Misinterpretation of UI features or actions&lt;/li&gt;&lt;li&gt;Insufficient UI feedback&lt;/li&gt;&lt;li&gt;Relying on hidden or disabled UI element&lt;/li&gt;&lt;li&gt;Insufficient anti-automation&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;Race condition in object data members
&lt;ul&gt;
&lt;li&gt;Singleton member fields&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Singleton member fields&lt;/li&gt;&lt;/ul&gt;&lt;/li&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;Database race conditions
&lt;ul&gt;
&lt;li&gt;Lab &amp;ndash; Database race conditions&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Avoiding race conditions in Java&lt;/li&gt;&lt;/ul&gt;&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;Reachable assertion&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 catch block. And now what?&lt;/li&gt;&lt;li&gt;Catching NullPointerException&lt;/li&gt;&lt;li&gt;Empty catch block&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;Cryptography for developers&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cryptography basics&lt;/li&gt;&lt;li&gt;Java Cryptographic Architecture (JCA) in brief&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;Using virtual random streams&lt;/li&gt;&lt;li&gt;Weak and strong PRNGs in Java&lt;/li&gt;&lt;li&gt;Using random numbers in Java&lt;/li&gt;&lt;li&gt;Case study &amp;ndash; Equifax credit account freeze&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Random numbers in Java&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 Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Hashing in JCA&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 Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Symmetric encryption in JCA&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 Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Using RSA in JCA&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 Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Using ECC in JCA&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;/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;Calculating MAC in Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Using MAC in JCA&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 Java&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Digital signature in JCA&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;Common software security weaknesses&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code quality
&lt;ul&gt;
&lt;li&gt;Data handling
&lt;ul&gt;
&lt;li&gt;Initialization and cleanup
&lt;ul&gt;
&lt;li&gt;Constructors and destructors&lt;/li&gt;&lt;li&gt;Class initialization cycles&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Initialization cycles&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Unreleased resource
&lt;ul&gt;
&lt;li&gt;The finalize() method &amp;ndash; best practices&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Object oriented programming pitfalls
&lt;ul&gt;
&lt;li&gt;Accessibility modifiers
&lt;ul&gt;
&lt;li&gt;Are accessibility modifiers a security feature?&lt;/li&gt;&lt;li&gt;Accessibility modifiers &amp;ndash; best practices&lt;/li&gt;&lt;li&gt;Overriding and accessibility modifiers&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Inheritance and overriding&lt;/li&gt;&lt;li&gt;Mutability
&lt;ul&gt;
&lt;li&gt;Lab &amp;ndash; Mutable object&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Cloning&lt;/li&gt;&lt;/ul&gt;&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;Vulnerability management
&lt;ul&gt;
&lt;li&gt;Patch management&lt;/li&gt;&lt;li&gt;Vulnerability databases&lt;/li&gt;&lt;li&gt;Lab &amp;ndash; Finding vulnerabilities in third-party components&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Wrap up&lt;/strong&gt;
&lt;/p&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;Java resources&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;</outline><objective_plain>- Getting familiar with essential cyber security concepts
- Identify vulnerabilities and their consequences
- Learn the security best practices in Java
- Input validation approaches and principles
- Understanding how cryptography can support appplication security
- Learning how to use cryptographic APIs correctly in Java
- Managing vulnerabilities in third party components</objective_plain><essentials_plain>General Java development</essentials_plain><audience_plain>Java developers working on desktop applications</audience_plain><contents_plain>- Cyber security basics
- Input validation
- Security features
- Time and state
- Errors
- Cryptography for developers
- Common software security weaknesses
- Using vulnerable components
- 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
- SEI CERT Secure Coding Guidelines
Input validation



- Input validation principles

- Blacklists and whitelists
- Data validation techniques
- What to validate – the attack surface
- Where to validate – defense in depth
- How to validate – validation vs transformations
- Output sanitization
- Encoding challenges
- Validation with regex
- Injection

- Injection principles
- Injection attacks
- Code injection

- OS command injection

- OS command injection best practices
- Using Runtime.exec()
- Using ProcessBuilder
- Case study – Shellshock
- Lab – Shellshock
- Case study – Command injection via ping
- Script injection
- General protection best practices
- Integer handling problems

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

- Upcasting
- Precondition testing
- Postcondition testing
- Using big integer libraries
- Integer handling in Java
- Lab – Integer handling
- Files and streams

- Path traversal
- Path traversal-related examples
- Lab – Path traversal
- Additional challenges in Windows
- Path traversal best practices
- Unsafe reflection

- Reflection without validation
- Lab – Unsafe reflection
- Unsafe native code

- Native code dependence
- Lab – Unsafe JNI
- Best practices for dealing with native code
DAY 2

Security features



- Authentication

- Authentication basics
- Multi-factor authentication
- Authentication weaknesses – spoofing
- Case study – PayPal 2FA bypass
- User interface best practices
- Lab – On-line password brute forcing
- 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
- Lab – Applying a password policy
- 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
- Storing sensitive data in memory
- Authorization

- Access control basics
- Information exposure

- Exposure through extracted data and aggregation
- Case study – Strava data exposure
- System information leakage

- Leaking system information
- Information exposure best practices
- Java platform security

- The Java programming language and runtime environment
- Type safety and security
- Security features of the JRE

- The ClassLoader and the BytecodeVerifier
- Application-level access control in Java

- Permissions and the Security Manager
- Privilege best practices
- Role-based access control

- Java Authentication and Authorization Services (JAAS)
- Protecting Java code and applications

- Code signing
- Lab – Code signing and permissions
- UI security

- UI security principles
- Sensitive information in the user interface
- Misinterpretation of UI features or actions
- Insufficient UI feedback
- Relying on hidden or disabled UI element
- Insufficient anti-automation
Time and state



- Race conditions

- Race condition in object data members

- Singleton member fields
- Lab – Singleton member fields
- File race condition

- Time of check to time of usage – TOCTTOU
- Insecure temporary file
- Database race conditions

- Lab – Database race conditions
- Avoiding race conditions in Java
Errors



- Error and exception handling principles
- Error handling

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

- In the catch block. And now what?
- Catching NullPointerException
- Empty catch block
DAY 3

Cryptography for developers



- Cryptography basics
- Java Cryptographic Architecture (JCA) in brief
- Elementary algorithms

- Random number generation

- Pseudo random number generators (PRNGs)
- Cryptographically strong PRNGs
- Using virtual random streams
- Weak and strong PRNGs in Java
- Using random numbers in Java
- Case study – Equifax credit account freeze
- Lab – Random numbers in Java
- Hashing

- Hashing basics
- Common hashing mistakes
- Hashing in Java
- Lab – Hashing in JCA
- Confidentiality protection

- Symmetric encryption

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

- The RSA algorithm

- Using RSA – best practices
- RSA in Java
- Lab – Using RSA in JCA
- Elliptic Curve Cryptography

- The ECC algorithm
- Using ECC – best practices
- ECC in Java
- Lab – Using ECC in JCA
- Combining symmetric and asymmetric algorithms
- Integrity protection

- Message Authentication Code (MAC)

- Calculating MAC in Java
- Lab – Using MAC in JCA
- Digital signature

- Digital signature with RSA
- Digital signature with ECC
- Digital signature in Java
- Lab – Digital signature in JCA
- Public Key Infrastructure (PKI)

- Some further key management challenges
- Certificates

- Chain of trust
- Certificate management – best practices
Common software security weaknesses



- Code quality

- Data handling

- Initialization and cleanup

- Constructors and destructors
- Class initialization cycles
- Lab – Initialization cycles
- Unreleased resource

- The finalize() method – best practices
- Object oriented programming pitfalls

- Accessibility modifiers

- Are accessibility modifiers a security feature?
- Accessibility modifiers – best practices
- Overriding and accessibility modifiers
- Inheritance and overriding
- Mutability

- Lab – Mutable object
- Cloning
Using vulnerable components



- Assessing the environment
- Hardening
- Vulnerability management

- Patch management
- Vulnerability databases
- Lab – Finding vulnerabilities in third-party components
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
- Java resources</outline_plain><duration unit="d" days="3">3 days</duration><pricelist><price country="SI" currency="EUR">2250.00</price><price country="DE" currency="EUR">2250.00</price><price country="AT" currency="EUR">2250.00</price><price country="GB" currency="EUR">2250.00</price><price country="IT" currency="EUR">2250.00</price><price country="NL" currency="EUR">2250.00</price><price country="BE" currency="EUR">2250.00</price><price country="FR" currency="EUR">2250.00</price><price country="MK" currency="EUR">2250.00</price><price country="GR" currency="EUR">2250.00</price><price country="HU" currency="EUR">2250.00</price></pricelist><miles/></course>