Thread: binary bomb

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    18

    binary bomb

    i'm working on the binary bomb assignment, i've defused phase_1 bomb , but not phase_2.

    Please help me on doing so

    this following is the disassmbled code using objdump

    Code:
    08048b80 <phase_2>:
     8048b80:       55                      push   %ebp
     8048b81:       89 e5                   mov    %esp,%ebp
     8048b83:       56                      push   %esi
     8048b84:       53                      push   %ebx
     8048b85:       83 ec 30                sub    $0x30,%esp
     8048b88:       be 00 00 00 00          mov    $0x0,%esi
     8048b8d:       8d 45 d8                lea    0xffffffd8(%ebp),%eax
     8048b90:       89 44 24 04             mov    %eax,0x4(%esp)
     8048b94:       8b 45 08                mov    0x8(%ebp),%eax
     8048b97:       89 04 24                mov    %eax,(%esp)
     8048b9a:       e8 d5 03 00 00          call   8048f74 <read_six_numbers>
     8048b9f:       bb 00 00 00 00          mov    $0x0,%ebx
     8048ba4:       8b 44 9d d8             mov    0xffffffd8(%ebp,%ebx,4),%eax
     8048ba8:       3b 44 9d e4             cmp    0xffffffe4(%ebp,%ebx,4),%eax
     8048bac:       74 05                   je     8048bb3 <phase_2+0x33>
     8048bae:       e8 f2 07 00 00          call   80493a5 <explode_bomb>
     8048bb3:       03 74 9d d8             add    0xffffffd8(%ebp,%ebx,4),%esi
     8048bb7:       43                      inc    %ebx
     8048bb8:       83 fb 02                cmp    $0x2,%ebx
     8048bbb:       7e e7                   jle    8048ba4 <phase_2+0x24>
     8048bbd:       85 f6                   test   %esi,%esi
     8048bbf:       75 05                   jne    8048bc6 <phase_2+0x46>
     8048bc1:       e8 df 07 00 00          call   80493a5 <explode_bomb>
     8048bc6:       83 c4 30                add    $0x30,%esp
     8048bc9:       5b                      pop    %ebx
     8048bca:       5e                      pop    %esi
     8048bcb:       5d                      pop    %ebp
     8048bcc:       c3                      ret
    and the following using gdb

    Code:
    08048b80 <phase_2>:
     8048b80:       55                      push   %ebp
     8048b81:       89 e5                   mov    %esp,%ebp
     8048b83:       56                      push   %esi
     8048b84:       53                      push   %ebx
     8048b85:       83 ec 30                sub    $0x30,%esp
     8048b88:       be 00 00 00 00          mov    $0x0,%esi
     8048b8d:       8d 45 d8                lea    0xffffffd8(%ebp),%eax
     8048b90:       89 44 24 04             mov    %eax,0x4(%esp)
     8048b94:       8b 45 08                mov    0x8(%ebp),%eax
     8048b97:       89 04 24                mov    %eax,(%esp)
     8048b9a:       e8 d5 03 00 00          call   8048f74 <read_six_numbers>
     8048b9f:       bb 00 00 00 00          mov    $0x0,%ebx
     8048ba4:       8b 44 9d d8             mov    0xffffffd8(%ebp,%ebx,4),%eax
     8048ba8:       3b 44 9d e4             cmp    0xffffffe4(%ebp,%ebx,4),%eax
     8048bac:       74 05                   je     8048bb3 <phase_2+0x33>
     8048bae:       e8 f2 07 00 00          call   80493a5 <explode_bomb>
     8048bb3:       03 74 9d d8             add    0xffffffd8(%ebp,%ebx,4),%esi
     8048bb7:       43                      inc    %ebx
     8048bb8:       83 fb 02                cmp    $0x2,%ebx
     8048bbb:       7e e7                   jle    8048ba4 <phase_2+0x24>
     8048bbd:       85 f6                   test   %esi,%esi
     8048bbf:       75 05                   jne    8048bc6 <phase_2+0x46>
     8048bc1:       e8 df 07 00 00          call   80493a5 <explode_bomb>
     8048bc6:       83 c4 30                add    $0x30,%esp
     8048bc9:       5b                      pop    %ebx
     8048bca:       5e                      pop    %esi
     8048bcb:       5d                      pop    %ebp
     8048bcc:       c3                      ret
    Last edited by Dave_Sinkula; 09-24-2006 at 02:53 PM. Reason: Added [code][/code] tags -- learn to use them yourself.

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Hey, it's exactly the same. Maybe you should provide more details.

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    151
    What the OP is talking about: http://www.cs.rochester.edu/~scott/2...ments/A2.shtml

    As this appears to have more to do with assembly-level debugging than C, I /r/ a move to Tech Board.
    System: Debian Sid and FreeBSD 7.0. Both with GCC 4.3.

    Useful resources:
    comp.lang.c FAQ | C++ FQA Lite

  4. #4
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Doesn't this violate the homework policy?
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  5. #5
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    Why don't you just replace all calls to explode_bomb with a call to the defuse function?

  6. #6
    Registered User
    Join Date
    Oct 2004
    Posts
    151
    Quote Originally Posted by valis
    Why don't you just replace all calls to explode_bomb with a call to the defuse function?
    Read the link I posted. You're supposed to defuse the bomb by inputting passwords.

    I can't quite make up mind about this assignment though, because you could construe it as cracker-training. It's certainly walking the thin line of blasphemy. I'll leave it to the Mods to decide the legitimacy, though.
    Last edited by zx-1; 09-24-2006 at 05:15 PM.
    System: Debian Sid and FreeBSD 7.0. Both with GCC 4.3.

    Useful resources:
    comp.lang.c FAQ | C++ FQA Lite

  7. #7
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    I don't see how this could be considered any more cracker training than learning VBScript. Especially if a university is teaching the class. But yeah this definately would constitute a homework assignment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. binary bomb help
    By uscuba2 in forum Tech Board
    Replies: 8
    Last Post: 05-22-2009, 10:04 PM
  2. The destructive power of a nuclear bomb
    By InvariantLoop in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 03-24-2005, 02:46 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM