0401 | Introductions
Disclaimer | Attribution
This short "Python 201" is based on my own notes taken during the TCM Security - Python 201 for Hackers video course by Riley Kidd.
I highly recommend this course as a great starting point for learning about Python; it was instrumental in my own understanding of the subject. I would like to extend a big thank you to the TCM Security Team for providing such valuable resources!
Welcome and course introduction
- Welcome
- Project: https://247ctf.com
- Course introduction
- Level up from the Python 101 for Hackers course
- Understand more advanced Python and programming techniques
- Leverage Python to interface with the Windows API
- Examples and projects focus on techniques useful to hackers
- Limited use of theory and slides, you will learn by example
- Won't go into technical detail on non-Python topics
- Programming on a Windows environment (mostly)
- Examples and discussions focus on Python3, not Python2
- Sublime as a text editor, but not a requirement
- Dracula theme for cmd and powershell, but not a requirement
- Prerequisites
- Knowledge of Python 101 for Hackers topics and techniques
- High-level understanding/familiarity with
- Burp Suite as a penetration testing tool
- Symmetric vs Asymmetric cryptography
- Wireshark and the network model
- Pointers and structures
- Course tips and tricks
- Take detailed notes (written, typed or both)
- Course focus is on Python, but concepts apply to other languages too
- Aim to use the mouse for everything (but the keyboard might win)
- Pause, rewind and implement lesson content yourself
- If non-Python explanations are too high level: Google, google, google
- Not a malware creation course: BE ETHICAL
- Topics covered
- Introduction
- Windows Setup
- Python 201
- Object Oriented Programming
- The Windows API
- Extending Python
- Python Projects
- Extending Burp
- Debugging
- Closing
Setup on Windows
- check if python is installed (via cmd) |
python -V
- installing python
- download -- https://python.org/downloads
- make sure to Add python.exe to PATH -- (mark it)
- verify the install --
python -V
- check pip |
pip -V
- installing pip | installed at default
- download bootstrap file | https://bootstrap.pypa.io/get-pip.py
- installing it |
python get-pip.py
Sublime Text
- Small Comment Hack | Keybindings Settings
- issue | block comment is not possible on european keyboard layouts
- solution | change key bindings and create a new mapping
[
{
"keys": ["ctrl+7"],
"command": "toggle_comment",
"args": { "block": false }
},
{
"keys": ["ctrl+shift+7"],
"command": "toggle_comment",
"args": { "block": true }
}
]