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

Semtex Level 7

Semtex Level 7 — escape a restricted shell, then analyse the multivitamin algorithm for a weakness that makes it easy to defeat.

Table of Contents

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

Multi-vitamin

Getting out of the restricted shell shouldn’t take you more than five minutes. Then have a look at /rdx/multivitamin. Try to analyse the algorithm very carefully. There is a weakness that really speeds up your quest…\

Multiplication is easy, and so is division…? You might want to look at http://gmplib.org/ if you use c.

Study guide

Level map: analyse the program in /rdx/multivitamin after leaving the restricted shell.

What this level teaches

Restricted-shell escapes and cryptanalysis of an arithmetic scheme.

Key ideas

  • Restricted shells. The page says getting out should take about five minutes. Many programs offer ways to run other commands.
  • Study the algorithm carefully. The page says a weakness really speeds up the solution.
  • Big numbers. The hint “multiplication is easy and so is division…?” and the link to the GMP library suggest arithmetic on very large numbers.

How to approach it

  1. Get out of the restricted environment.
  2. Read the algorithm and identify which operation is easy to reverse.
  3. Use a big-number library to implement the attack.

Why it matters

Number-theoretic schemes are only as strong as the hardness of the underlying problem, and misuse can destroy that hardness.