comp.lang.ada
 help / color / mirror / Atom feed
* Reverse engineering Ada's compiled code
@ 2013-03-15 13:14 Dufr
  2013-03-15 15:35 ` Gautier write-only
  2013-03-15 15:47 ` tmoran
  0 siblings, 2 replies; 4+ messages in thread
From: Dufr @ 2013-03-15 13:14 UTC (permalink / raw)


I have quite an unusual question to ask: how difficult would it be to reverse engineer Ada's compiled code?
I am sure this question must have come up several times in some circles, given that many Ada projects pertain to very sensitive fields such as military applications, and the possibility that a piece of equipment falls in the wrong hands is always there.

As a side question: are there any particular measures that one can take to make it harder for someone to reverse engineer Ada's compiled code?

Thanks




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reverse engineering Ada's compiled code
  2013-03-15 13:14 Reverse engineering Ada's compiled code Dufr
@ 2013-03-15 15:35 ` Gautier write-only
  2013-03-15 15:47 ` tmoran
  1 sibling, 0 replies; 4+ messages in thread
From: Gautier write-only @ 2013-03-15 15:35 UTC (permalink / raw)


On 15 mar, 14:14, Dufr <duf...@gmail.com> wrote:

> As a side question: are there any particular measures that one can take to make it harder for someone to reverse engineer Ada's compiled code?

Hi!
Probably the easiest step is to switch code optimization on, and debug
symbols off.
With GNAT, with -O2 you are certainly on the safe side.
If you switch on cross-unit inlining (-gnatn) and perhaps also set
loop unrolling, peeling, and unswitching (-funroll-loops -fpeel-loops -
funswitch-loops), it should make reverse engineering very hard.

In case you need debug symbols, there is an Ada identifier obfuscator
IIRC.
_________________________
Gautier's Ada programming
http://sf.net/users/gdemont/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reverse engineering Ada's compiled code
  2013-03-15 13:14 Reverse engineering Ada's compiled code Dufr
  2013-03-15 15:35 ` Gautier write-only
@ 2013-03-15 15:47 ` tmoran
  2013-03-16  1:28   ` wilson
  1 sibling, 1 reply; 4+ messages in thread
From: tmoran @ 2013-03-15 15:47 UTC (permalink / raw)


>I have quite an unusual question to ask:  how difficult would it be to
>reverse engineer Ada's compiled code?  I am sure this question must have
  J.S. Donnelly, "A Decompiler for the Countess Computer," Navy
Electronics Laboratory Technical Memorandum 427, Sept. 1960
  It decompiled to Neliac, an Algol 58 derived language, and was intended
to take lots of the machine coded programs of the time and turn them into
Neliac, which could then be understood, modified, and compiled to other
targets.  Decompilation is a pattern recognition problem and its
difficulty depends on how complex and varied are the patterns to be
recognized.  If you just have a modest amount of machine code, manual
decompilation would be easier.
  Assisting on that project as a work-study student was my introduction to
programming.  A very good introduction to both the high-level and the
machine level language.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reverse engineering Ada's compiled code
  2013-03-15 15:47 ` tmoran
@ 2013-03-16  1:28   ` wilson
  0 siblings, 0 replies; 4+ messages in thread
From: wilson @ 2013-03-16  1:28 UTC (permalink / raw)


On Fri, 15 Mar 2013 11:47:46 -0400, <tmoran@acm.org> wrote:

>> I have quite an unusual question to ask:  how difficult would it be to
>> reverse engineer Ada's compiled code?  I am sure this question must have
>   J.S. Donnelly, "A Decompiler for the Countess Computer," Navy
> Electronics Laboratory Technical Memorandum 427, Sept. 1960
>   It decompiled to Neliac, an Algol 58 derived language, and was intended
> to take lots of the machine coded programs of the time and turn them into
> Neliac, which could then be understood, modified, and compiled to other
> targets.  Decompilation is a pattern recognition problem and its
> difficulty depends on how complex and varied are the patterns to be
> recognized.  If you just have a modest amount of machine code, manual
> decompilation would be easier.
>   Assisting on that project as a work-study student was my introduction  
> to
> programming.  A very good introduction to both the high-level and the
> machine level language.


Long ago as a graduate assistant, I wrote a program to translate !BM 7074  
programs from machine language to assembler language.  This is perhaps a  
third  of the way to what you are asking.  It was a fairly easy program to  
write, so I assume that going the rest of the way to a higher level  
language would not be too difficult.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-16  1:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 13:14 Reverse engineering Ada's compiled code Dufr
2013-03-15 15:35 ` Gautier write-only
2013-03-15 15:47 ` tmoran
2013-03-16  1:28   ` wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox