IQSOFT - John Brice Oktatóközpont
ENGEDÉLYEZETT KÉPZÉSEK

Advanced software security - beyond ethical hacking

Tanfolyam célja

Are you looking to start your journey towards becoming a security champion?

Despite all of your efforts, the code you have been writing your entire career is full of weaknesses you never knew existed. You will be provided with all of the attackers’ tricks and how to mitigate them, leaving you with no other feeling than the desire to know more.

This is a fully customizable 5 day long course ideal for advanced software engineers, or as a perfect complement to a coding bootcamp.

It is your choice to be ahead of the pack, and be seen as a game changer in the fight against cybercrime.

The secure coders’ community awaits you.

  •     Understand basic concepts of security, IT security and secure coding
  •     Learn Web vulnerabilities beyond OWASP Top Ten and know how to avoid them
  •     Learn about XML security
  •     Learn client-side vulnerabilities and secure coding practices
  •     Have a practical understanding of cryptography
  •     Understand some recent attacks against cryptosystems
  •     Realize the severe consequences of unsecure buffer handling in native code
  •     Understand the architectural protection techniques and their weaknesses
  •     Realize the severe consequences of unsecure buffer handling
  •     Learn about JSON security
  •     Learn about denial of service attacks and protections
  •     Get practical knowledge in using security testing techniques and tools
  •     Learn how to set up and operate the deployment environment securely
  •     Get sources and further readings on secure coding practices
Tematika
  •     IT security and secure coding
  •     Web application security (OWASP Top Ten 2017)
  •     Client-side security
  •     Practical cryptography
  •     Cryptographic vulnerabilities
  •     x86 machine code, memory layout and stack operations
  •     Buffer overflow and its exploitation
  •     Some additional native code-related vulnerabilities
  •     XML security
  •     JSON security
  •     Denial of service
  •     Input validation
  •     Error and exception handling
  •     Improper use of security features
  •     Code quality problems
  •     Security testing techniques
  •     Deployment environment
  •     Principles of security and secure coding
  •     Knowledge sources

1. IT security and secure coding

  •         Nature of security
  •         What is risk?
  •         IT security vs. secure coding
  •         From vulnerabilities to botnets and cybercrime
    •             Nature of security flaws
    •             Reasons of difficulty
    •             From an infected computer to targeted attacks
  •         Classification of security flaws
    •             Landwehr’s taxonomy
    •             The Seven Pernicious Kingdoms
    •             OWASP Top Ten 2017

    Web application security (OWASP Top Ten 2017)

  •         A1 - Injection
    •             Injection principles
    •             SQL injection
      •                 Exercise – SQL Injection
      •                 Exercise – SQL injection
      •                 Typical SQL Injection attack methods
      •                 Blind and time-based SQL injection
      •                 SQL injection protection methods
    •             Other injection flaws
      •                 Command injection
      •                 Case study – ImageMagick
  •         A2 - Broken authentication
    •             Session handling threats
    •             Session handling best practices
    •             Session handling in Java
    •             Setting cookie attributes – best practices
  •         A3 - Sensitive data exposure
    •             Sensitive data exposure
    •             Transport layer security
      •                 Enforcing HTTPS
  •         A4 - XML external entity (XXE)
  •             XML Entity introduction
    •             XML bomb
    •             Exercise – XML bomb
    •             XML external entity attack (XXE) – resource inclusion
    •             XML external entity attack – URL invocation
    •             XML external entity attack – parameter entities
    •             Exercise – XXE attack
    •             Preventing entity-related attacks
    •             Case study – XXE in Google Toolbar
  •         A5 - Broken access control
  •             Typical access control weaknesses
    •             Insecure direct object reference (IDOR)
    •             Exercise – Insecure direct object reference
    •             Protection against IDOR
    •             Case study – Facebook Notes
    •             Exercise – Authorization bypass
  •         A6 - Security misconfiguration
    •             Security misconfiguration
    •             Configuring the environment
    •             Insecure file uploads
    •             Exercise – Uploading executable files
    •             Filtering file uploads – validation and configuration
  •         A7 - Cross-Site Scripting (XSS)
    •             Persistent XSS
    •             Reflected XSS
    •             DOM-based XSS
    •             Exercise – Cross Site Scripting
    •             Exploitation: CSS injection
    •             Exploitation: injecting the tag
    •             Exercise – HTML injection with base tag
    •             XSS prevention
    •             XSS prevention tools in Java and JSP

2. Web application security (OWASP Top Ten 2017)

  •         A8 - Insecure deserialization
    •             Deserialization basics
    •             Security challenges of deserialization
    •             Deserialization in Java
    •             From deserialization to code execution
    •             POP payload targeting the Apache Commons gadget (Java)
    •             Real-world Java examples of deserialization vulnerabilities
    •             Issues with deserialization – JSON
    •             Best practices against deserialization vulnerabilities
  •         A9 - Using components with known vulnerabilities
    •             Vulnerability attributes
    •             Common Vulnerability Scoring System – CVSS

    Client-side security

  •         JavaScript security
  •         Same Origin Policy
  •         Cross Origin Resource Sharing (CORS)
  •         Exercise – Client-side authentication
  •         Client-side authentication and password management
  •         Protecting JavaScript code
  •         Exercise – JavaScript obfuscation
  •         Clickjacking
    •             Clickjacking
    •             Exercise – Do you Like me?
    •             Protection against Clickjacking
    •             Anti frame-busting – dismissing protection scripts
    •             Protection against busting frame busting
  •         AJAX security
    •             XSS in AJAX
    •             Script injection attack in AJAX
    •             Exercise – XSS in AJAX
    •             XSS protection in Ajax
    •             Exercise CSRF in AJAX – JavaScript hijacking
    •             CSRF protection in AJAX
  •         HTML5 security
  •             New XSS possibilities in HTML5
    •             HTML5 clickjacking attack – text field injection
    •             HTML5 clickjacking – content extraction
    •             Form tampering
    •             Exercise – Form tampering
    •             Cross-origin requests
    •             HTML proxy with cross-origin request
    •             Exercise – Client side include

    Practical cryptography

  •         Cryptosystems
    •             Elements of a cryptosystem
  •         Symmetric-key cryptography
    •             Providing confidentiality with symmetric cryptography
    •             Symmetric encryption algorithms
    •             Block ciphers – modes of operation
  •         Other cryptographic algorithms
    •             Hash or message digest
    •             Hash algorithms
    •             SHAttered
    •             Message Authentication Code (MAC)
    •             Providing integrity and authenticity with a symmetric key
    •             Random numbers and cryptography
    •             Cryptographically-strong PRNGs
    •             Hardware-based TRNGs
  •         Asymmetric (public-key) cryptography
    •             Providing confidentiality with public-key encryption
    •             Rule of thumb – possession of private key
    •             The RSA algorithm
      •                 Introduction to RSA algorithm
      •                 Encrypting with RSA
      •                 Combining symmetric and asymmetric algorithms
      •                 Digital signing with RSA
  •         Public Key Infrastructure (PKI)
    •             Man-in-the-Middle (MitM) attack
    •             Digital certificates against MitM attack
    •             Certificate Authorities in Public Key Infrastructure
    •             X.509 digital certificate

    Cryptographic vulnerabilities

  •         Protocol-level vulnerabilities
    •             BEAST
    •             FREAK
    •             FREAK – attack against SSL/TLS
    •             Logjam attack
  •         Padding oracle attacks
    •             Adaptive chosen-ciphertext attacks
    •             Padding oracle attack
    •             CBC decryption
    •             Padding oracle example
    •             Lucky Thirteen
    •             POODLE

3. x86 machine code, memory layout and stack operations

  •         Intel 80x86 Processors – main registers
  •         Intel 80x86 Processors – most important instructions
  •         Intel 80x86 Processors – flags
  •         Intel 80x86 Processors – control instructions
  •         Intel 80x86 Processors – stack handling and flow control
  •         The memory address layout
  •         The function calling mechanism in C/C++ on x86
  •         Calling conventions
  •         The local variables and the stack frame
  •         Function calls – prologue and epilogue of a function
  •         Stack frame of nested calls
  •         Stack frame of recursive functions

    Buffer overflow and its exploitation

  •         Stack overflow
    •             Buffer overflow on the stack
    •             Overwriting the return address
    •             Exercises – introduction
    •             Exercise BOFIntro
    •             Exercise BOFShellcode
    •             Exercise BOFShellcode – spot the bug!
  •         Protection against stack overflow
    •             Specific protection methods
    •             Protection methods at different layers
    •             The PreDeCo matrix of software security
    •             Stack overflow – Prevention (during development)
    •             Stack overflow – Detection (during execution)
    •             Fortify istrumentation (FORTIFY_SOURCE)
    •             Exercise BOFShellcode – Fortify
  •         Stack smashing protection
    •             Stack smashing protection variants
    •             Stack smashing protection in GCC
    •             Exercise BOFShellcode – Stack smashing protection
    •             Effects of stack smashing protection
    •             Bypassing stack smashing protection – an example
    •             Overwriting arguments – Mitigation
  •         Address Space Layout Randomization (ASLR)
    •             Randomization with ASLR
    •             Using ASLR
    •             Circumventing ASLR: NOP sledding
  •         Non executable memory areas – the NX bit
    •             Access Control on memory segments
    •             The Never eXecute (NX) bit
    •             Exercise BOFShellcode – Enforcing NX memory segments
  •         Return-to-libc attack – Circumventing the NX bit protection
    •             Circumventing memory execution protection
    •             Return-to-libc attack
    •             Exercise BOFShellcode – The Return-to-libc attack
  •         Return oriented programming (ROP)
    •             Exploiting with ROP
    •             ROP gadgets
    •             ROP gadget - Register fill with constants
    •             ROP gadget – Memory write
    •             Combining the ROP gadgets
    •             Real ROP attack scenarios
    •             ROP mitigation
      •                 Mitigation techniques of ROP attack

    Some additional native code-related vulnerabilities

  •         Boundary violation
    •             Array indexing – spot the bug!
    •             Off-by-one and other null termination errors
    •             The Unicode bug
  •         Code quality problems
    •             Type mismatch – Spot the bug!
    •             Exercise TypeMismatch
    •             Memory allocation problems
      •                 Smart pointers
      •                 Zero length allocation
      •                 Double free
      •                 Mixing delete and delete[]
  •         Race condition
    •             Serialization errors (TOCTTOU)
    •             Attacks with symbolic links
    •             Exercise TOCTTOU
  •         Case study - the Shellshock bash vulnerability
    •             Shellshock – basics of using functions in bash
    •             Shellshock – vulnerability in bash
    •             Exercise - Shellshock
    •             Shellshock fix and counterattacks
    •             Exercise – Command override with environment variables

4. XML security

  •         XML Signature
    •             XML Signature introduction
    •             XML Signature structure
    •             Hash collision with XML Digital Signature
    •             XML canonicalization
    •             Signing XML documents – spot the bug!
    •             XML Signature Wrapping (XSW) attack
    •             XML Signature Wrapping – countermeasures

    JSON security

  •         Introduction
  •         JSON parsing
  •         Embedding JSON server-side
  •         JSON injection
  •         JSON hijacking
  •         Case study – XSS via spoofed JSON element

    Denial of service

  •         DoS introduction
  •         Asymmetric DoS
  •         SSL/TLS renegotiation DoS
  •         Asymmetric DOS with JSON deserialization
  •         Regular expression DoS (ReDoS)
    •             Exercise ReDoS
    •             ReDoS mitigation
    •             Case Study – ReDos in Stack Exchange
  •         Hashtable collision attack
    •             Using hashtables to store inputs
    •             Hashtable collision
    •             Hashtable collision in Java

    Input validation

  •         Input validation concepts
  •         Integer problems
    •             Representation of negative integers
    •             Integer ranges
    •             Integer overflow
    •             Integer problems in C/C++
    •             The integer promotion rule in C/C++
    •             Arithmetic overflow – spot the bug!
    •             Exercise IntOverflow
    •             What is the value of Math.abs(Integer.MIN_VALUE)?
    •             Signedness bug – spot the bug!
    •             Integer truncation – spot the bug!
    •             Integer problem – best practices
      •                 Integer problem – best practices
      •                 GCC trapv
      •                 Exercise IntOverflow
      •                 Avoiding arithmetic overflow – addition
      •                 Avoiding arithmetic overflow – multiplication
      •                 Dealing with signed/unsigned integer promotion in C
      •                 Safe integer handling in C
      •                 The SafeInt class for C++
      •                 Detecting arithmetic overflow in Java 8
      •                 Exercise – Using addExact() in Java
    •             Java case study
      •                 A real-world integer overflow vulnerability in Java
      •                 The actual mistake in java.utils.zip.CRC32
    •             Case study – Android Stagefright
      •                 Stagefright – a quick introduction
      •                 Some Stagefright code examples – spot the bugs!
  •         Path traversal vulnerability
    •             Path traversal mitigation
    •             Case study – Insufficient URL validation in LastPass
  •         Unvalidated redirects and forwards
  •         Unsafe native calls
    •             Unsafe JNI
    •             Exercise Unsafe JNI
  •         Unsafe reflection
    •             Implementation of a command dispatcher
    •             Unsafe reflection – spot the bug!
    •             Mitigation of unsafe reflection
  •         Log forging
    •             Some other typical problems with log files
  •         Printf format string bug
    •             Printf format strings
    •             Printf format string bug – exploitation
    •             Exercise Printf
    •             Printf format string exploit – overwriting the return address

    Error and exception handling

  •         Typical problems with error and exception handling
  •         Empty catch block
  •         Overly broad throws
  •         Overly broad catch
  •         Using multi-catch
  •         Returning from finally block – spot the bug!
  •         Catching NullPointerException
  •         Exception handling – spot the bug!
  •         Exercise ScademyPay – Error handling
  •         Exercise – Error handling
  •         Exercise – Information leakage through error reporting

 5. Improper use of security features

  •         Typical problems related to the use of security features
  •         Insecure randomness
    •             Weak PRNGs in C and C++
    •             Stronger PRNGs in C
    •             Weak PRNGs in Java
    •             Exercise RandomTest
    •             Using random numbers in Java – spot the bug!
  •         Password management
    •             Exercise – Weakness of hashed passwords
    •             Password management and storage
    •             Brute forcing
    •             Special purpose hash algorithms for password storage
    •             Argon2 and PBKDF2 implementations in C/C++
    •             bcrypt and scrypt implementations in C/C++
    •             Argon2 and PBKDF2 implementations in Java
    •             bcrypt and scrypt implementations in Java
    •             Case study – the Ashley Madison data breach
    •                 The loginkey token
    •                 Revealing the passwords with brute forcing
    •             Typical mistakes in password management
    •             Exercise – Hard coded passwords
  •         Insufficient anti-automation
    •             Captcha
    •             Captcha weaknesses
  •         Accessibility modifiers
    •             Accessing private fields with reflection in Java
    •             Exercise Reflection – Accessing private fields with reflection
  •         Exercise ScademyPay – Integrity protection weakness

    Code quality problems

  •         Dangers arising from poor code quality
  •         Poor code quality – spot the bug!
  •         Unreleased resources
  •         Private arrays – spot the bug!
  •         Private arrays – typed field returned from a public method
  •         Exercise Object Hijack
  •         Public method without final – object hijacking
  •         Immutable String – spot the bug!
  •         Exercise Immutable Strings
  •         Immutability and security
  •         Serialization – spot the bug!
  •         Exercise Serializable Sensitive
  •         Case study – The double bug in Java
  •             A generic Denial of Service attack against the Java environment
    •             The “2.2250738585072012e-308 bug”
    •             The double bug in Tomcat
    •             The vulnerable code of DoubleValue() in FloatingDecimal.java
    •             Triggering the infinite loop
    •             Exercise Double Bug
  •         Problem with inner classes
    •             Inner classes – spot the bug!
    •             Problem with inner classes
    •             The decompiled class file containing an inner class
    •             Exercise Inner Class

    Security testing techniques

  •         General testing approaches
  •         Source code review
    •             Code review for software security
    •             Taint analysis
    •             Heuristic-based
    •             Static code analysis
      •                 Static code analysis
      •                 Exercise – Static code analysis using FlawFinder
      •                 Exercise – Using static code analysis tools
  •         Testing the implementation
    •             Dynamic security testing
    •             Manual vs. automated security testing
    •             Penetration testing
    •             Stress tests
    •             Binary and memory analysis
      •                 Exercise – Binary analysis with strings
    •             Instrumentation libraries and frameworks
      •                 Exercise – Using Valgrind
  •             Fuzzing
    •                 Automated security testing - fuzzing
    •                 Challenges of fuzzing
  •             Proxy servers and sniffers
    •                 Testing with proxies and sniffers
    •                 Packet analyzers and proxies
    •                 Exercise – Testing with proxy
  •             Web vulnerability scanners
    •                 Exercise – Using a vulnerability scanner
    •                 SQL injection tools
    •                 Exercise – Using SQL injection tools

    Deployment environment

  •         Configuration management
  •         Hardening
  •         Patch management

    Principles of security and secure coding

  •         Matt Bishop’s principles of robust programming
  •         The security principles of Saltzer and Schroeder

    Knowledge sources

  •         Secure coding sources – a starter kit
  •         Vulnerability databases
  •         Java secure coding sources
  •         Recommended books – C/C++
  •         Recommended books – Java
Kinek ajánljuk
Előfeltételek

Advanced and general software development

Kapcsolódó tanfolyamok