End aside with respect to and 53 program example to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e stack. Assemble this file with GCC and disassemble it with OBJDUMP. You should be able to get the exact byte sequence that you will type at the prompt. O BJDUMP will produce some pretty strange looking assembly instructions when it tries to disassemble the data in your file, but the hexadecimal byte sequence should be correct. Keep in mind that your attack is very machine and compiler specific. You may need to alter your string when running on a different machine or with a different version of GCC. 200 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 CHAPTER 3. MACHINE-LEVEL REPRESENTATION OF C PROGRAMS 00000000 <test>: 0: 55 1: 89 e5 3: 53 4: 8b 45 08 7: 8b 4d 0c a: 8d 04 80 d: 8d 44 81 04 11: 8b 10 13: c1 e2 02 16: 8b 99 b8 00 00 00 1c: 03 19 1e: 89 5c 02 04 22: 5b 23: 89 ec 25: 5d 26: c3 push mov push mov mov lea lea mov shl mov add mov pop mov pop ret %ebp %esp,%ebp %ebx 0x8(%ebp),%eax 0xc(%ebp),%ecx (%eax,%eax,4),%eax 0x4(%ecx,%eax,4),%eax (%eax),%edx $0x2,%edx 0xb8(%ecx),%ebx (%ecx),%ebx %ebx,0x4(%edx...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online