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/semtex/semtex0.md
URL /wargames/semtex/semtex0/
Date 2026-04-07

Semtex Level 0

Semtex Level 0 — receive a stream from a network port, discard every second byte, and run the executable that reveals the password.

Table of Contents

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

Get a shell

semtex.labs.overthewire.org

x86/elf: Connect to port 24000
amd64/elf: Connect to port 24001
ppc/mach-O: Connect to port 24002

Receive data until the port is closed.

Every second byte you receive is trash, ignore it. The other bytes are an executable that shows you the password.

Then login to semtex1@semtex.labs.overthewire.org on port 2229

Thanks to mrx for the amd64 and ppc binaries!

Reading Material

Study guide

Level map: this level gives you the login for semtex1, used on port 2229.

What this level teaches

Raw network reading and handling unusual file formats.

Key ideas

  • Choose your platform. The page lists three ports for three platforms: x86 ELF, amd64 ELF and PowerPC Mach-O. Pick the one you can run.
  • Read until the port closes, then process the data.
  • Cleaning the stream. Every second byte is garbage to ignore; the others form an executable.
  • Run it. The program shows the password. Check its type with file first.
  • Reading. Beej’s guide to network programming is linked.

How to approach it

  1. Write a small client that connects, reads everything and saves it.
  2. Remove the unwanted bytes with a script.
  3. Mark the result executable and run it in a safe environment.

Why it matters

Receiving untrusted executables is risky; analyse them in a virtual machine.