Re: Analyze and Edit a Binary File

Sean DuBois <[email protected]>
Newsgroups gmane.os.freebsd.chat
Message-ID <[email protected]>
Oh also another idea.

Try saving the same file in multiple versions of the
program, and then diffing them.

Another good trick would be to use LD_PRELOAD, and throw some debugging
in places like strcmp etc..
And in the same vein as LD_PRELOAD try using strace

I imagine Catia has all symbols stripped, so it will be sort of hard
to analyze/debug. BUT you might get lucky, so worth checking :)

On Tue, Feb 17, 2015 at 03:00:26PM +1100, Greg 'groggy' Lehey wrote:
> On Monday, 16 February 2015 at 18:37:08 -0800, Jason C. Wells wrote:
> >
> > I use some engineering software called Catia. The files produced by
> > Catia encode a software version number. If the version number is
> > greater than the version of the installed software, Catia refuses to
> > open the file. This is annoying in the extreme. Especially if you want
> > to share files in the spirit of open source. If the files that I create
> > are newer than the Catia version of my audience, then my audience can't
> > use my files.
> >
> > My question to my more knowledgeable computer geek friends: How do I
> > analyze and edit an arbitrary binary file?
>
> Those are two different questions, of course.  You know the version
> number; if it's relatively complicated (2.2.7.1, for example), it may
> be stored as character text.  In that case, there will be relatively
> few false positives if you search for the text.  If it's simple (2,
> for example), you'd need to run the software in a debugger and find
> where it does the comparison.  That's much more difficult.
>
> As for editing: Emacs, of course :-)
>
> Seriously, it does work.  I've used it on occasion, and at least one
> package I've seen asks you to edit binary files with Emacs as part of
> the build process.  Just make very sure not to change the length of
> the file.
>
> Greg
> --
> Sent from my desktop computer.
> Finger [email protected] for PGP public key.
> See complete headers for address and phone numbers.
> This message is digitally signed.  If your Microsoft MUA reports
> problems, please read http://tinyurl.com/broken-mua


_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-chat
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.