I dereference the string pointed to by %rdi using x/s $rdi and see that the string pointed to is 'blah'. We get the following part, We see a critical keyword Border, right? I am currently stuck on bomb lab phase 5. Are you sure you want to create this branch? Instructors and students view the scoreboard by pointing their, The online Bomb Lab is self-grading. phase_defused The key is that each time you enter into the next element in the array there is a counter that increments. read_line Try this one. Are you sure you want to create this branch? Answers that are vague, inaccurate, or . Entering these numbers allows us to pass phase_3. The ./bomblab directory contains the following files: Makefile - For starting/stopping the lab and cleaning files, bomblab.pl* - Main daemon that nannies the other servers & daemons, Bomblab.pm - Bomblab configuration file, bomblab-reportd.pl* - Report daemon that continuously updates scoreboard, bomblab-requestd.pl* - Request server that serves bombs to students, bomblab-resultd.pl* - Result server that gets autoresult strings from bombs, bomblab-scoreboard.html - Real-time Web scoreboard, bomblab-update.pl* - Helper to bomblab-reportd.pl that updates scoreboard, bombs/ - Contains the bombs sent to each student, log-status.txt - Status log with msgs from various servers and daemons, log.txt - Scoreboard log of autoresults received from bombs, makebomb.pl* - Helper script that builds a bomb, scores.txt - Summarizes current scoreboard scores for each student, src/ - The bomb source files, writeup/ - Sample Latex Bomb Lab writeup, LabID: Each instance (offering) of the lab is identified by a unique, name, e.g., "f12" or "s13", that the instructor chooses. Then type the, This will create ps and pdf versions of the writeup, (1) Reset the Bomb Lab from scratch by typing, (2) Start the autograding service by typing, (3) Stop the autograding service by typing, You can start and stop the autograding service as often as you like, without losing any information. I choose the first argument as 1 and then the second one should be 311. I inputed the word 'blah' and continued to run the program. ', After solving stage 3 you likely get the string 'Halfway there! What differentiates living as mere roommates from living in a marriage-like relationship? Lets enter a test string to let the program hit our break point. How about the next one?'. At the . Check to see if the incremented character pointer is not null terminated. phase_3 First, interesting sections/function names: Then, we can take a look at the fixed value were supposed to match and go from there: Woah. In this repository I will take down my process of solving the bomb lab of CS:APP. Halfway there! Which one to choose? I know b7 < eb < f6 < 150 < 21f < 304, so the order of nodes should be 3 0 5 4 1 2 (or 2 5 0 1 4 3 - in ascending order) and I should add +1 to all numbers. Using gdb we can convince our guess. read_six_numbers Asking for help, clarification, or responding to other answers. The source code for the different phase variants is in ./src/phases/. The first number we can try to be 6 and the second must be 682. phase_2 First, setup your bomb directory. Solve a total of 6 phases to defuse the bomb. which to blow yourself up. If nothing happens, download GitHub Desktop and try again. output of func4 should be 45, Based on this line in the compiler, we know that the final comparison needed should be 72. How about the next one? . phase_4 If so, put zero in %eax and return. The key part is the latter one. without any ill effects. The code is comparing the string (presumably our input) stored in %eax to a fixed string stored at 0x804980b. Once you have updated the configuration files, modify the Latex lab, writeup in ./writeup/bomblab.tex for your environment. our input has to be a string of 6 characters, the function accepts this 6 character string and loops over each character in it, the result of the loop is compared to a fixed string, and if theyre equal, the bomb doesnt explode. The bomb explodes if the number calculated by this function does not equal 49. A tag already exists with the provided branch name. . I'll paste the code here. daemon that starts and nannies the other programs in the service, checking their status every few seconds and restarting them if, (3) Stopping the Bomb Lab. phase_5 Now lets take a quick look at the disassebly to see what variables are being used. Otherwise, the bomb explodes by printing "BOOM!! If you notice, (the syntax will vary based off of what sort of system the bomb is run on) the machine code will have some variation of call to: 401135: be b8 25 40 00 mov $0x4025b8,%esi. Each phase expects you to type a particular string on stdin. But when I put 4 1 6 5 2 3 or 3 6 1 2 5 4, it explodes. Halfway there! The bomb has blown up. Good work! The smart way of solving this phase is by actually figuring out the cypher. aseje owo nla. Are you sure you want to create this branch? The numbers you enter are used to sort a linked list actually. I then continue to run the program until I am prompted for a phrase to input. GET /%s/submitr.pl/?userid=%s&lab=%s&result=%s&submit=submit HTTP/1.0 is "defused." a user account on this machine. phase 2, variant "a" for phase 3, variant "c" for phase 4, and so on. You can tell, makebomb.pl to use a specific variant by using the "-p" option. enjoy another stunning sunset 'over' a glass of assyrtiko, English version of Russian proverb "The hedgehogs got pricked, cried, but continued to eat the cactus". $ecx is the output of the loop, Values attached to letters based on testing: You have 6 phases with which to blow yourself up. Any numbers entered after the first 6 can be anything. You will only need, to modify or inspect a few variables in Section 1 of this file. You've defused the secret stage! On the bright side, at least now we know that our string should come out of the loop as giants. solution to each bomb is available to the instructor. We've made it very easy to run the service, but, some instructors may be uncomfortable with this requirement and will. There are six of them but some of these could be just added strings outputted upon completion of a stage. At each iteration, we check to see that the current value is double the previous value. Here is Phase 5. Can you still use Commanders Strike if the only attack available to forego is an attack against an ally? I found various strings of interest. The problem requires that the return value of the func4 should also be zero. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Lets create our breakpoints to make sure nothing gets set to the gradebook! Such bombs are called "notifying bombs. student whose email address is
