Solved

How to Remove/Strip Debug Info of a compiled exe? (Delphi)

Posted on 2008-06-09
10
689 Views
Last Modified: 2010-04-05
Hi all,

How to Remove/Strip Debug Info of an exe in Delphi?

NOTE that I know how to remove the debug info of my project, what I want to do is to be able to remove/strip debug info of any compiled exe.

here a program that do exactly what I want: Pe Explorer (http://www.heaventools.com/remove-debug-information.htm)

500 points for this one,

thanx in advance
0
Comment
Question by:Marc582
  • 4
  • 3
10 Comments
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 21748636
Buy PE explorer
0
 

Author Comment

by:Marc582
ID: 21748648
thx but I already have it, maybe you should guess that if I post under Delphi section, that means I want the code to do that.

anyway, thx for the try
0
 

Author Comment

by:Marc582
ID: 21799935
anyone plz?
0
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 21863347
get the source code from
http://www.heaventools.com

if it's too expensive there is an other way ...
apply for a programming job there.
copy the code
quit
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Marc582
ID: 21863361
I don't think there is need for stupid answer @ experts-exchange.com.

It's a serious site...
0
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 21865319
seriously ?
answer = impossible
unless you recompile without debug info

>>what I want to do is to be able to remove/strip debug info of any compiled exe.
even at heaventools they state this is not possible for "any" compiled exe.

if it would be that easy it wouldn't have taken this long to create decompile tools
and they still don't work properly for everything

0
 

Author Comment

by:Marc582
ID: 21867623
nan not all, debug info are a section of the pe header, we can remove this section cuz its useless, pe explorer doesnt decompile the exe to remove that.....

plz stop talking about things you don't know...
0
 
LVL 3

Accepted Solution

by:
dundeemedia earned 500 total points
ID: 22187420
I don't have code, but it should be easy enough to write if you know about streams etc in delphi.

First, download the PE specification - http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx

Just load the PE file as a stream, then browse the IMAGE_OPTIONAL_HEADER - at the end of this is the data directory, which is an array of _IMAGE_DATA_DIRECTORY.

The 7th item IMAGE_DIRECTORY_ENTRY_DEBUG contains the location and size of the debug directory. The debug directory is an array of _IMAGE_DEBUG_DIRECTORY which contains information about the debug data, and the address and size of this data. THis means that a PE file can contain multiple debug data!

To strip it, you could zero out the debug data, yet leave the debug directory entries where they are.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now