You are not logged in.

#1 2009-01-18 18:12:36

diddi
Member
Registered: 2008-12-21
Posts: 18

Binary seg.faults and gives strange errors

Hi!

I've got a binary which I can't execute...
All it does is segfaulting. When I try gdb it gives me

BFD: /tmp/binary: invalid string offset 48 >= 0 for section `.shstrtab'
BFD: /tmp/binary: invalid string offset 2 >= 0 for section `'
BFD: /tmp/binary: invalid string offset 48 >= 0 for section `.shstrtab'
BFD: /tmp/binary: invalid string offset 2 >= 0 for section `'
BFD: /tmp/binary: invalid string offset 48 >= 0 for section `.shstrtab'
BFD: /tmp/binary: invalid string offset 2 >= 0 for section `'
BFD: /tmp/binary: no group info for section 
<stripped....>
BFD: /tmp/binary: sh_link [1] in section `' is incorrect
"/tmp/binary": not in executable format: File format not recognized

Alright, so I gave it a try with "file"

/tmp/binary: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

(ldd says it's statically linked, which would make more sense..)
readelf recognizes the binary as an ELF32 too... objdump says "File format not recognized"...

I can't understand what's going on, anyone got a hint?

Edit:
Might be interesting to know: The binary was compiled on another computer, and I don't have the source

Last edited by diddi (2009-01-18 18:21:16)

Offline

#2 2009-01-18 18:21:19

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: Binary seg.faults and gives strange errors

What did you try to execute?
Is it a software you built with makepkg?

@+

Offline

#3 2009-01-18 21:22:07

diddi
Member
Registered: 2008-12-21
Posts: 18

Re: Binary seg.faults and gives strange errors

all I know is that it's a binary for linux/x86.. don't know what it does or anything... really : )
It's a wargame binary (however, I do know that it should be possible to debug and even execute w/o seg.fault), and I'm supposed to try and find out what it does

Last edited by diddi (2009-01-18 21:22:41)

Offline

#4 2009-01-18 23:06:16

josomebody
Member
Registered: 2008-06-20
Posts: 190

Re: Binary seg.faults and gives strange errors

Know any assembly? You could try a disassembler and trace through that code til you get some ideas, and maybe patch the binary to fix what looks to me like (may be wrong here, it's been a while since I've done anything like this) a corrupted string table?

Might even look at the strings in a hex dump and see if anything looks funny. I'd probably do that first before I went to all the work of wading through the assembly dump.


: () { : | :& } ;:

Offline

#5 2009-01-18 23:29:50

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: Binary seg.faults and gives strange errors

diddi wrote:

all I know is that it's a binary for linux/x86.. don't know what it does or anything... really : )
It's a wargame binary (however, I do know that it should be possible to debug and even execute w/o seg.fault), and I'm supposed to try and find out what it does

Hum,
You try to execute a binary on your system and you don't know what it is and where it's from... neutral
This is not really safe.

Maybe you should ask more details to whom gives you this binary.

@+

Offline

#6 2009-01-19 01:24:36

diddi
Member
Registered: 2008-12-21
Posts: 18

Re: Binary seg.faults and gives strange errors

well, i kinda know the author of it so tongue

It's actually a company (run by a guy I know),who have made this binary as a wargame... the deal is to find a bug and then exploit it.
So i'm not really afraid of running it.
I have no hope to actually solve it, just checking out how far I would make it : )

Disassemble it doesn't work, as every program I try all says that the file format is not recognized...
Another friend of mine actually got this binary to execute, and has spotted the bugs... but for some reason it doesn't work for me : O
(and I can't reach him atm)

Offline

Board footer

Powered by FluxBB