Skip to main content

Settings

Color Mode

Theme Skin

Background

Appearance preferences are saved in this browser only.

Environment

Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links

Theme & Build

Jekyll v3.10.0
Last BuildNov 24, 17:25

Page Location

Page Info

Layout default
Collection wargames
Path _wargames/vortex/vortex0.md
URL /wargames/vortex/vortex0/
Date 2026-04-07

Vortex Level 0

Vortex Level 0 — write a small TCP client that reads four unsigned integers in host byte order, adds them, and sends back the result.

Table of Contents

Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.

Level Goal

Your goal is to connect to port 5842 on vortex.labs.overthewire.org and read in 4 unsigned integers in host byte order. Add these integers together and send back the results to get a username and password for vortex1. This information can be used to log in using SSH.

Note: vortex is on an 32bit x86 machine (meaning, a little endian architecture)

Helpful Reading Material

Study guide

Level map: connect to port 5842 on vortex.labs.overthewire.org to obtain the credentials for the next account.

What this level teaches

Basic network programming and the realities of 32-bit little-endian data.

Key ideas

  • Sockets. Create a TCP socket, connect, read and write. The page links Beej’s network programming guide.
  • Byte order. The server sends four 32-bit unsigned integers in host byte order. The page notes the machine is 32-bit x86, so little-endian.
  • Fixed-width arithmetic. Think about what a 32-bit unsigned integer can hold and what happens when a sum is too big; the value you send must fit the same format.
  • Parsing binary data. In Python, the struct module reads and writes binary integers.

How to approach it

  1. Connect with a small script and read exactly the bytes you expect.
  2. Convert them to numbers, add them correctly for the width involved, and send the result in the same format.

Why it matters

Binary protocols and integer width mistakes are the foundation of countless exploits.