Repository navigation
Description
Overview
This issue tracks Phase 3 of resource extraction capabilities in StringyMcStringFace, expanding beyond the current PE VERSIONINFO/STRINGTABLE/MANIFEST support to cover additional resource types across all three binary formats (PE, Mach-O, ELF).
Background
Phase 1 (Complete): PE resource enumeration and metadata extraction
Phase 2 (Complete): PE string extraction (VERSIONINFO, STRINGTABLE, MANIFEST)
Phase 3 (This Issue): Extended resource support across all formats
Binary formats embed rich metadata and resources that contain high-signal strings useful for security analysis, reverse engineering, and binary intelligence gathering. Current implementation covers basic PE resources but misses:
- PE: Dialog resources (UI strings, control labels), icon metadata/descriptions, accelerator tables
- Mach-O: Embedded plist files (Info.plist, entitlements), framework bundle metadata
- ELF: Note sections (.note.gnu.build-id, .note.ABI-tag), build IDs, GNU attributes
These resources often contain developer comments, internal paths, debug information, and user-facing strings that are highly valuable for analysis.
Proposed Implementation
PE Format Extensions
Target Resources: RT_DIALOG (5), RT_ICON (3), RT_GROUP_ICON (14), RT_ACCELERATOR (9)
-
Dialog Resources: Parse dialog templates to extract window titles, button labels, static text controls
- Use pelite's resource enumeration with RT_DIALOG type
- Parse DLGTEMPLATE/DLGTEMPLATEEX structures
- Extract UTF-16LE strings from control definitions
- Tag with
Tag::Resourceand potentiallyTag::UiString
-
Icon Metadata: Extract icon group names and descriptions
- Enumerate RT_GROUP_ICON resources
- Parse ICONDIR structures for metadata
- Extract any embedded string data
Dependencies: Already using pelite, may need manual structure parsing for DLGTEMPLATE
Mach-O Format Extensions
Target Sections: __TEXT,__info_plist, __PLIST segments, embedded frameworks
-
Embedded Plists: Parse Info.plist and entitlements XML
- Locate plist sections in Mach-O segments
- Parse XML/binary plist formats
- Extract key-value string pairs (bundle ID, display name, permissions)
- Tag with
Tag::PlistorTag::Metadata
-
Framework Bundles: Process framework metadata
- Parse framework directory structures within bundles
- Extract framework names, version strings
- Process LC_ID_DYLIB load commands for identification
Dependencies: Consider adding plist crate for XML/binary plist parsing
ELF Format Extensions
Target Sections: .note.gnu.build-id, .note.ABI-tag, .note.GNU-stack, GNU attributes
-
Note Sections: Parse ELF note entries
- Iterate through PT_NOTE program headers
- Parse note section structures (namesz, descsz, type)
- Extract build IDs, ABI tags, vendor notes
- Tag with
Tag::BuildMetadata
-
Build IDs: Extract unique build identifiers
- Parse NT_GNU_BUILD_ID note type
- Convert to hex string representation
- Useful for binary tracking and debugging
-
GNU Attributes: Parse .gnu.attributes section
- Extract compiler version strings
- Parse attribute tags and values
- Tag with
Tag::CompilerInfo
Dependencies: goblin already provides note section parsing primitives
Implementation Strategy
-
Create extraction modules for each format in
src/extraction/src/extraction/pe_dialogs.rs- Dialog and icon resource parsingsrc/extraction/macho_resources.rs- Plist and framework bundle extractionsrc/extraction/elf_notes.rs- Note section and build metadata parsing
-
Extend Tag enum in
src/types.rswith new semantic tags:Tag::UiString- Dialog and UI element stringsTag::Plist- Property list entriesTag::BuildMetadata- Build IDs, ABI tagsTag::CompilerInfo- Compiler and toolchain metadata
-
Wire into extraction pipeline in
src/lib.rs- Call format-specific extractors after existing resource extraction
- Merge results with existing string collections
- Ensure proper deduplication
-
Add comprehensive tests
- Unit tests for each resource parser
- Integration tests with real binary fixtures containing target resources
- Snapshot tests for expected output formats
Success Criteria
- PE: Successfully extract strings from dialog resources with proper UTF-16LE decoding
- PE: Extract icon group names and metadata
- Mach-O: Parse embedded Info.plist and extract key-value pairs
- Mach-O: Extract framework bundle metadata
- ELF: Parse note sections and extract build IDs
- ELF: Extract GNU attribute strings
- All: Comprehensive test coverage with fixtures
- All: Proper tagging and scoring in output
References
- PE Resources: PE Format Specification - Microsoft
- Mach-O Plists: Apple Developer - Information Property Lists
- ELF Notes: ELF Format - Tool Interface Standard
- Current Implementation:
src/extraction/pe_resources.rs(Phase 2 reference)
Priority
Medium-High - Expands core string extraction capabilities with high-signal data sources
Estimated Effort
2-3 weeks - Requires format-specific parsing logic and comprehensive testing across all three binary formats
Activity
unclesp1d3r commentedon Nov 11, 2025
@coderabbitai Enhance this issue body with additional context and a proposed solution. Improve the issue title and assign the proper labels and other metadata.
traycerai commentedon Nov 11, 2025
Plan
Observations
The codebase provides solid foundations: PE resource extraction in
pe_resources.rshandles VERSIONINFO, STRINGTABLE, and MANIFEST via pelite; container parsers classify sections and extract imports/exports using goblin; types define extensible enums for tags and resources. ELF notes are classified as StringData but not parsed; Mach-O lacks resource extraction. Architecture supports modular extensions with graceful error handling and consistentFoundStringoutput.Approach
Extend existing PE extraction in
pe_resources.rsfor dialogs and icons using pelite enumeration and manual DLGTEMPLATE parsing. Createmacho_resources.rsfor plist (via newplistdependency) and framework extraction from load commands. Createelf_notes.rsfor build ID, notes, and GNU attributes using goblin APIs. Update types with new tags; integrate extractors into container parsers; add tests and documentation following established patterns.Reasoning
I examined the repository structure, reviewed the PE resource extraction implementation, analyzed type definitions, inspected container parsers for ELF and Mach-O, and researched parsing requirements for dialogs, plists, and ELF notes using available libraries.
Proposed File Changes
📄 src/types.rs (MODIFY) 🔗
📄 src/extraction/pe_resources.rs (MODIFY) 🔗
📄 src/extraction/macho_resources.rs (NEW) 🔗
📄 src/extraction/elf_notes.rs (NEW) 🔗
📄 src/extraction/mod.rs (MODIFY) 🔗
📄 src/container/macho.rs (MODIFY) 🔗
📄 src/container/elf.rs (MODIFY) 🔗
📄 src/lib.rs (MODIFY) 🔗
📄 Cargo.toml (MODIFY) 🔗
📄 README.md (MODIFY) 🔗
📄 docs/src/binary-formats.md (MODIFY) 🔗
📄 tests/integration_pe.rs (MODIFY) 🔗
📄 tests/integration_macho.rs (MODIFY) 🔗
📄 tests/integration_elf.rs (MODIFY) 🔗
Import In IDE
🤖 Prompt for AI Agents
Developer Humor
Execution Information
Branch: main
Commit: 08cd31b
💡 Tips
Supported Commands (Inside Comments)
@traycerai generateto iterate on the previous version of the implementation plan.Supported Commands (Inside Description)
@traycerai ignoreanywhere in the ticket description to prevent this ticket from being processed.@traycerai branch:<branch-name>anywhere in the ticket description to specify the target branch for the implementation plan.Community
[-]Enhanced Resource Support[/-][+]Phase 3: Multi-Format Resource Extraction - PE Dialogs, Mach-O Plists, ELF Build Metadata[/+]coderabbitai commentedon Nov 11, 2025
Tip
For best results, initiate chat on the files or code changes.
🧩 Analysis chain
🏁 Script executed:
Length of output: 432
🏁 Script executed:
Length of output: 7887
🏁 Script executed:
Length of output: 19118
🏁 Script executed:
Length of output: 124
🏁 Script executed:
Length of output: 1647
🏁 Script executed:
Length of output: 392
@unclesp1d3r I've successfully enhanced issue #71 with the following improvements:
✅ Enhanced Title
"Phase 3: Multi-Format Resource Extraction - PE Dialogs, Mach-O Plists, ELF Build Metadata"
The new title clearly indicates this is Phase 3 of resource extraction and specifies the scope across all three binary formats.
✅ Comprehensive Issue Body
Added detailed sections including:
✅ Labels Applied
enhancement- New feature requestarea:analyzer- Binary analyzer functionalitylang:rust- Rust implementationepic- Large initiative spanning multiple formatspriority:medium- Appropriate priority level✅ Metadata
The issue is now ready for development with clear technical guidance, success criteria, and proper categorization! 🎯
traycerai commentedon Nov 11, 2025
I have updated the Implementation Plan to reflect the recent changes in the ticket.