Skip to content

msoto5/cs42_tsunami

Repository files navigation

cs42_tsunami

Proyect which consists of creating a C program that causes a simple buffer overflow in a Windows XP 32-bit environment. The buffer owerflow will be perform by strcpy function.

Getting Started

A Windows XP virtual machine was used to perform the project. Another possible options is using a Docker container.

Installing Windows XP Virtual Machine

You can easily create a virtual machine with vagrant following the following steps:

  1. Install VirtualBox in your machine
  2. Install vagrant
  3. Run WindowsXP_sp3_visual_studio.sh
  4. Open virtual machine with virtualbox

Once it is already installed, virtualbox is used to boot up and open it.

VirtualBox lets having shared clipboards and to drag files between host and guest machines. You can enable it in the top menú:

  • Shared Clipboard: Devices > Shared Clipboard > Bidirectional
  • Drag and Drop: Devices > Drag and Drop > Bidirectional

Fast Usage

  1. Compile tsunami.c and payload.c
  2. Send them to guest machine to the same folder (this can be made by dragging them with virtualbox function)
  3. Run payload:
./payload

Other files

  • shellcode_calc.c and shellcode_cmd.c: Are C files that execute some instructions in assembly language that open the calculator and the terminal respectively. They were used to obtain those instructions in hexadecimal with the debugger, which were later added to payload.c. Both files can be compiled and run with Microsoft Visual C++ which was already installed in Windows XP virtual machine.

Releases

No releases published

Packages

No packages published