Python for Security Analysts & Professionals

Core Python: Learn File Operations, Regular Expressions, Binary Data, Network Services, Security & More!

Geared for experienced security professionals, this class is an introductory, 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 about 50% hands-on lab to 50% lecture ratio, combining engaging instructor presentations, demonstrations and discussions with extensive machine-based student labs and practical project work. Although the course is introductory in nature, it will increase in complexity as more sophisticated skills and techniques are introduced. Students can rely on our highly experienced instructors to provide informed, relatable, ‘real-world' answers to their questions.


4 days/32 hours of instruction
Public Classroom Pricing

Starting at: $2395(USD)

GSA Price: $1796.25

Group Rate: $2295

Private Group Pricing

Have a group of 5 or more students? Request special pricing for private group training today.

Part 1:  An Overview of Python
1.    What is python?
2.   Python Timeline
3.   Advantages/Disadvantages of Python
4.    Getting help with pydoc
Part 2:  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
Part 3:  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
Part 4: Flow Control
1.    About flow control
2.    White space
3.    Conditional expressions
4.    Relational and Boolean operators
5.    While loops
6.    Alternate loop exits
Part 5: 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
Part 6:  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
Part 7:  Dictionaries and Sets
1.    About dictionaries
2.    Creating dictionaries
3.    Iterating through a dictionary
4.    About sets
5.    Creating sets
6.    Working with sets
Part 8:  Functions
1.    Defining functions
2.    Parameters
3.    Global and local scope
4.    Nested functions
5.    Returning values
Part 9:  Sorting
1.    The sorted() function
2.    Alternate keys
3.    Lambda functions
4.    Sorting collections
Part 10:  Errors and Exception Handling
1.    Syntax errors
2.    Exceptions
3.    Using try/catch/else/finally
4.    Handling multiple exceptions
5.    Ignoring exceptions
Part 11:  Modules and Packages
1.    The import statement
2.    Module search path
3.    Creating modules and Using packages
4.    Function and Module aliases
Part 12:  Classes
1.    About o-o programming
2.    Defining classes
3.    Constructors
4.    Methods
5.    Instance data
6.    Properties
7.    Class methods and data
Part 13:  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
Part 14:  The standard library
1.    The sys module
2.    Launching external programs
3.    The string module
4.    Reading CSV data
Part 15:  Dates and times
1.    Working with dates and times
2.    Translating timestamps
3.    Parsing dates from text
Part 16: 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
Part 17: Network services
1.    Grabbing web content
2.    Detecting Malformed Input
Part 18: 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:
    o    File access
    o    Operating system access
    o    Calls to external services
    o    Called to external data sources
9.    Static analysis tools such as Bandit
 Part 19: Log File Analysis
1.    Raw log file manipulation
2.    Fail2Ban
3.    Customizing Fail2Ban with Python
Part 20: Security FIlters
1.    SQL-Injection Detection
2.    ModSecurity CRS filtering
Part 21: Packet Analysis
1.    Packet Sniffing in Python
Part 22: Analytics
1.    Security Logging and Analytics
2.    Attack Detection and Defense
3.    Python and Spark High-Level Overview


This course is tailored specifically for:

  • Security Analysts and others new to Python, who wish to learn and use Python functionality for security-related tasks such as log manipulation or forensics. 
  • Security professionals performing security reviews and audits of Python applications or supporting development teams in implementing better defenses in Python.

  • Create working Python scripts following best practices
  • Use python data types appropriately
  • Read and write files with both text and binary data
  • Search and replace text with regular expressions
  • Get familiar with the standard library and its work-saving modules
  • Use lesser known but powerful Python data types
  • Create "real-world", professional Python applications
  • Work with dates, times, and calendars
  • Know when to use collections such as lists, dictionaries, and sets
  • Understand Pythonic features such as comprehensions and iterators
  • Write robust code using exception handling

A full refund will be issued for class cancellations made at least 10 business days before the course begins. Payment is nonrefundable for cancellations or reschedules made within 10 business days from the course start date and for No Shows (students who do not attend class).  For reschedules made within 10 business days from the course start date, students must reschedule immediately for the same course, up to a maximum of six months from the original date.  A student may only reschedule one time.

Python for Security Analysts & Professionals Schedule

Filter by region
Filter by region
CPSFDC\Entity\Session::__set_state(array( 'entitySanitizer' => 'CPSFDC\\Utils\\Sanitizers\\SessionSanitizer', 'sfId' => 'a011G00000ZKLcSQAX', 'startDate' => '2022-11-14', 'startTime' => '10:00 AM', 'endDate' => '2022-11-17', 'endTime' => '6:00 PM', 'name' => 'TTPS489410VCL', 'standardCourseFee' => '2395', 'standardCourseFeeCAD' => '2993.75', 'standardCourseFeeEUR' => '2035.75', 'courseId' => 'TTPS4890', 'course' => 'a001G00000CCXY6QAP', 'courseSfId' => 'a001G00000CCXY6QAP', 'courseName' => 'Python for Security Analysts & Professionals', 'instructorSfId' => 'a023700000Z1UwcAAF', 'instructorDisplayName' => 'Trivera', 'instructorName' => 'Trivera', 'locationCode' => 'VCL', 'sessionStatus' => 'O', 'city' => 'Live Online Training', 'state' => '', 'cityState' => 'Live, Online Training', 'locationSfId' => 'a0637000000tn2hAAA', 'subjectSfId' => 'a051G00000Jso5fQAB', 'subjectName' => 'Software Development', 'specialitySfId' => 'a051G00000Jso5uQAB', 'specialityName' => 'Python', 'certificationSfId' => NULL, 'certificationBody' => '', 'certificationName' => '', 'pdus' => '', 'deliveryModalities' => 'In-Person;Live Online', 'fullFacilityAddress' => 'Live Instructor-Led Online Training
Please call Cprime for location details
at 1-877-800-5221
, LOL', 'gtr' => '', ))

Live OnlineUSA Based

Nov 14th - 17th
10:00 AM - 6:00 PM ET

Request Private Group Training