Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Time to test your skills on a harder version of task 1 . This time not only the labels are missing, but someone invented their

Time to test your skills on a harder version of task1. This time not only the labels are missing, but someone invented their own calling convention, which you will also have to reverse-engineer.
Your very own task2
You will get your very own task2. To generate it, run:
~cpen212/Public/lab1/task2gen
This will create a task2 in the current directory (so you better have permissions there, or it will fail).
This also accepts one argument. This argument is a password, and task2 will either print PASSED or FAILED depending on whether you've provided the correct password.
Analysis
In this and the next task, you will use the skills you learned in Task 1 to determine how task2 checks its input.
For this task, start by identifying all functions and the addresses like in Task 1. Then determine as much as you can about the calling convention being used by the program (argument and return registers, caller-saved and callee-saved registers, etc). Note that the calling convention being used is likely different from what we covered in class.
Finally, there are four checks that the program performs on the password it receives. If any of these fail, the program reports FAILED, and if all four pass, then the program reports PASSED. For each of those checks, determine the address of the toplevel function called to determine whether the individual check passes or fails.
As before, there is a task2/task2.c file you need to fill out with the corresponding questions in task2/task2.h. Also as before, your code must compile, link, and execute on bare metal, and may not have any side effects. Be sure to test your code for example by adaptng the check program from Task 1 as you will receive no credit if the program doesn't compile, crashes, or returns incorrect results.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions