Skip to main content

Setup: Local Environment

We recommend you work within the container (Ubuntu 22.04) as we provide with Dockerfile. Please follow the following steps to setup your local environment.

  1. Update the Package List:

    Run the following command to ensure your package list is up to date:

    sudo apt update
  2. Install Python:

    Python 3 should be pre-installed in Ubuntu 22.04. You can verify this by running:

    python3 --version

    If Python 3 is not installed, you can install it with:

    sudo apt install python3
  3. Install pwntools:

    Use pip (Python's package installer) to install pwntools:

    sudo apt install python3-pip
    pip3 install pwntools
  4. Verify Installation:

    You can verify that pwntools has been installed correctly by starting a Python 3 interactive session:

    python3

    Inside the Python shell, try importing pwntools:

    import pwn

    If there are no errors, the installation was successful.

Pwntools

To solve CTF challenges, it would be very helpful to use pwntools, a powerful Python library designed for CTFs and binary exploitation. pwntools provides convenient functions to interact with both local and remote binaries, allowing you to test exploits locally before applying them to the remote server.

Next, we will first walk through the process of solving a problem locally using pwntools. Then, we'll demonstrate how to connect to the remote server and retrieve the real flag.