Re: [DynInst_API:] Cross-Platform Binary Analysis


Date: Mon, 30 Sep 2013 10:14:07 -0500
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] Cross-Platform Binary Analysis
On 09/30/2013 07:55 AM, Stefan Stattelmann wrote:
Hi Bill,

compiling with $PLATFORM set to ppc32_linux did the trick.

Another issue I ran into was that bare-metal PowerPC code does not seem
to work. As far as I could reconstruct the problem, loading the ELF data
section produces an error somewhere in Object-elf.C.
No problem with PowerPC Linux binaries though.

Glad to hear it. What are you defining as bare-metal PowerPC code? File full of assembled instructions, no headers etc?

I've puttered around in the past with a mmapped CodeSource implementation for ParseAPI that would bypass symtab/symlite and just treat a file/chunk of memory as a code source; it's pretty trivial but I've never polished it up for public use. If you're looking for bare-metal analysis, that's the route I'd take...I can try to dig up some of my old code if you need pointers/a skeleton.

Thanks for your help.

Stefan



From: Bill Williams <bill@xxxxxxxxxxx>
To: dyninst-api@xxxxxxxxxxx,
Date: 24.09.2013 17:28
Subject: Re: [DynInst_API:] Cross-Platform Binary Analysis
Sent by: "Dyninst-api" <dyninst-api-bounces@xxxxxxxxxxx>
------------------------------------------------------------------------



On 09/24/2013 07:34 AM, Stefan Stattelmann wrote:
 > Hi,
 >
 > I would like to use Dyninst for cross-platform binary analysis, e.g.,
 > analyzing PowerPC code on a x86 machine. Is this currently supported and
 > if so, how? From my experiments so far it seems like binaries for a
 > different CPU architectures are not recognized automatically and thus
 > cannot be decoded.
 >
 > Thanks and best regards,
 > Stefan
 >
Stefan--

The support for this is limited, but if you're looking for binary
analysis and not instrumentation, it shouldn't be too hard to get it
working. I believe, as a first approximation, that if you build the
analysis components (symtab, instructionapi, parseapi, dataflowapi) with
your $PLATFORM set to your target architecture, that should give you
components that can analyze cross-architecture binaries (but not native
ones). (Note: it is likely that there will be some kinks to work out
there; if/when you run into trouble, please let us know.)

Improving this support has long been on our TODO list; the right thing
is to get rid of any lingering per-architecture conditional compilation
and properly abstract the platform-specific bits into classes (with
machinery to auto-detect, as you note). This could happen for 9.0 but
almost certainly not for 8.2.

 >
 > _______________________________________________
 > Dyninst-api mailing list
 > Dyninst-api@xxxxxxxxxxx
 > https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
 >


--
--bw

Bill Williams
Paradyn Project
bill@xxxxxxxxxxx
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api



_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api



--
--bw

Bill Williams
Paradyn Project
bill@xxxxxxxxxxx
[← Prev in Thread] Current Thread [Next in Thread→]