
~/roadmaps/الأساسيات
Python for Security
Scripting for recon, automation, and tooling.
جارٍ تحميل الخريطة…
Python for Security Roadmap: خطوة بخطوة
عدد الخطوات بالترتيب: 18. افتح أي خطوة في الخريطة أعلاه لتتبّع تقدّمك وتدوين ملاحظاتك.
Orientation
1.Start here
Start· مبتدئ· ~0.5h
Python is the most useful language for security work: automating tasks, parsing logs, talking to APIs and building small tools. This roadmap assumes basic programming but no Python experience.
- Install Python 3
- Choose an editor such as VS Code
- Plan your study time
Core skills
2.Python syntax refresh
Concept· مبتدئ· ~2h
Learn Python's essentials: variables, data types, lists, dictionaries, loops, functions and error handling.
- Use core data types and control flow
- Write functions
- Handle exceptions
الأدوات والتقنيات: Programming
3.Virtual environments
Concept· مبتدئ· ~3h
Virtual environments isolate each project's dependencies so tools don't break each other.
- Create and activate a venv
- Install packages with pip
- Record dependencies in requirements.txt
الأدوات والتقنيات: Programming
4.HTTP with requests
Concept· مبتدئ· ~4h
The requests library makes calling web APIs and websites simple — essential for automation.
- Send GET and POST requests
- Handle headers, JSON and errors
- Use timeouts and TLS verification
الأدوات والتقنيات: Programming
5.Parsing JSON and YAML
Tool· مبتدئ· ~2h
Security tools often output JSON or YAML. Parsing them lets you filter, transform and report data.
- Load and write JSON
- Navigate nested structures
- Validate input before using it
الأدوات والتقنيات: Programming
6.Regex for logs
Lab· مبتدئ· ~3h
Regular expressions extract structured data from unstructured log lines.
- Write and test regular expressions
- Use capture groups
- Avoid overly greedy patterns
الأدوات والتقنيات: Programming
7.CLI tools with argparse
Concept· مبتدئ· ~4h
argparse turns scripts into proper command-line tools with options and help text.
- Define arguments and options
- Provide help and defaults
- Validate input
الأدوات والتقنيات: Programming
8.Working with files and paths
Concept· مبتدئ· ~2h
pathlib makes file handling safe and portable across operating systems.
- Read and write files safely
- Walk directories
- Handle encodings
الأدوات والتقنيات: Programming
9.Subprocess and system calls
Tool· مبتدئ· ~3h
subprocess runs other programs from Python. Passing arguments as a list avoids shell injection.
- Run commands with subprocess.run
- Capture output and errors
- Avoid shell=True with untrusted input
الأدوات والتقنيات: Programming
Advanced practice
10.Socket basics
Concept· مبتدئ· ~4h
Sockets are the foundation of network programming — every client and server uses them.
- Create TCP client and server sockets
- Send and receive data
- Handle timeouts
الأدوات والتقنيات: Programming
11.Building a simple TCP port checker
Lab· مبتدئ· ~2h
Checking which ports are open on your own systems is a classic networking exercise that teaches sockets, timeouts and concurrency. Only scan systems you own or are authorized to test.
- Check TCP connectivity with timeouts
- Add concurrency safely
- Report results clearly
الأدوات والتقنيات: Programming
12.Parsing PCAP metadata
Concept· مبتدئ· ~3h
Scapy and similar libraries read packet captures so you can extract hosts, protocols and statistics programmatically.
- Read PCAP files with Scapy
- Extract hosts, ports and protocols
- Summarize traffic
الأدوات والتقنيات: Programming
13.Writing clients for security tool APIs
Tool· مبتدئ· ~4h
Most security tools (SIEMs, scanners, ticketing) have REST APIs. Small Python clients automate lookups and reporting.
- Authenticate to APIs securely
- Handle pagination and rate limits
- Keep API keys out of code
الأدوات والتقنيات: Programming
14.Packaging a small utility
Concept· مبتدئ· ~2h
Packaging turns a script into an installable tool you can share and version.
- Structure a project
- Write pyproject.toml
- Build and install a package
الأدوات والتقنيات: Programming
15.Testing scripts
Concept· مبتدئ· ~3h
Tests catch mistakes before your tool gives wrong results during an investigation.
- Write unit tests with pytest
- Test edge cases
- Run tests automatically
الأدوات والتقنيات: Programming
16.Secure coding habits
Lab· مبتدئ· ~4h
Security tools must be secure too: validate input, avoid injection, handle secrets carefully and scan your code.
- Validate and sanitize input
- Avoid unsafe functions (eval, shell=True, pickle on untrusted data)
- Scan code with Bandit
الأدوات والتقنيات: Programming
Assessment
17.Skills checkpoint
Checkpoint· مبتدئ· ~2h
Check that you can build, test and package a small, secure security tool in Python.
- Parse data and call APIs
- Build a CLI tool
- Test and scan your code
Capstone
18.Python for Security — ready
Finish· مبتدئ· ~1h
You can now automate security tasks with Python. Continue with Detection Engineering, Log Analysis or Git & Collaboration.
- Keep your tools in Git
- Choose your next roadmap
- Share a tool you built
تابع التعلّم
مسارات ذات صلة
Linux Administrator Roadmap
Shells to systemd, hardening, and troubleshooting.
Network Administrator Roadmap
TCP/IP, routing, switching, and network troubleshooting.
Database Administrator Roadmap
PostgreSQL and MySQL ops, replication, and backup.
Git and Collaboration Roadmap
Version control hygiene for security teams.
كل المسارات المهنية
تصفّح كل مسارات التعلّم في CyberA4U