Course Overview

Securing Java Web Services is a lab-intensive, hands-on JEE security training course, essential for experienced enterprise developers who need to produce secure JEE-based web services. In addition to teaching basic programming skills, this course digs deep into sound processes and practices that apply to the entire software development lifecycle.  

Designing, implementing, and deploying secure services presents unique challenges.  In addition to dealing with all of the vulnerabilities and attacks associated with web applications, web services must address business-oriented concerns such as authentication, authorization, non-repudiation and others.  The complicating factor is that all measures must be implemented within the constraints of standards and high-level s of inter-operability.

In this course, students thoroughly examine best practices for defensively coding JEE services, including XML processing.  Students will repeatedly attack and then defend various assets associated with fully-functional web services.  This hands-on approach drives home the mechanics of how to secure JEE web services in the most practical of terms.

Security experts agree that the least effective approach to security is "penetrate and patch".  It is far more effective to "bake" security into an application throughout its lifecycle.  After spending significant time trying to defend a poorly designed (from a security perspective) web application, developers are ready to learn how to build secure web applications starting at project inception.  The final portion of this course builds on the previously learned mechanics for building defenses by exploring how design and analysis can be used to build stronger applications from the beginning of the software lifecycle. 

Key Learning Areas

  • Understand the consequences for not properly handling untrusted data such as denial of service, cross-site scripting, and injections
  • Be able to test web applications with various attack techniques to determine the existence of and effectiveness of layered defenses
  • Prevent and defend the many potential vulnerabilities associated with untrusted data
  • Understand the concepts and terminology behind supporting, designing, and deploying secure services
  • Appreciate the magnitude of the problems associated with service security and the potential risks associated with those problems
  • Understand the currently accepted best practices for supporting the many security needs of services.
  • Understand the vulnerabilities associated with authentication and authorization within the context of web services
  • Be able to detect, attack, and implement defenses for authentication and authorization functionality
  • Understand the dangers and mechanisms behind Cross-Site Scripting (XSS) and Injection attacks
  • Be able to detect, attack, and implement defenses against XSS and Injection attacks
  • Understand the concepts and terminology behind defensive, secure, coding
  • Understand the use of Threat Modeling as a tool in identifying software vulnerabilities based on realistic threats against meaningful assets
  • Perform both static code reviews and dynamic application testing to uncover vulnerabilities in Java-based web services
  • Design and develop strong, robust authentication and authorization implementations within the context of JEE
  • Understand the fundamentals of XML Digital Signature as well as how it can be used as part of the defensive infrastructure for web services
  • Understand the fundamentals of XML Encryption as well as how it can be used as part of the defensive infrastructure for web services
  • Understand and defend vulnerabilities that are specific to XML and XML parsers

Course Outline

Introduction: Misconceptions

  • Security: The Complete Picture
  • TJX: Anatomy of a Disaster?
  • Causes of Data Breaches
  • Heartland – Slipping Past PCI Compliance
  • Target's Painful Christmas
  • Meaning of Being Compliant
  • Verizon’s 2015 Data Breach Report

Foundation

Security Concepts

  • Motivations: Costs and Standards
  • Open Web Application Security Project
  • Web Application Security Consortium
  • CERT Secure Coding Standards
  • Assets are the Targets
  • Security Activities Cost Resources
  • Threat Modeling
  • System/Trust Boundaries

Principles of Information Security

  • Security Is a Lifecycle Issue
  • Minimize Attack Surface Area
  • Layers of Defense: Tenacious D
  • Compartmentalize
  • Consider All Application States
  • Do NOT Trust the Untrusted

Applying Security to SOA

SOA Challenges

  • SOA Overview
  • Identity and Propagation
  • Real-time Transactions
  • Diverse Environments
  • Information Protection
  • Standards compliance

Services and Security

  • Security Policies
  • Applicable OASIS Standards
  • SAML
  • SAML Usage Scenarios

Defending XML Processing

Defending XML

  • XML Signature
  • XML Encryption
  • XML Attacks: Structure
  • XML Attacks: Injection
  • Safe XML Processing

Defending Web Services

  • Web Service Security Exposures
  • When Transport-Level Alone is NOT Enough
  • Message-Level Security
  • WS-Security Roadmap
  • XWSS Provides Many Functions
  • Web Service Attacks

Web Service Appliance/Gateways Lesson: Defending Rich Interfaces and REST

  • How Attackers See Rich Interfaces
  • Attack Surface Changes When Moving to Rich Interfaces
  • Bridging and its Potential Problems
  • Three Basic Tenets for Safe Rich Interfaces
  • OWASP REST Security Recommendations

Vulnerabilities

Unvalidated Input

  • Buffer Overflows
  • Integer Arithmetic Vulnerabilities
  • Unvalidated Input: From the Web
  • Defending Trust Boundaries
  • Whitelisting vs Blacklisting

Overview of Regular Expressions

  • Regular Expressions
  • Working With Regexes in Java
  • Applying Regular Expressions

Broken Access Control

  • Access Control Issues
  • Excessive Privileges
  • Insufficient Flow Control
  • Unprotected URL/Resource Access
  • Examples of Shabby Access Control
  • Session and Session Management

Broken Authentication

  • Broken Quality/DoS
  • Authentication Data
  • Username/Password Protection
  • Exploits Magnify Importance
  • Handling Passwords on Server Side
  • Single Sign-on (SSO)

Cross Site Scripting (XSS)

  • Persistent XSS
  • Reflective XSS
  • Best Practices for Untrusted Data

Injection

  • Injection Flaws
  • SQL Injection Attacks Evolve
  • Drill Down on Stored Procedures
  • Other Forms of Injection
  • Minimizing Injection Flaws

Error Handling and Information Leakage

  • Fingerprinting a Web Site
  • Error-Handling Issues
  • Logging In Support of Forensics
  • Solving DLP Challenges

Insecure Data Handling

  • Protecting Data Can Mitigate Impact
  • In-Memory Data Handling
  • Secure Pipes
  • Failures in the SSL Framework Are Appearing

Insecure Configuration Management

  • System Hardening: IA Mitigation
  • Application Whitelisting
  • Least Privileges
  • Anti-Exploitation
  • Secure Baseline

Direct Object Access

  • Dynamic Loading
  • Race Conditions
  • Direct Object References

Spoofing and Redirects

  • Name Resolution Vulnerabilities
  • Fake Certs and Mobile Apps
  • Targeted Spoofing Attacks
  • Cross Site Request Forgeries (CSRF)
  • CSRF Defenses are Entirely Server-Side
  • Safe Redirects and Forwards

Understanding What’s Important

  • Common Vulnerabilities and Exposures
  • OWASP Top Ten for 2013
  • CWE/SANS Top 25 Most Dangerous SW Errors
  • Monster Mitigations
  • Strength Training: Project Teams/Developers
  • Strength Training: IT Organizations

Secure Development Lifecycle (SDL)

SDL Process Overview

  • Software Security Axioms
  • Security Lifecycle – Phases

Applying Processes and Practices

  • Awareness
  • Application Assessments
  • Security Requirements
  • Secure Development Practices
  • Security Architecture/Design Review
  • Security Code Review
  • Configuration Management and Deployment
  • Vulnerability Remediation Procedures

Risk Analysis

  • Threat Modeling Process
  • 1. Identify Security Objectives
  • 2. Describe the System
  • 3. List Assets
  • 4. Define System/Trust Boundaries
  • 5. List and Rank Threats
  • 6. List Defenses and Countermeasures

Security Testing

Testing Tools and Processes

  • Security Testing Principles
  • Black Box Analyzers
  • Static Code Analyzers
  • Criteria for Selecting Static Analyzers

Testing Practices

  • OWASP Web App Penetration Testing
  • Authentication Testing
  • Session Management Testing
  • Data Validation Testing
  • Denial of Service Testing
  • Web Services Testing
  • Ajax Testing

Who Benefits

This is an intermediate-level JEE / web services programming course, designed for developers who wish to get up and running on developing well defended software applications.  This course may be customized to suit your team’s unique objectives.

PCI Compliant Developer Training

This secure coding training addresses common coding vulnerabilities in software development processes. This training is used by one of the principle participants in the PCI DSS. Having passed multiple PCI audits, this course has been shown to meet the PCI requirements.  The specification of those training requirements are detailed in 6.5.1 through 6.5.10 on pages 55 through 59 of the PCI DSS Requirements 3.0 document dated November, 2013.  This is not "checklist mentality" training as it integrates demonstrations, code flashes, and hands-on labs for vulnerabilities, defenses, and best practices in secure development lifecycle (SDL).

Prerequisites

Familiarity with Java and JEE is required and real world programming experience is highly recommended.  Ideally students should have approximately 6 months to a year of Java and JEE working knowledge.