Link to home
Start Free TrialLog in
Avatar of txthrizzle
txthrizzle

asked on

bufbomb bang phase

Having trouble on this phase..
Answer: 68 60 8d 04 08 c7 05 dc a1 04 08 76 3b 79 13 c3 ec ba 98 bf
Getting SegFault.
Team tjames+cladd
Cookie: 0x13793b76

Dump of assembler code for function Gets:
0x08048de0 <Gets+0>:    push   %ebp
0x08048de1 <Gets+1>:    mov    %esp,%ebp
0x08048de3 <Gets+3>:    push   %edi
0x08048de4 <Gets+4>:    push   %esi
0x08048de5 <Gets+5>:    push   %ebx
0x08048de6 <Gets+6>:    sub    $0xc,%esp
0x08048de9 <Gets+9>:    movl   $0x0,0x804a1e0
0x08048df3 <Gets+19>:   mov    0x804a1c8,%eax
0x08048df8 <Gets+24>:   test   %eax,%eax
0x08048dfa <Gets+26>:   je     0x8048e8b <Gets+171>
0x08048e00 <Gets+32>:   mov    0x8(%ebp),%esi
0x08048e03 <Gets+35>:   mov    $0x1,%edi
0x08048e08 <Gets+40>:   movl   $0x0,-0x10(%ebp)
0x08048e0f <Gets+47>:   nop
0x08048e10 <Gets+48>:   sub    $0xc,%esp
0x08048e13 <Gets+51>:   mov    0x804a1c0,%eax
0x08048e18 <Gets+56>:   push   %eax
0x08048e19 <Gets+57>:   call   0x8048754 <_IO_getc@plt>
0x08048e1e <Gets+62>:   mov    %eax,%ebx
0x08048e20 <Gets+64>:   add    $0x10,%esp
0x08048e23 <Gets+67>:   cmp    $0xffffffff,%eax
0x08048e26 <Gets+70>:   je     0x8048ec0 <Gets+224>
---Type <return> to continue, or q <return> to quit---
0x08048e2c <Gets+76>:   cmp    $0xa,%eax
0x08048e2f <Gets+79>:   je     0x8048ec0 <Gets+224>
0x08048e35 <Gets+85>:   call   0x8048764 <__ctype_b_loc@plt>
0x08048e3a <Gets+90>:   mov    (%eax),%eax
0x08048e3c <Gets+92>:   testb  $0x10,0x1(%eax,%ebx,2)
0x08048e41 <Gets+97>:   je     0x8048e10 <Gets+48>
0x08048e43 <Gets+99>:   lea    -0x30(%ebx),%eax
0x08048e46 <Gets+102>:  cmp    $0x9,%eax
0x08048e49 <Gets+105>:  ja     0x8048e60 <Gets+128>
0x08048e4b <Gets+107>:  mov    %eax,%edx
0x08048e4d <Gets+109>:  test   %edi,%edi
0x08048e4f <Gets+111>:  je     0x8048e70 <Gets+144>
0x08048e51 <Gets+113>:  mov    %edx,-0x10(%ebp)
0x08048e54 <Gets+116>:  xor    %edi,%edi
0x08048e56 <Gets+118>:  jmp    0x8048e10 <Gets+48>
0x08048e58 <Gets+120>:  nop
0x08048e59 <Gets+121>:  lea    0x0(%esi,%eiz,1),%esi
0x08048e60 <Gets+128>:  lea    -0x41(%ebx),%eax
0x08048e63 <Gets+131>:  cmp    $0x5,%eax
0x08048e66 <Gets+134>:  ja     0x8048ee0 <Gets+256>
0x08048e68 <Gets+136>:  lea    -0x37(%ebx),%edx
0x08048e6b <Gets+139>:  test   %edi,%edi
0x08048e6d <Gets+141>:  jne    0x8048e51 <Gets+113>
---Type <return> to continue, or q <return> to quit---
0x08048e6f <Gets+143>:  nop
0x08048e70 <Gets+144>:  mov    -0x10(%ebp),%eax
0x08048e73 <Gets+147>:  shl    $0x4,%eax
0x08048e76 <Gets+150>:  lea    (%edx,%eax,1),%eax
0x08048e79 <Gets+153>:  mov    %al,(%esi)
0x08048e7b <Gets+155>:  inc    %esi
0x08048e7c <Gets+156>:  movsbl %al,%eax
0x08048e7f <Gets+159>:  call   0x8048940 <save_char>
0x08048e84 <Gets+164>:  mov    $0x1,%edi
0x08048e89 <Gets+169>:  jmp    0x8048e10 <Gets+48>
0x08048e8b <Gets+171>:  mov    0x8(%ebp),%esi
0x08048e8e <Gets+174>:  jmp    0x8048ea0 <Gets+192>
0x08048e90 <Gets+176>:  cmp    $0xa,%eax
0x08048e93 <Gets+179>:  je     0x8048ec0 <Gets+224>
0x08048e95 <Gets+181>:  mov    %al,(%esi)
0x08048e97 <Gets+183>:  inc    %esi
0x08048e98 <Gets+184>:  movsbl %al,%eax
0x08048e9b <Gets+187>:  call   0x8048940 <save_char>
0x08048ea0 <Gets+192>:  sub    $0xc,%esp
0x08048ea3 <Gets+195>:  mov    0x804a1c0,%eax
0x08048ea8 <Gets+200>:  push   %eax
0x08048ea9 <Gets+201>:  call   0x8048754 <_IO_getc@plt>
0x08048eae <Gets+206>:  add    $0x10,%esp
---Type <return> to continue, or q <return> to quit---
0x08048eb1 <Gets+209>:  cmp    $0xffffffff,%eax
0x08048eb4 <Gets+212>:  jne    0x8048e90 <Gets+176>
0x08048eb6 <Gets+214>:  lea    0x0(%esi),%esi
0x08048eb9 <Gets+217>:  lea    0x0(%edi,%eiz,1),%edi
0x08048ec0 <Gets+224>:  movb   $0x0,(%esi)
0x08048ec3 <Gets+227>:  mov    0x804a1e0,%eax
0x08048ec8 <Gets+232>:  movb   $0x0,0x804a200(%eax,%eax,2)
0x08048ed0 <Gets+240>:  mov    0x8(%ebp),%eax
0x08048ed3 <Gets+243>:  lea    -0xc(%ebp),%esp
0x08048ed6 <Gets+246>:  pop    %ebx
0x08048ed7 <Gets+247>:  pop    %esi
0x08048ed8 <Gets+248>:  pop    %edi
0x08048ed9 <Gets+249>:  pop    %ebp
0x08048eda <Gets+250>:  ret
0x08048edb <Gets+251>:  nop
0x08048edc <Gets+252>:  lea    0x0(%esi,%eiz,1),%esi
0x08048ee0 <Gets+256>:  lea    -0x57(%ebx),%edx
0x08048ee3 <Gets+259>:  jmp    0x8048e4d <Gets+109>
End of assembler dump.

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial