Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-05-22 22:41 UTC
Current Environment Production
Build Time May 22, 22:41
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Page Location
Page Info
Layout default
Collection docs
Path _docs/wargames/overthewire/drifter/drifter1.md
URL /docs/wargames/drifter/drifter1/
Date 2026-04-07
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Drifter1

By Amr

Level 1 is a file parsing / heap corruption bug, with C++ classes.

Estimated reading time: 0 minutes

Table of Contents

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

Level 1 is a file parsing / heap corruption bug, with C++ classes.

There is no need to mess around with heap exploitation, and C++ lends itself to relatively straight forward exploitation.

SMASHING C++ VPTRS - Although keep in mind that compiler changes can influence how things are laid out.

When looking over the below code, keep in mind what needs to be done to enable debugging, and what SetBuffer does.

One last hint: In order to correctly overflow the objects / pointers, the allocation size will have to be similar to the class size ;) Even blindly messing around will lead to code execution sooner or later