Duration
4 Days
Audience:
Employees of federal, state and local governments; and businesses working with the government.
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. Students are required to have some basic programming experience and exposure prior to attending this course. Students should have basic development experience in any programming language, along with a working, user-level knowledge of Unix/Linux, Mac, or Windows.
Course 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.
Working in a hands-on learning environment, guided by our expert team, attendees will learn to:
- 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
- Write Secure Python Applications
- Perform Log File Analysis
- Work with Security Filters, Packet Analysis and related Analytics
- Time Permitting / Bonus Content: Working with RESTful Services
Course Outline
- An Overview of Software Development
- Thinking as a developer
- Pseudocode as a design tool
- Analysis – Understanding the problem
- Design – creating the solution
- Let’s Get Hands-On: Scripting and programming basics
- An Overview of Python
- What is python?
- Python Timeline
- Advantages/Disadvantages of Python
- Getting help with pydoc
- Python Quick View
- What is Python?
- Python timeline
- Advantages/disadvantages
- Installing Python
- Getting help
- The Python Environment
- Starting Python
- Using the interpreter
- Running a Python script
- Editors and IDEs
- Getting Started with Python
- Using variables
- Builtin functions
- String data
- Numeric data
- Converting types
- Console input/output
- Command line parameters
- Flow Control
- About flow control
- The if statement
- Relational and Boolean operators
- while loops
- Exiting from loops
- Array types
- About array types
- Lists and list methods
- Tuples
- Indexing and slicing
- Iterating through a sequence
- Sequence functions, keywords, and operators
- List comprehensions and generators
- Working with files
- File overview
- Opening a text file
- Reading a text file
- Writing to a text file
- Dictionaries and Sets
- About dictionaries
- Creating dictionaries
- Iterating through a dictionary
- About sets
- Creating sets
- Working with sets
- Functions
- Defining functions
- Returning values
- Parameters and arguments
- Variable scope
- Sorting
- The sorted() function
- Custom sort keys
- Lambda functions
- Sorting in reverse
- Using min() and max()
- Errors and Exception Handling
- Exceptions
- Using try/catch/else/finally
- Handling multiple exceptions
- Ignoring exceptions
- Modules and packages
- Creating Modules
- The import statement
- Module search path
- Using packages
- Function and module aliases
- Getting Started with Object Oriented Programming and Classes
- About object-oriented programming
- Defining classes
- Constructors
- Understanding self
- Properties
- Instance Methods and data
- Class methods and data
- Inheritance