Skip to content

Delphi RE support #6496

Open
0 of 1 issue completed
Open

Description

@psifertex

There are no special workflows or types for reverse engineering Delphi. Ultimately we could even add a language representation layer but the most immediate goal is to support any specific file format data structures including debug information, pascal-style strings, and platform types.

Activity

  1. psifertex commented on Mar 15, 2025

    @psifertex
    MemberAuthor

    Alternate string formats are likely encapsulated by #1334

  2. added
    Component: CoreIssue needs changes to the core
    Effort: HighIssues require > 1 month of work
    Impact: MediumIssue is impactful with a bad, or no, workaround
    on Mar 18, 2025
  3. xusheng6 commented on Mar 18, 2025

    @xusheng6
    Member

    For what I can remember -- Delphi binaries do have certain metadata that, if properly parsed and applied, can give you function names and other things. Though I cannot remember the details. Might worth checking some Delphi-specific tools first

  4. xorhex commented on Mar 21, 2025

    @xorhex

    I see just enough Delphi malware over the years it would be really nice not to have to get IDR working each time.

  5. self-assigned this
    on Mar 21, 2025
  6. added this to the H milestone on Mar 21, 2025
  7. fuzyll commented on Mar 21, 2025

    @fuzyll
    Contributor

    @xorhex What feature(s) do you find the most useful from IDR, or that you would like to see?

    This is something I've been very interested in building for awhile and I think the work that's been done on Workflows in our past few releases should let us be able to do this pretty well.

    From what I think would be quickest to most time-consuming for me:

    • Finding and parsing internal data formats for class info, virtual method tables, etc.
    • Providing types for common runtime libraries
    • Writing a custom language representation ("Pseudo-Delphi")
    • Identifying and parsing Pascal-style strings

    These are the things I'd identified when talking with Jordan before he filed this issue. But, is there anything else you'd like to see? And are there any specific binaries that I could use as test cases that would ensure whatever I'm building is worthwhile for you? I already have some to work with, but they are not malware.

  8. xorhex commented on Mar 24, 2025

    @xorhex

    @fuzyll

    These 3 would be ideal for me (pretty much sums up what I'm looking for)

    • Finding and parsing internal data formats for class info, virtual method tables, etc.
    • Providing types for common runtime libraries
    • Identifying and parsing Pascal-style strings

    What do you mean by a custom language representation - like the high level C/rust representation but dephi like?

    Here are 2 malware samples that hopefully will be of help to you. These are the types of things I've looked at in the past.

    Malware.zip Pwd: infected

    Thanks!

  9. xorhex commented on Mar 24, 2025

    @xorhex

    This might be of some help as well https://github.com/eset/DelphiHelper

  10. utkonos commented on Mar 28, 2025

    @utkonos
    Contributor

    Yes and yes to all of the above. Also, here are a few samples to add to the mix that I've been working on recently. All have been uploaded to the customer portal.

    Tampered innosetup DLL: "silly planet jumps carefully"
    Legit innosetup compiler EXE (used with tampered DLL): "kind star swims carefully"

    DanaBot DLL: "fierce star builds happily"
    DanaBot EXE: "wise ocean glows boldly"

  11. utkonos commented on Apr 2, 2025

    @utkonos
    Contributor

    And don't forget about ASPack:

    "happy dragon jumps happily"
    "eager mountain dreams quietly"

  12. utkonos commented on May 1, 2025

    @utkonos
    Contributor
  13. fuzyll commented on May 1, 2025

    @fuzyll
    Contributor

    Thanks! I've started on this, but have been sidetracked by a few more pressing things. Embarcadero also has reasonably good documentation available for some parts of this as well.

  14. modified the milestones: Future, Jotunheim on Nov 18, 2025
  15. modified the milestones: Jotunheim, Krypton on Mar 19, 2026
  16. modified the milestones: Krypton, L on Aug 12, 2026
  17. psifertex commented on Sep 3, 2026

    @psifertex
    MemberAuthor

    We now have support for the register calling convention (on dev but soon to be stable) and https://github.com/psifertex/delphinja additionally provides debug information parsing and a large number of type libraries. Leaving this issue open as we still plan to have better integrated first party support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Component: CoreIssue needs changes to the coreEffort: HighIssues require > 1 month of workImpact: MediumIssue is impactful with a bad, or no, workaround

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions