CSC231 Lab 2 2015
--D. Thiebaut (talk) 07:15, 21 September 2015 (EDT)
Reverse Engineering
Recreate the original assembly program whose hexdump is shown below. You should call your program lab2.asm.
In the process, answer the following questions:
- what is the name of the original assembly program?
- how many string variables does it contain?
- what are the names of the strings?
- what are the names of the constants?
- what is the original program's output?
00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 02 00 03 00 01 00 00 00 80 80 04 08 34 00 00 00 |............4...|
00000020 18 01 00 00 00 00 00 00 34 00 20 00 02 00 28 00 |........4. ...(.|
00000030 06 00 03 00 01 00 00 00 00 00 00 00 00 80 04 08 |................|
00000040 00 80 04 08 b8 00 00 00 b8 00 00 00 05 00 00 00 |................|
00000050 00 10 00 00 01 00 00 00 b8 00 00 00 b8 90 04 08 |................|
00000060 b8 90 04 08 36 00 00 00 36 00 00 00 06 00 00 00 |....6...6.......|
00000070 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080 b8 04 00 00 00 bb 01 00 00 00 ba 0c 00 00 00 b9 |................|
00000090 ce 90 04 08 cd 80 b8 04 00 00 00 bb 01 00 00 00 |................|
000000a0 ba 16 00 00 00 b9 b8 90 04 08 cd 80 b8 01 00 00 |................|
000000b0 00 bb 00 00 00 00 cd 80 69 74 20 73 69 6d 70 6c |........it simpl|
000000c0 65 2c 20 53 6d 69 74 68 69 65 73 21 0a 0a 4b 49 |e, Smithies!..KI|
000000d0 53 53 3a 20 4b 65 65 70 20 20 59 6f 75 20 67 6f |SS: Keep You go|
000000e0 74 20 69 74 21 0a 4e 6f 20 77 61 79 21 0a 00 2e |t it!.No way!...|
000000f0 73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e |symtab..strtab..|
00000100 73 68 73 74 72 74 61 62 00 2e 74 65 78 74 00 2e |shstrtab..text..|
00000110 64 61 74 61 00 00 00 00 00 00 00 00 00 00 00 00 |data............|
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 1b 00 00 00 01 00 00 00 06 00 00 00 80 80 04 08 |................|
00000150 80 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 |....8...........|
00000160 10 00 00 00 00 00 00 00 21 00 00 00 01 00 00 00 |........!.......|
00000170 03 00 00 00 b8 90 04 08 b8 00 00 00 36 00 00 00 |............6...|
00000180 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 |................|
00000190 11 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................|
000001a0 ee 00 00 00 27 00 00 00 00 00 00 00 00 00 00 00 |....'...........|
000001b0 01 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 |................|
000001c0 00 00 00 00 00 00 00 00 08 02 00 00 30 01 00 00 |............0...|
000001d0 05 00 00 00 0f 00 00 00 04 00 00 00 10 00 00 00 |................|
000001e0 09 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 38 03 00 00 6c 00 00 00 00 00 00 00 00 00 00 00 |8...l...........|
00000200 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000210 00 00 00 00 00 00 00 00 00 00 00 00 80 80 04 08 |................|
00000220 00 00 00 00 03 00 01 00 00 00 00 00 b8 90 04 08 |................|
00000230 00 00 00 00 03 00 02 00 01 00 00 00 00 00 00 00 |................|
00000240 00 00 00 00 04 00 f1 ff 15 00 00 00 01 00 00 00 |................|
00000250 00 00 00 00 00 00 f1 ff 1a 00 00 00 04 00 00 00 |................|
00000260 00 00 00 00 00 00 f1 ff 20 00 00 00 01 00 00 00 |........ .......|
00000270 00 00 00 00 00 00 f1 ff 27 00 00 00 b8 90 04 08 |........'.......|
00000280 00 00 00 00 00 00 02 00 2c 00 00 00 16 00 00 00 |........,.......|
00000290 00 00 00 00 00 00 f1 ff 32 00 00 00 ce 90 04 08 |........2.......|
000002a0 00 00 00 00 00 00 02 00 37 00 00 00 0c 00 00 00 |........7.......|
000002b0 00 00 00 00 00 00 f1 ff 3d 00 00 00 da 90 04 08 |........=.......|
000002c0 00 00 00 00 00 00 02 00 42 00 00 00 0c 00 00 00 |........B.......|
000002d0 00 00 00 00 00 00 f1 ff 48 00 00 00 e6 90 04 08 |........H.......|
000002e0 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 |................|
000002f0 00 00 00 00 04 00 f1 ff 4d 00 00 00 80 80 04 08 |........M.......|
00000300 00 00 00 00 10 00 01 00 54 00 00 00 ee 90 04 08 |........T.......|
00000310 00 00 00 00 10 00 02 00 60 00 00 00 ee 90 04 08 |........`.......|
00000320 00 00 00 00 10 00 02 00 67 00 00 00 f0 90 04 08 |........g.......|
00000330 00 00 00 00 10 00 02 00 00 72 65 76 65 72 73 65 |.........reverse|
00000340 45 6e 67 69 6e 65 65 72 2e 61 73 6d 00 45 58 49 |Engineer.asm.EXI|
00000350 54 00 57 52 49 54 45 00 53 54 44 4f 55 54 00 6d |T.WRITE.STDOUT.m|
00000360 73 67 31 00 4d 53 47 31 4c 00 6d 73 67 32 00 4d |sg1.MSG1L.msg2.M|
00000370 53 47 32 4c 00 6d 73 67 33 00 4d 53 47 33 4c 00 |SG2L.msg3.MSG3L.|
00000380 6d 73 67 34 00 5f 73 74 61 72 74 00 5f 5f 62 73 |msg4._start.__bs|
00000390 73 5f 73 74 61 72 74 00 5f 65 64 61 74 61 00 5f |s_start._edata._|
000003a0 65 6e 64 00 |end.|
000003a4