Lab 1: Bash & Python Refresher
Standard I/O Redirection
Many of the pwn.college challenges can be completed entirely in bash using a combination of existing commands and I/O redirection.
When you start a program, a process is created, which is a running instance of a program.
Every process in Linux (and other UNIX-based operating systems) has 3 special file descriptors that are used for communication:
stdin: an input character streamstdout: an output character streamstderr: a separate output character stream for errors
Redirecting these streams means forwarding the characters sent to a different location.
Python Scripting with pwntools
Many of the later challenges throughout the course will involve repetitive interactions with challenge programs, or programming tasks that are annoying to complete in Bash and are better-suited to a scripting language like Python.
In particular, the next set of challenges will give you a chance to practice your Python scripting by introducing you to a useful Python package called pwntools.
pwntools is a package full of utilities useful for constructing program exploits. In today’s lab, you will primarily be using it to script interactions with challenge programs in various ways.