Tool:Delphi
Appearance
| Vendor | Borland / Embarcadero |
|---|---|
| Platforms | Windows, Linux (Kylix) |
| On this wiki | Facts · Code · Notes · Topics |
Borland, later Embarcadero Delphi and C++Builder: native Object Pascal / C++ compilers whose PE output carries a Borland DOS stub, RTTI with 'TControl' class records and a PACKAGEINFO resource, from which the compiler version can be read.
Identification
From the Detect It Easy rules (Tool:Detect It Easy, compiler_Delphi.4.sg and the shared Borland include):
- The DOS stub is the Borland one:
4D 5A 50 00 02 00 ...header and the textThis program must be run under Win32(see Format:DOS MZ executable). Borland C++ uses the same stub or the entry bytesA1 .. .. .. .. C1 E0 02 A3; the textBorland C++ - Copyrightin the second section, or the entry bytesEB 10 'fb:C++HOOK' 90, mark C++. - Delphi stores class RTTI with a length-prefixed name, so the bytes
07 08 'TControl'appear in the first section (code). The dword stored 10 pointer-sizes before the target of the pointer that follows (the VMT size) differs per compiler: 0xB4 C++Builder, 0x114 Delphi 4, 0x120 Delphi 5, 0x15C/0x160 Delphi 6/7, 0x164 Delphi 2005, 0x190 Delphi 2006, 0x1A4 Delphi 2009, 0x1AC Delphi 2010/XE, 0x1B4 XE2-XE4 (32-bit), 0x1BC XE5-XE6, 0x2F0/0x2F8 Delphi XE2-XE4 (64-bit). - A PACKAGEINFO resource listing unit names (
ExcUtilsappears from XE,StrUtilsfrom 2010) refines the version. - Delphi 8 and 2005 for .NET are identified by managed types such as Borland.Vcl.Types or Borland.Delphi.Units.
Other software compiled with Delphi: Tool:Inno Setup (setup and uninstaller). Hub: Technique:Identifying the toolchain of a binary. Unverified: the VMT size table is DIE's and may shift between updates.