Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2019, 15:27
jonwil jonwil is offline
VIP
 
Join Date: Feb 2004
Posts: 282
Rept. Given: 2
Rept. Rcvd 18 Times in 6 Posts
Thanks Given: 1
Thanks Rcvd at 30 Times in 20 Posts
jonwil Reputation: 18
Reverse engineering Delphi executables?

Does anyone have any pointers on how to reverse engineer Borland Delphi executables? (I dont have a clue what version of Delphi my program was built with). Any files that will help recognize Delphi functions in the exe? Or dump information about forms and units?
Reply With Quote
The Following User Says Thank You to jonwil For This Useful Post:
Indigo (07-19-2019)
  #2  
Old 06-09-2019, 16:29
RiRye RiRye is offline
Friend
 
Join Date: Mar 2017
Location: US
Posts: 20
Rept. Given: 0
Rept. Rcvd 2 Times in 1 Post
Thanks Given: 14
Thanks Rcvd at 29 Times in 12 Posts
RiRye Reputation: 2
IDR is a good place to start, should do most of what you are looking for that is Delphi specific.

https://github.com/crypto2011/IDR

There are also a few IDA plugins/scripts to help you out as well depending on your needs.

Last edited by RiRye; 06-09-2019 at 16:30. Reason: Ass -> as
Reply With Quote
The Following User Says Thank You to RiRye For This Useful Post:
Indigo (07-19-2019)
  #3  
Old 06-10-2019, 15:44
Nacho_dj's Avatar
Nacho_dj Nacho_dj is offline
Lo*eXeTools*rd
 
Join Date: Mar 2005
Posts: 195
Rept. Given: 12
Rept. Rcvd 169 Times in 30 Posts
Thanks Given: 26
Thanks Rcvd at 75 Times in 27 Posts
Nacho_dj Reputation: 100-199 Nacho_dj Reputation: 100-199
Check here the Collaborative RCE Tool Library to get two tools more:
Code:
http://www.woodmann.com/collaborative/tools/index.php/Category:Delphi_Decompilers
Best regards

Nacho_dj
__________________
http://arteam.accessroot.com
Reply With Quote
The Following User Says Thank You to Nacho_dj For This Useful Post:
Indigo (07-19-2019)
  #4  
Old 06-10-2019, 20:15
xobor xobor is offline
Friend
 
Join Date: May 2002
Location: Slovakia
Posts: 101
Rept. Given: 6
Rept. Rcvd 4 Times in 4 Posts
Thanks Given: 1
Thanks Rcvd at 9 Times in 6 Posts
xobor Reputation: 5
dede and ida - is all that you need


best regards
Reply With Quote
The Following User Says Thank You to xobor For This Useful Post:
Indigo (07-19-2019)
  #5  
Old 06-13-2019, 03:12
zeffy zeffy is online now
Friend
 
Join Date: Jul 2017
Posts: 28
Rept. Given: 0
Rept. Rcvd 3 Times in 3 Posts
Thanks Given: 120
Thanks Rcvd at 98 Times in 29 Posts
zeffy Reputation: 3
IDR can be good for viewing class metadata and generating scripts that can (sometimes) improve IDA results, although they usually need to be manually edited to fix some bogus results.

With IDA I've noticed sometimes it doesn't automatically detect a Delphi executable, so you can improve the analysis by:

- Open the executable but uncheck automatic analysis.
- Options -> Compiler to Delphi with calling convention Fastcall.
- Set the default string literals to Delphi or Delphi (16 bits), depending on how recent the executable is.
- View -> Open Subviews -> Type libraries, remove the defaults.
- View -> Open Subviews -> Signatures, remove the default and add the flirt signatures for your target (for example "bds" for Delphi 6/7), and mssdk32/64.
- Finally, start the analysis.

This can help quite a bit, although the flirt signatures tend to have a lot of false positives for VCL functions, so just be aware.
Reply With Quote
The Following 3 Users Say Thank You to zeffy For This Useful Post:
Indigo (07-19-2019), niculaita (06-23-2019), SinaDiR (06-23-2019)
  #6  
Old 06-22-2019, 21:22
Coldzer0 Coldzer0 is offline
Friend
 
Join Date: May 2013
Posts: 15
Rept. Given: 7
Rept. Rcvd 7 Times in 5 Posts
Thanks Given: 17
Thanks Rcvd at 43 Times in 10 Posts
Coldzer0 Reputation: 7
Check this out
https://github.com/Coldzer0/IDA-For-Delphi
Reply With Quote
The Following 3 Users Say Thank You to Coldzer0 For This Useful Post:
Indigo (07-19-2019), niculaita (06-23-2019), SinaDiR (06-23-2019)
  #7  
Old 06-25-2019, 13:41
phroyt phroyt is offline
Friend
 
Join Date: May 2018
Posts: 26
Rept. Given: 0
Rept. Rcvd 6 Times in 2 Posts
Thanks Given: 9
Thanks Rcvd at 52 Times in 21 Posts
phroyt Reputation: 6
What I suggest:
- If program is packed, you need to dump first.
- Use IDR autodetect mode.
- Let it take the time needed to recover the unit list
- Try to understand the events and method table

With some luck you can generate the source code for a good amount of routines.

OBS.: Sometimes you need to fix the Entry Point and the Parameters of function prototypes.

Use Resource Hacker to check the procedures binded to events on forms and their components.
Reply With Quote
The Following 2 Users Say Thank You to phroyt For This Useful Post:
Indigo (07-19-2019), niculaita (06-25-2019)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iOS Reverse Engineering sope General Discussion 0 05-13-2016 13:09
Help on Reverse engineering MFC binaries dummys General Discussion 3 12-13-2015 10:34
Last 5 years in reverse-engineering bLaCk-eye General Discussion 22 06-26-2015 09:14
Reverse engineering in Linux taos General Discussion 1 08-04-2005 21:43


All times are GMT +8. The time now is 01:43.


��ICP��05004977��
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX