Python Obfuscation and Analysis Evasion Techniques
> Protect your Python code from prying eyes_
Learn advanced Python code obfuscation techniques. From exec() to bytecode, including marshal and obfuscation tools. Protect your work or understand how others do it.
2.8 hours
Online on-demand
Advanced
€89
Note: This course is currently only available in Spanish. Contact us if you're interested in an English version.
Why this course?
Sometimes you need your code to be hard to read. Post-delivery control, license management, intellectual property protection… There are legitimate reasons to hide logic.
This course teaches you how to create, execute and hide Python code you need to keep under the radar. It’s not theory: you’ll implement real techniques that work against static analysis tools.
Dani García has created hacking tools that are still in use. He knows the techniques from both sides: hiding and analyzing. Here he shares that knowledge.
By the end, you’ll create a functional obfuscated TCP payload in one line that evades most automatic detection tools.
What you’ll learn
- Dynamic code execution: eval(), exec(), compile() and more
- Hiding techniques: How to hide dangerous method calls
- Static vs dynamic analysis: What tools detect and how to avoid it
- Bytecode and marshal: Code compilation and serialization
- Manual obfuscation: Artisanal techniques that work
- Obfuscation tools: Process automation
- Encoding: Base64, ROT13 and combined techniques
- Tool evasion: Bandit, Semgrep, Pysa and others
Curriculum
Chapter 1: Basic Concepts
- What is an Easter egg (1 free lesson)
- Why you might need one in production
Chapter 2: Executing an Easter Egg
- Native Python methods
- eval(), exec(), compile()
- types, codeop, subprocess
Chapter 3: Making Code Undetectable
- Static and dynamic analysis
- Hiding exec() methods
- First functional Easter egg
- Monkey patching
- Bytecode with marshal
- Manual obfuscation
- Obfuscation with tools
- Base64 and ROT13
Chapter 4: Analysis Tools
- Static code analysis
- Bandit, Semgrep, Pysa
- How to avoid detection
Final Project
Obfuscated TCP payload in one line:
- Connects to remote server via TCP
- Sends information without raising suspicion
- Obfuscated with multiple techniques
- Evades static analysis
Who is this for?
- Advanced Python developers who need to protect their code
- Security researchers who analyze malware
- Red teamers who need evasion techniques
- CTF enthusiasts in reversing challenges
- Product developers who want to protect licenses
Prerequisites
- Intermediate-advanced Python level (required)
- Mastery of functions, imports and string handling
- Familiarity with security concepts (recommended)
Legal Notice
This knowledge is for protecting your own code or understanding obfuscation techniques for educational purposes. Using these techniques maliciously is the user’s responsibility.
What’s included
- 2.8 hours of video with dense, technical content
- 13 downloadable resources with code and examples
- Exclusive tools developed for the course
- Access on mobile app and TV to study wherever you want
- Lifetime access with no expiration
- Free updates with new techniques
Interested in this course?
Tell us about your team and we'll prepare a personalized proposal
Request information
Write to us with the number of people and approximate dates. We'll respond within 24 hours.
hello@alicebob.ioKeep learning
101 - Introduction to REST API Security
Your APIs are the gateway to your business. If they're poorly built, you don't need hackers - you'll break yourself. Learn to protect your APIs from day one.
102 - API Security Checklist
Master the definitive security checklist for APIs: authentication, OAuth, JWT, DDoS, CI/CD and monitoring. Everything you need to audit and protect your APIs.
103 - OpenAPI Without Pain: The Guide I Wish I Had
Learn OpenAPI from zero to advanced level. Validations, components, inheritance and auto-generators. The definitive guide every developer needs.