Assign02 Bomblab

Download as pdf or txt
Download as pdf or txt
You are on page 1of 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy