Python for Security Analysts & Professionals

Unlock the power of Python for cybersecurity tasks with our hands-on course tailored for security professionals seeking to enhance their scripting skills for log manipulation, forensics, and more.

Course Thumbnail

Essential Skills Gained

Checkmark

Create working Python scripts following best practices

Checkmark

Perform log file analysis using Python

Checkmark

Use Python for security filters and packet analysis

Checkmark

Write secure Python applications with robust exception handling

Format

  • Instructor-led
  • 4 days with lectures and hands-on labs.

Audience

  • Security Analysts
  • Forensics Experts
  • IT Security Professionals
  • Python Developers in Security

Description

Geared for experienced security professionals new to Python, Python Programming for Security Analysts & Professionals is practical, hands-on Python training course that leads the student from the basics of writing and running Python scripts to more advanced features such as file operations, regular expressions, working with binary data, and using the extensive functionality of Python modules. Extra emphasis is placed on features unique to Python, such as tuples, array slices, and output formatting. This course is tailored specifically for Security Analysts and others who wish to use Python functionality for security-related tasks such as log manipulation or forensics. This course is essential for security professionals that are performing security reviews and audits of Python applications or are supporting development teams in implementing better defenses in Python.

Calendar icon

Upcoming Course Dates

August 18-21, 2025

10:00 AM - 6:00 PM

Virtual: Online - US/Eastern

Guaranteed to Run

Enroll

$2595

September 29, 2025 - October 02, 2025

10:00 AM - 6:00 PM

Virtual: Online - US/Eastern

Enroll

$2595

September 29, 2025 - October 02, 2025

10:00 AM - 6:00 PM

Virtual: Online - US/Eastern

Enroll

$2595

Course Outline

Download PDF

An Overview of Python

  1. What is python?

  2. Python Timeline

  3. Advantages/Disadvantages of Python

  4. Getting help with pydoc

The Python Environment

  1. Starting Python

  2. Using the interpreter

  3. Running a Python script

  4. Python scripts on Unix/Windows

  5. Editors and IDEs

Getting Started

  1. Using variables

  2. Builtin functions

  3. Strings

  4. Numbers

  5. Converting among types

  6. Writing to the screen

  7. Command line parameters

Flow Control

  1. About flow control

  2. White space

  3. Conditional expressions

  4. Relational and Boolean operators

  5. While loops

  6. Alternate loop exits

Sequences

  1. About sequences

  2. Lists and list methods

  3. Tuples

  4. Indexing and slicing

  5. Iterating through a sequence

  6. Sequence functions, keywords, and operators

  7. List comprehensions

  8. Generator Expressions

  9. Nested sequences

Working with files

  1. File overview

  2. Opening a text file

  3. Reading a text file

  4. Writing to a text file

  5. Reading and writing raw (binary) data

  6. Converting binary data with struct

Dictionaries and Sets

  1. About dictionaries

  2. Creating dictionaries

  3. Iterating through a dictionary

  4. About sets

  5. Creating sets

  6. Working with sets

Functions

  1. Defining functions

  2. Parameters

  3. Global and local scope

  4. Nested functions

  5. Returning values

Sorting

  1. The sorted() function

  2. Alternate keys

  3. Lambda functions

  4. Sorting collections

Errors and Exception Handling

  1. Syntax errors

  2. Exceptions

  3. Using try/catch/else/finally

  4. Handling multiple exceptions

  5. Ignoring exceptions

Modules and Packages

  1. The import statement

  2. Module search path

  3. Creating modules and Using packages

  4. Function and Module aliases

Working with Classes

  1. About o-o programming

  2. Defining classes

  3. Constructors

  4. Methods

  5. Instance data

  6. Properties

  7. Class methods and data

Regular Expressions

  1. RE syntax overview

  2. RE Objects

  3. Searching and matching

  4. Compilation flags

  5. Groups and special groups

  6. Replacing text

  7. Splitting strings

The standard library

  1. The sys module

  2. Launching external programs

  3. The string module

  4. Reading CSV data

Dates and times

  1. Working with dates and times

  2. Translating timestamps

  3. Parsing dates from text

Working with the file system

  1. Paths, directories, and filenames

  2. Checking for existence

  3. Permissions and other file attributes

  4. Walking directory trees

  5. Creating filters with fileinput

  6. Security and File Access

Network services

  1. Grabbing web content

  2. Detecting Malformed Input

Writing secure Python applications

  1. Parsing command-line options

  2. Getting help with pydoc

  3. Safely handling untrusted data

  4. Managing eval() permissions

  5. Potential insecure packages

  6. Embedding code snippets in Python

  7. Embedding authentication data in Python

  8. Potentially dangerous operations:

    • File access

    • Operating system access

    • Calls to external services

    • Called to external data sources

  9. Static analysis tools such as Bandit

Log File Analysis

  1. Raw log file manipulation

  2. Fail2Ban

  3. Customizing Fail2Ban with Python

Security Filters

  1. SQL-Injection Detection

  2. ModSecurity CRS filtering

Packet Analysis

  1. Packet Sniffing in Python

Analytics

  1. Security Logging and Analytics

  2. Attack Detection and Defense

  3. Python and Spark High-Level Overview

Bonus Content / Time Permitting

RESTful Web Services

  1. What is Flask?

  2. Developing a Flask Web service

  3. Mapping resources using URLs

  4. Mapping resources using HTTP

  5. Negotiating data content

Python application security

  1. OWASP 2021 Top Ten Overview

  2. Python Code Access Control

  3. Options for Protecting Data

  4. Injection and Python

  5. Python and Data Validation

  6. Python and XML Processing

  7. Python and Known Vulnerable Components

  8. Python and Serialization/Deserialization

Your Team has Unique Training Needs.

Your team deserves training as unique as they are.

Let us tailor the course to your needs at no extra cost.