Your privacy matters: This site uses cookies to analyze site usage and provide social media features. Learn More.

Python Training Overview

This Secure Python Coding training teaches attendees how to overcome the most critical security issues when developing their Python applications. Participants learn about vulnerabilities from the OWASP Top Ten list for the web and how to address these in Python web applications (with additional detail included for Django). The course also covers significant security issues for Python code in general (including many Python-specific issues such as function hijacking) and explores security solutions provided by the Python ecosystem, including authentication, access control, and encryption.

Location and Pricing

Most Accelebrate courses are delivered as private, customized, on-site training at our clients' locations worldwide for groups of 3 or more attendees and are custom tailored to their specific needs. Please visit our client list to see organizations for whom we have delivered private in-house training. These courses can also be delivered as live, private online classes for groups that are geographically dispersed or wish to save on the instructor's or students' travel expenses. To receive a customized proposal and price quote for private training at your site or online, please contact us.

Python Training Objectives

All students 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 about Python security architecture
  • Have a practical understanding of cryptography
  • Learn about typical coding mistakes and how to avoid them
  • Get information about some recent vulnerabilities in the Java framework
  • Learn about denial of service attacks and protections
  • Get sources and further readings on secure coding practices

Python Training Outline

Expand All | Collapse All | Printer-Friendly

Introduction
IT Security and Secure Coding
  • Nature of security
  • What is risk?
  • IT security vs. secure coding
  • From vulnerabilities to botnets and cybercrime
Web Application Security (OWASP Top Ten 2017)
  • Injection
    • Injection principles
    • SQL injection
    • Other injection flaws
  • Broken authentication
    • Session handling threats
    • Session handling best practices
    • Sessions in Django
    • Additional cookie security considerations
    • Setting cookie attributes – best practices
  • Sensitive data exposure
    • Sensitive data exposure
    • Transport layer security
  • A4 - 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
  • Insecure deserialization
    • Deserialization basics
    • Security challenges of deserialization
    • Security issues when using Pickle
    • Code injection via overriding __reduce__ in Pickle
    • Code injection via YAML deserialization
    • Issues with deserialization – JSON
  • Using components with known vulnerabilities
Client-side Security
  • JavaScript security
  • Same Origin Policy
  • Cross Origin Resource Sharing (CORS)
  • JavaScript usage
  • JavaScript Global Object
  • Dangers of JavaScript
  • Exercise – Client-side authentication
  • Client-side authentication and password management
  • Protecting JavaScript code
  • Exercise – JavaScript obfuscation
  • Clickjacking
  • 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
Python Security Architecture
  • Python architecture
  • Python applications and their attack surfaces
  • Authentication and authorization
    • Authentication in Python
    • Authorization in Python
    • Authentication and authorization in Django
    • Authentication and authorization in Flask
  • Code protection in Python
    • Python bytecode
    • Obfuscation
    • Modifying the Python runtime
    • Weaknesses in the techniques
    • Other protection methods
    • Related security issues
    • Sandboxing
  • Python-specific security concerns
    • Vulnerabilities in multiple layers
    • Discovering vulnerable code
    • Notable vulnerabilities in Python
    • Notable vulnerabilities in Django
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
    • The RSA algorithm
  • 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
  • Cryptography in Python
    • Cryptographic libraries – overview
    • Hashing
    • Random numbers
    • Symmetric encryption
    • Asymmetric encryption
    • TLS/SSL in Python
Common Coding Errors and Vulnerabilities
  • Input validation
    • Input validation concepts
    • Integer problems
    • Path traversal vulnerability
    • Unvalidated redirects and forwards
    • Log forging
    • Executing user-controlled code in Python
    • String formatting issues in Python
    • Taint analysis
  • Improper use of security features
    • Typical problems related to the use of security features
    • Insecure randomness
    • Password management
    • Dangers of reflection in Python
  • Improper error and exception handling
    • Typical problems with error and exception handling
    • Exception handling in Python
    • Empty catch block
    • Overly broad catch
    • Using multi-catch
    • Relying on assertions for error checking – spot the bug!
  • Time and state problems
    • Concurrency and threading
    • Time-of-check-to-time-of-use (TOCTTOU)
  • Code quality problems
    • Dangers arising from poor code quality
    • Immutability
    • Context managers
Denial of service
  • DoS introduction
  • Asymmetric DoS
  • SSL/TLS renegotiation DoS
  • Regular expression DoS (ReDoS)
    • Exercise ReDoS
    • ReDoS mitigation
    • Case study – ReDos in Stack Exchange
  • Hashtable collision attack
    • Using hashtables to store inputs
    • Hashtable collision
    • Hash tables in Python
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
  • Recommended books – Python security
Conclusion
Request Pricing

Lecture percentage

50%

Lecture/Demo

Lab percentage

50%

Lab

Course Number:

SEC-132

Duration:

3 Days

Prerequisites:

All Python Security training students must have general Python development experience.

Training Materials:

All attendees receive comprehensive courseware.

Software Requirements:

Accelebrate can either provide a VMware virtual machine that can be run locally for the training or can provide access to a preconfigured cloud environment for each participant. Please contact us for details.

Contact Us:

Accelebrate’s training classes are available for private groups of 3 or more people at your site or online anywhere worldwide.

Don't settle for a "one size fits all" public class! Have Accelebrate deliver exactly the training you want, privately at your site or online, for less than the cost of a public class.

For pricing and to learn more, please contact us.

Contact Us

Toll-free in US/Canada:
877 849 1850
International:
+1 678 648 3113

Toll-free in US/Canada:
866 566 1228
International:
+1 404 420 2491

925B Peachtree Street, NE
PMB 378
Atlanta, GA 30309-3918
USA

Subscribe to our Newsletter:

Never miss the latest news and information from Accelebrate:

Microsoft Gold Partner

Please see our complete list of
Microsoft Official Courses

Recent Training Locations

Alabama

Huntsville

Montgomery

Birmingham

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

San Francisco

Oakland

San Jose

Orange County

Los Angeles

Sacramento

San Diego

Colorado

Denver

Boulder

Colorado Springs

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Miami

Jacksonville

Orlando

Saint Petersburg

Tampa

Georgia

Atlanta

Augusta

Savannah

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Ceder Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

Banton Rouge

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Hagerstown

Frederick

Massachusetts

Springfield

Boston

Cambridge

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Saint Paul

Minneapolis

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Reno

Las Vegas

New Jersey

Princeton

New Mexico

Albuquerque

New York

Buffalo

Albany

White Plains

New York City

North Carolina

Charlotte

Durham

Raleigh

Ohio

Canton

Akron

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Tulsa

Oklahoma City

Oregon

Portland

Pennsylvania

Pittsburgh

Philadelphia

Rhode Island

Providence

South Carolina

Columbia

Charleston

Spartanburg

Greenville

Tennessee

Memphis

Nashville

Knoxville

Texas

Dallas

El Paso

Houston

San Antonio

Austin

Utah

Salt Lake City

Virginia

Richmond

Alexandria

Arlington

Washington

Tacoma

Seattle

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Edmonton

Calgary

British Columbia

Vancouver

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan

© 2013-2019 Accelebrate, Inc. All Rights Reserved. All trademarks are owned by their respective owners.