Question

binary bomb

Asked by: 2xexit

i can't slove it .. i  have to slove it tomorrow...help me..

08048b6a <phase_2>:
 8048b6a:       55                      push   %ebp
 8048b6b:       89 e5                   mov    %esp,%ebp
 8048b6d:       53                      push   %ebx
 8048b6e:       83 ec 34                sub    $0x34,%esp
 8048b71:       8d 45 d8                lea    0xffffffd8(%ebp),%eax
 8048b74:       89 44 24 04             mov    %eax,0x4(%esp,1)
 8048b78:       8b 45 08                mov    0x8(%ebp),%eax
 8048b7b:       89 04 24                mov    %eax,(%esp,1)
 8048b7e:       e8 89 03 00 00          call   8048f0c <read_six_numbers>
 8048b83:       bb 01 00 00 00          mov    $0x1,%ebx
 8048b88:       8b 44 9d d4             mov    0xffffffd4(%ebp,%ebx,4),%eax
 8048b8c:       83 c0 05                add    $0x5,%eax
 8048b8f:       39 44 9d d8             cmp    %eax,0xffffffd8(%ebp,%ebx,4)
 8048b93:       74 05                   je     8048b9a <phase_2+0x30>
 8048b95:       e8 16 09 00 00          call   80494b0 <explode_bomb>
 8048b9a:       43                      inc    %ebx
 8048b9b:       83 fb 05                cmp    $0x5,%ebx
 8048b9e:       7e e8                   jle    8048b88 <phase_2+0x1e>
 8048ba0:       83 c4 34                add    $0x34,%esp
 8048ba3:       5b                      pop    %ebx
 8048ba4:       5d                      pop    %ebp
 8048ba5:       c3                      ret
 
 
08048f0c <read_six_numbers>:
 8048f0c:       55                      push   %ebp
 8048f0d:       89 e5                   mov    %esp,%ebp
 8048f0f:       83 ec 28                sub    $0x28,%esp
 8048f12:       8b 55 0c                mov    0xc(%ebp),%edx
 8048f15:       8d 42 14                lea    0x14(%edx),%eax
 8048f18:       89 44 24 1c             mov    %eax,0x1c(%esp,1)
 8048f1c:       8d 42 10                lea    0x10(%edx),%eax
 8048f1f:       89 44 24 18             mov    %eax,0x18(%esp,1)
 8048f23:       8d 42 0c                lea    0xc(%edx),%eax
 8048f26:       89 44 24 14             mov    %eax,0x14(%esp,1)
 8048f2a:       8d 42 08                lea    0x8(%edx),%eax
 8048f2d:       89 44 24 10             mov    %eax,0x10(%esp,1)
 8048f31:       8d 42 04                lea    0x4(%edx),%eax
 8048f34:       89 44 24 0c             mov    %eax,0xc(%esp,1)
 8048f38:       89 54 24 08             mov    %edx,0x8(%esp,1)
 8048f3c:       c7 44 24 04 98 98 04    movl   $0x8049898,0x4(%esp,1)
 8048f43:       08
 8048f44:       8b 45 08                mov    0x8(%ebp),%eax
 8048f47:       89 04 24                mov    %eax,(%esp,1)
 8048f4a:       e8 4d f9 ff ff          call   804889c <_init+0x178>
 8048f4f:       83 f8 05                cmp    $0x5,%eax
 8048f52:       7f 05                   jg     8048f59 <read_six_numbers+0x4d>
 8048f54:       e8 57 05 00 00          call   80494b0 <explode_bomb>
 8048f59:       89 ec                   mov    %ebp,%esp
 8048f5b:       5d                      pop    %ebp
 8048f5c:       c3                      ret

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:

Select allOpen in new window

This question is in progress. Our experts are working on an answer right now.
Sign up for immediate access to the solution once it becomes available.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-05-09 at 00:50:56ID24394472
Tags

phase_2

Topics

Assembly Programming Language

,

Unix Systems Programming

Participating Experts
2
Points
50
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Winsock & Multithreading
    I need to be able to download page using the winsock control from many place at the time, then analyse what is written on them then download another one. That mean I must use multithreading. How can I do so ? April 9th, 22:00 US Est I would need to know how I could create a ...
  2. converting from com to com+
    We have a com object that is called in ASP pages, Access and VB Programs. We decided to move over to COM+ in order to be able to be able to benefit from COM+ transactions. Since I converted the dll I've been running into problems like not being able to say myRecordset.close a...
  3. Paging Agent Mulder
    Hello special agent Mulder, can you hear me? Where have you been?
  4. store objects of a single class in an array and then write th…
    I want to store all of these "customer" objects in an array (an array of pointers to the objects seems the wise choice to me). Then, once all are stored and the user selects exit, my console program writes them all out at once. Idea is that the ofstream should onl...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: Infinity08Posted on 2009-05-09 at 01:04:15ID: 24342790

Ok, so how far did you get with this ? Where are you stuck ?
Did you figure out what the code does ?

 

by: 2xexitPosted on 2009-05-09 at 01:38:04ID: 24342862

first, i don't know where to break point... and where to check...oTL

 

by: Infinity08Posted on 2009-05-09 at 02:05:35ID: 24342926

>> first, i don't know where to break point...

You set a break point wherever you want to watch/monitor something.
Setting it at the start of the phase_2 function could be a good idea ...

 

by: 2xexitPosted on 2009-05-10 at 21:14:12ID: 24351437

I can't express my mind to english, because i'm not the american...
...
i did break point to phase_2  end checked register %ebp value...

i saw %ebp value is 0xbffff5d8..

at this time , i checked this line.
8048b8f:       39 44 9d d8             cmp    %eax,0xffffffd8(%ebp,%ebx,4)

this line is 0xffffffd8 + 0xbffff5d8 + 0x1 * 4 ?
= 0xffffffd8 + 0xbffff5dc
= 0x400009fc
if it;s right, first number of six number is 0x400009fc

is that right??

next number is 0x40000a00 ???

if it is wrong , how can check these value??

can i have some hint?

i hope for you to understand my question..because i can't engilsh write ``

 

by: Infinity08Posted on 2009-05-10 at 22:30:03ID: 24351659

>> i did break point to phase_2  end checked register %ebp value...

ebp is the base pointer. It points to the start of the current stack frame. A stack frame is set up at the start of each function call, and contains all local variables etc. for that function.

For example in phase_2, the stack frame is set up by these two lines :

>>  8048b6a:       55                      push   %ebp
>>  8048b6b:       89 e5                   mov    %esp,%ebp

ie. first the previous base pointer is saved onto the stack, so it can be restored later. Then, the new base pointer is set as a copy of the stack pointer.

At the end of the function, the stack frame is destroyed again :

>>  8048f5b:       5d                      pop    %ebp
>>  8048f5c:       c3                      ret

ie. the previous base pointer is restored, and then the code jumps to the return address (the next instruction in the calling code).


>> i saw %ebp value is 0xbffff5d8..

The actual value of ebp doesn't really matter. As long as you see ebp as the reference address for the current function's stack frame, you're ok.


>> this line is 0xffffffd8 + 0xbffff5d8 + 0x1 * 4 ?
>> = 0xffffffd8 + 0xbffff5dc
>> = 0x400009fc

The calculation looks wrong. It's easier to look at the value 0xffffffd8 as a negative value ... Read up on two's complement if you need to :

        http://en.wikipedia.org/wiki/Two%27s_complement

Plus, as I just explained, don't use the actual value for ebp. Simply perform all calculations relative to ebp.

 

by: demi-osPosted on 2009-05-13 at 13:46:44ID: 24379486

probably you dont need an answer anymore, but well your code looks the same with the one here:
http://www.experts-exchange.com/Programming/Languages/Assembly/Q_24355820.html

 

by: 2xexitPosted on 2009-05-14 at 21:22:19ID: 24392289

08048cb3 <phase_5>:
 8048cb3:       55                      push   %ebp
 8048cb4:       89 e5                   mov    %esp,%ebp
 8048cb6:       53                      push   %ebx
 8048cb7:       83 ec 24                sub    $0x24,%esp
 8048cba:       8d 45 f8                lea    0xfffffff8(%ebp),%eax
 8048cbd:       89 44 24 0c             mov    %eax,0xc(%esp,1)
 8048cc1:       8d 45 f4                lea    0xfffffff4(%ebp),%eax
 8048cc4:       89 44 24 08             mov    %eax,0x8(%esp,1)
 8048cc8:       c7 44 24 04 a4 98 04    movl   $0x80498a4,0x4(%esp,1)
 8048ccf:       08
 8048cd0:       8b 45 08                mov    0x8(%ebp),%eax
 8048cd3:       89 04 24                mov    %eax,(%esp,1)
 8048cd6:       e8 c1 fb ff ff          call   804889c <_init+0x178>
 8048cdb:       83 f8 01                cmp    $0x1,%eax
 8048cde:       7f 05                   jg     8048ce5 <phase_5+0x32>
 8048ce0:       e8 cb 07 00 00          call   80494b0 <explode_bomb>
 8048ce5:       8b 45 f4                mov    0xfffffff4(%ebp),%eax
 8048ce8:       83 e0 0f                and    $0xf,%eax
 8048ceb:       89 45 f4                mov    %eax,0xfffffff4(%ebp)
 8048cee:       ba 00 00 00 00          mov    $0x0,%edx
 8048cf3:       b9 00 00 00 00          mov    $0x0,%ecx
 8048cf8:       83 f8 0f                cmp    $0xf,%eax
 8048cfb:       74 13                   je     8048d10 <phase_5+0x5d>
 8048cfd:       bb 40 a4 04 08          mov    $0x804a440,%ebx
 8048d02:       42                      inc    %edx
 8048d03:       8b 04 83                mov    (%ebx,%eax,4),%eax
 8048d06:       01 c1                   add    %eax,%ecx
 8048d08:       83 f8 0f                cmp    $0xf,%eax
 8048d0b:       75 f5                   jne    8048d02 <phase_5+0x4f>
 8048d0d:       89 45 f4                mov    %eax,0xfffffff4(%ebp)
 8048d10:       83 fa 09                cmp    $0x9,%edx
 8048d13:       75 05                   jne    8048d1a <phase_5+0x67>
 8048d15:       3b 4d f8                cmp    0xfffffff8(%ebp),%ecx
 8048d18:       74 05                   je     8048d1f <phase_5+0x6c>
 8048d1a:       e8 91 07 00 00          call   80494b0 <explode_bomb>
 8048d1f:       83 c4 24                add    $0x24,%esp
 8048d22:       5b                      pop    %ebx
 8048d23:       5d                      pop    %ebp
 8048d24:       c3                      ret

 

by: 2xexitPosted on 2009-05-14 at 21:28:10ID: 24392321

i sloved that phase_4,. and stuck in phase_5
this source mean array and pointer?
i geuss that second parameter is same the register %ecx. isn't right?
 and    $0xf,%eax << it's mean .. if %eax is 3, 1111 & 0011 = 0011 ???
also,
mov    $0x0,%edx
cmp    $0x9,%edx
roof is 9 ?
how can i check first parameter??

 

by: Infinity08Posted on 2009-05-14 at 23:14:05ID: 24392670

The original question was about phase 2. Did you find the solution for phase 2 ? If so, it's probably time to close this question. If you have another question, you can create a new question for that.

 

by: 2xexitPosted on 2009-05-15 at 02:34:03ID: 24393577

wow i slove phase_5 ,, i have to phase_6 .. time limit is 1hour.....

Dump of assembler code for function phase_6:
0x08048d75 <phase_6+0>: push   %ebp
0x08048d76 <phase_6+1>: mov    %esp,%ebp
0x08048d78 <phase_6+3>: sub    $0x18,%esp
0x08048d7b <phase_6+6>: movl   $0x0,0xc(%esp,1)
0x08048d83 <phase_6+14>:        movl   $0xa,0x8(%esp,1)
0x08048d8b <phase_6+22>:        movl   $0x0,0x4(%esp,1)
0x08048d93 <phase_6+30>:        mov    0x8(%ebp),%eax
0x08048d96 <phase_6+33>:        mov    %eax,(%esp,1)
0x08048d99 <phase_6+36>:        call   0x804880c <__strtol_internal>
0x08048d9e <phase_6+41>:        mov    %eax,0x804a4ec
0x08048da3 <phase_6+46>:        movl   $0x804a4ec,(%esp,1)
0x08048daa <phase_6+53>:        call   0x8048d25 <fun6>
0x08048daf <phase_6+58>:        mov    $0x1,%edx
0x08048db4 <phase_6+63>:        mov    0x8(%eax),%eax
0x08048db7 <phase_6+66>:        inc    %edx
0x08048db8 <phase_6+67>:        cmp    $0x5,%edx
0x08048dbb <phase_6+70>:        jle    0x8048db4 <phase_6+63>
0x08048dbd <phase_6+72>:        mov    (%eax),%eax
0x08048dbf <phase_6+74>:        cmp    0x804a4ec,%eax
0x08048dc5 <phase_6+80>:        je     0x8048dcc <phase_6+87>
0x08048dc7 <phase_6+82>:        call   0x80494b0 <explode_bomb>
0x08048dcc <phase_6+87>:        leave
0x08048dcd <phase_6+88>:        ret
End of assembler dump.

 

by: Infinity08Posted on 2009-05-15 at 06:33:15ID: 24395283

You seem to progress fine on your own :)

 

by: 2xexitPosted on 2009-05-16 at 03:33:50ID: 24402006

i pass the bomb .. all zz thank you f

 

by: Infinity08Posted on 2009-05-16 at 03:46:31ID: 24402033

Great :)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...