0% found this document useful (0 votes)
14 views10 pages

Assign02 Bomblab

This document provides instructions for Assignment 2 involving defusing a bomb through 6 phases. It describes the goals of learning assembly code tools like gdb, objdump, and strings. It outlines checking out the bomblab files and instructions, and provides an example of using gdb to defuse phase 1 by showing clues, argument requirements, and examining memory data. Finally, it offers suggestions for using gdb, objdump, and strings to complete the remaining phases and guidelines for submitting solutions.

Uploaded by

nadzarza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views10 pages

Assign02 Bomblab

This document provides instructions for Assignment 2 involving defusing a bomb through 6 phases. It describes the goals of learning assembly code tools like gdb, objdump, and strings. It outlines checking out the bomblab files and instructions, and provides an example of using gdb to defuse phase 1 by showing clues, argument requirements, and examining memory data. Finally, it offers suggestions for using gdb, objdump, and strings to complete the remaining phases and guidelines for submitting solutions.

Uploaded by

nadzarza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Hanyang University

Assignment 2: bomblab
CSE4009: System Programming

1
Hanyang University

Goals
• Learn how to read assembly code
• Learn how to use essential tools to deal with assembly
code
• gdb
• objdump
• strings

2
Hanyang University

Check out Your Assignment


• Clone it to the project directory
• At your VM instance
$ cd Projects/{your directory}
$ git pull origin main
$ cd ./02_bomblab

3
Hanyang University

Check your files


• You have two files
• bomb – an exectuable file without debugging information
• bomb.c – a source file for the main routine

4
Hanyang University

Instructions for bomblab


• 6 phases to defuse your bomb
@see bomb.c

5
Hanyang University

Instructions for bomblab – Cnt'd


• 6 phases to defuse your bomb
• Make the right answer for each phase

Wrong!!

Correct!!

6
Hanyang University

How to Defuse Your Bomb


• Let's check phase_1 example
• gdb shows some useful clues
• strings_not_equals()accepts at least two arguments

7
Hanyang University

How to Defuse Your Bomb


• Let's check phase_1 example
• gdb shows some useful clues
• strings_not_equals()accepts at least two arguments
• x command shows the data stored in memory

8
Hanyang University

How to Defuse Your Bomb


• Let's check phase_1 example
• gdb shows some useful clues
• strings_not_equals()accepts at least two arguments
• x command shows the data stored in memory
• You have 5 more phases to defuse the bomb
• Your strong friends...
• gdb
• you can examine commands in the previous example
• objdump
• -t : print out bomb’s symbol table
• -d : print out disassemble code (or you can use disassemble in gdb)
• strings
• printout all printable strings in your bomb

9
Hanyang University

Submission Guideline
• Push only your solution file
$ git add {YOUR_ID}.txt
$ git commit
$ git push origin main

• An image that prints your answer must be uploaded to the


LMS in the week 6 contents section
• Captured image example

10

You might also like