Back to course catalog

Combined C/C++, Java and Web application security

CL-CJW
4 days
C/C++, Java, Web
Course page in PDF Inquiry

Course information

Preparedness

Advanced C/C++, Java and Web development

Exercises

Hands-on

Delivery methods

Classroom

Course Reviews

Exercises were fun and helpful. Got a lot of info...

September 2012 Budapest

View all reviews

It was very exciting.

September 2012 Budapest

View all reviews

Description

To serve in the best way heterogeneous development groups that are using various platforms simultaneously during their everyday work, we have merged various topics into a combined course that presents diverse secure coding subjects in didactic manner on a single training event. This course combines C/C++ and Java platform security to provide an extensive, cross-platform secure coding expertise.

Concerning C/C++, common security vulnerabilities are discussed, backed by practical exercises about the attacking methods that exploit these vulnerabilities, with the focus on the mitigation techniques that can be applied to prevent the occurrences of these dangerous bugs, detect them before market launch or prevent their exploitation.

Security components and service of Java are discussed by presenting the different APIs and tools through a number of practical exercises where participants can gain hands-on experience in using them. The course also covers security issues of web services and the related Java services that can be applied to prevent the most aching threats of the Internet based services. Finally, web- and Java-related security vulnerabilities are demonstrated by easy-to-understand exercises, which not only show the root cause of the problems, but also demonstrate the attack methods along with the recommended mitigation and coding techniques in order to avoid the associated security problems.

Participants attending this course will

  • 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
  • Learn to use various security features of the Java development environment
  • Have a practical understanding of cryptography
  • 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 typical coding mistakes and how to avoid them
  • Get information about some recent vulnerabilities in the Java framework
  • Get sources and further readings on secure coding practices

Outline

  • IT security and secure coding
  • Web application security
  • Client-side security
  • Foundations of Java security
  • Practical cryptography
  • Java security services
  • x86 machine code, memory layout and stack operations
  • Buffer overflow
  • Some additional native code-related vulnerabilities
  • Common coding errors and vulnerabilities
  • Principles of security and secure coding
  • Knowledge sources

Table of Contents

  • Day 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
        • The Seven Pernicious Kingdoms
        • OWASP Top Ten 2017
    • Web application security
      • Injection
        • Injection principles
        • SQL injection
          • Exercise – SQL injection
          • Typical SQL Injection attack methods
          • Blind and time-based SQL injection
          • SQL injection protection methods
          • Effect of data storage frameworks on SQL injection in Java
        • Other injection flaws
          • Command injection
          • Case study – ImageMagick
      • Broken authentication
        • Session handling threats
        • Session handling best practices
        • Session handling in Java
        • Setting cookie attributes – best practices
        • Cross site request forgery (CSRF)
          • CSRF prevention
          • CSRF prevention in Java frameworks
      • XML external entity (XXE)
        • XML Entity introduction
        • 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
      • Broken access control
        • Typical access control weaknesses
        • Insecure direct object reference (IDOR)
        • Exercise – Insecure direct object reference
        • Protection against IDOR
        • Case study – Facebook Notes
      • Cross-Site Scripting (XSS)
        • Persistent XSS
        • Reflected XSS
        • DOM-based XSS
        • Exercise – Cross Site Scripting
        • XSS prevention
        • XSS prevention tools in Java and JSP
      • 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
  • Day 2
    • 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
      • 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
    • Foundations of Java security
      • The Java environment
      • Low-level security – the Java language and environment
        • Java language security
        • Type safety
        • Automatic memory management
        • Java execution overview
        • Bytecode Verifier
        • Class Loader
        • Protecting Java code
      • High-level security – access control
        • Protection domains
        • Security Manager and Access Controller
        • Permission checking
        • Effects of doPrivileged
    • Practical cryptography
      • Rule #1 of implementing cryptography
      • Cryptosystems
        • Elements of a cryptosystem
      • Symmetric-key cryptography
        • Providing confidentiality with symmetric cryptography
        • Symmetric encryption algorithms
        • 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
        • Combining symmetric and asymmetric algorithms
      • 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
        • Exercise Jars – Granting permission to signed code
    • Java security services
      • Java security services – architecture
      • Java Cryptographic Architecture
        • Java Cryptography Architecture / Extension (JCA/JCE)
        • Using Cryptographic Service Providers
        • Engine classes and algorithms
        • Exercise Sign – Generating and verifying signatures
  • Day 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
      • Stack overflow
        • Buffer overflow on the stack
        • Overwriting the return address
        • Exercises – introduction
        • Exercise BOFIntro
        • Exercise BOFShellcode
      • 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 instrumentation (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
      • Address Space Layout Randomization (ASLR)
        • Randomization with ASLR
        • Practical weaknesses and limitations to ASLR
        • Circumventing ASLR: NOP sledding
      • Non executable memory areas – the NX bit
        • Access Control on memory segments
        • The Never eXecute (NX) bit
      • Return-to-libc attack – Circumventing the NX bit protection
        • Circumventing memory execution protection
        • Return-to-libc attack
      • Return oriented programming (ROP)
        • Exploiting with ROP
        • ROP gadgets
    • 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
        • Poor code quality – spot the bug!
        • Unreleased resources
        • 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
  • Day 4
    • Common coding errors and vulnerabilities
      • 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
          • Case study – Android Stagefright
      • 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
          • 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
          • Typical mistakes in password management
          • Exercise – Hard coded passwords
      • Improper error and exception handling
        • Typical problems with error and exception handling
        • Empty catch block
        • Overly broad throws
        • Overly broad catch
        • Using multi-catch
        • Catching NullPointerException
        • Exception handling – spot the bug!
        • Exercise ScademyPay – Error handling
        • Exercise – Error handling
      • Code quality problems
        • Dangers arising from poor code quality
        • Private arrays – spot the bug!
        • Private arrays – typed field returned from a public method
        • Exercise Object Hijack
        • Public method without final – object hijacking
        • Serialization – spot the bug!
        • Exercise Serializable Sensitive
        • Immutable String – spot the bug!
        • Exercise Immutable Strings
        • Immutability and security
    • 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
Show full table of contents

Get more information