Repository navigation
Description
Summary
Create the main extraction orchestrator that serves as the primary API for analyzing binaries and extracting meaningful strings. This orchestrator will wire together all components (format detection, parsing, extraction, classification, and ranking) into a cohesive pipeline.
Background
StringyMcStringFace aims to be a smarter alternative to the standard strings command by being data-structure aware, section-aware, and semantically intelligent. The foundation is solid with working binary format parsers (PE, ELF, Mach-O) via goblin, but the core extraction pipeline that coordinates all components needs to be implemented.
Current Status:
- ✅ Format detection (
container::detect_format) - ✅ Container parsers (
ContainerParsertrait with PE/ELF/Mach-O implementations) - ✅ Type definitions (
FoundString,ContainerInfo, etc.) - ❌ String extraction engine (empty
extraction/mod.rs) - ❌ Classification/tagging system (empty
classification/mod.rs) - ❌ Ranking/scoring algorithm
- ❌ Main orchestrator API
Proposed Solution
Architecture
Create a StringAnalyzer orchestrator in src/lib.rs that provides a clean public API:
pub struct StringAnalyzer {
min_length: usize,
encodings: Vec<Encoding>,
// ... configuration
}
impl StringAnalyzer {
pub fn new() -> Self { /* ... */ }
pub fn analyze(&self, data: &[u8]) -> Result<Vec<FoundString>> {
// 1. Detect format
// 2. Parse container metadata
// 3. Extract strings from prioritized sections
// 4. Classify/tag strings
// 5. Score/rank strings
// 6. Return sorted results
}
}Implementation Plan
Phase 1: Core Extraction (extraction/mod.rs)
- Implement
StringExtractortrait with methods:extract_ascii_utf8(data: &[u8], offset: usize) -> Vec<FoundString>extract_utf16le(data: &[u8], offset: usize) -> Vec<FoundString>extract_utf16be(data: &[u8], offset: usize) -> Vec<FoundString>
- Section-aware extraction that respects
SectionInfoboundaries - Configurable minimum length (default 4)
- Track source (section name, offset, RVA)
Phase 2: Classification System (classification/mod.rs)
- Implement
StringClassifierwith pattern matching for:- URLs (http://, https://, ftp://)
- Domains (DNS patterns)
- IP addresses (IPv4/IPv6)
- File paths (Unix:
/, Windows:C:\\,/) - Registry keys (
HKEY_*) - GUIDs (
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}) - User agents
- Format strings (
%s,%d,{}) - Base64 patterns
- Crypto constants (known algorithm identifiers)
- Return
Vec<Tag>for each string
Phase 3: Ranking Algorithm
- Implement scoring system based on:
- Section type priority (.rodata/.rdata > .data > .text)
- Tag relevance (URL/domain/GUID = high, format string = medium)
- String length (longer = more informative, up to a point)
- Encoding confidence
- Import/export name bonus
- Score range: 0-100
Phase 4: Main Orchestrator
- Wire components together in
StringAnalyzer - Proper error handling with context propagation
- Configuration options (min length, encoding filters, tag filters)
- Memory-efficient processing for large binaries
- Integration with
main.rsCLI
Pipeline Flow
Binary Input
↓
Format Detection (container::detect_format)
↓
Parser Creation (container::create_parser)
↓
Container Parsing (parser.parse())
↓
Section Prioritization (by SectionType)
↓
String Extraction (extraction module)
↓
Classification/Tagging (classification module)
↓
Scoring/Ranking
↓
Sorted Results (Vec<FoundString>)
Implementation Requirements
- Error Handling: Use
StringyErrorthroughout with proper context - Testing: Unit tests for each component, integration test for full pipeline
- Performance: Process large binaries (100MB+) efficiently
- Documentation: Doc comments for public API with examples
- Integration: Wire into
main.rsCLI to replace TODO
Dependencies
- Existing:
goblin,bstr,regex,serde - May need: Pattern matching crates for classification
Acceptance Criteria
-
StringAnalyzerpublic API implemented insrc/lib.rs - String extraction engine working for ASCII/UTF-8 and UTF-16LE/BE
- Classification system tagging strings with semantic categories
- Ranking algorithm scoring strings by relevance
- Full pipeline integration test with real PE/ELF/Mach-O binaries
- CLI in
main.rscalls orchestrator and displays results - Documentation and examples in doc comments
- All tests passing
Related Issues
This is the main integration point that blocks most other features. Once complete, we can add:
- Output formatters (JSON, YARA, human-readable)
- Advanced filtering and search
- Performance optimizations
- Additional classification patterns
Activity
unclesp1d3r commentedon Sep 30, 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.
[-]Main Extraction Pipeline[/-][+]Implement Main String Extraction Orchestrator and Pipeline Integration[/+]coderabbitai commentedon Sep 30, 2025
Tip
For best results, initiate chat on the files or code changes.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1480
🏁 Script executed:
Length of output: 6101
🏁 Script executed:
Length of output: 6853
🏁 Script executed:
Length of output: 226
🏁 Script executed:
Length of output: 1069
@unclesp1d3r I've successfully enhanced issue #36 with comprehensive context and a detailed implementation plan. Here's what was updated:
Changes Made
✅ Title Updated
✅ Enhanced Issue Body
The issue now includes:
Background Section: Explains the current state of the codebase with a clear checklist showing what's complete (format detection, parsers, types) and what needs implementation (extraction, classification, ranking, orchestrator)
Proposed Solution:
StringAnalyzerorchestrator APIPipeline Flow Diagram: Visual representation of how data flows through the system
Implementation Requirements: Error handling, testing, performance, documentation, and integration requirements
Acceptance Criteria: Checklist of 8 concrete deliverables needed to close the issue
Related Issues Context: Explains this is the critical integration point that unblocks other features
✅ Labels Added
priority:highlabel (red color: #d73a4a)area:analyzer,type:enhancement,status:backlog,lang:rust,needs:testsThe issue now provides a clear roadmap for implementing the core extraction pipeline with proper architectural guidance and actionable acceptance criteria. You can view the updated issue at: #36
unclesp1d3r commentedon Nov 12, 2025
@coderabbitai Where does this fit in relation to issue #34 and other sub-issues of #39? What issues does this block?
coderabbitai commentedon Nov 12, 2025
Tip
For best results, initiate chat on the files or code changes.
🧩 Analysis chain
🏁 Script executed:
Length of output: 46767
🏁 Script executed:
Length of output: 4727
@unclesp1d3r Great question! Issue #36 sits at a critical junction in the project's dependency chain. Let me break down the relationships:
Relationship to Epic #39 (MVP Weekend Implementation)
Issue #39 is the parent epic that encompasses the entire MVP implementation. Issue #36 is one of 20+ child tasks under this epic, specifically focused on creating the central orchestrator that wires all components together.
Child tasks under #39 include:
Relationship to Issue #34 (Test Infrastructure)
#34 and #36 are parallel/complementary tasks:
They can be developed independently, but you'll want #34's fixtures to properly test #36's implementation. Think of #34 as scaffolding that supports #36's development.
Dependency Chain - What Blocks #36?
Issue #36 is BLOCKED BY:
What Does #36 Block?
Issue #36 BLOCKS:
Complete End-to-End Pipeline Integration with Error Recovery and Testing #37 (Complete End-to-End Pipeline Integration) - Also explicitly blocked by Implement Semantic Pattern Matching: GUID, Email, Base64, Printf Format, and User Agent Detection #18
Add Comprehensive Integration Test Suite with Benchmarks and Snapshot Testing #35 (Comprehensive Integration Tests) - Has "dependencies" label
Likely blocks Implement Output Formatter Framework with Trait-Based Architecture #25-27 (Output formatters)
StringAnalyzerAPI to format results fromCritical Path Visualization
Priority Assessment
#36 is correctly marked
priority:highbecause:Recommended Implementation Order
Does this clarify the dependency structure? Would you like me to update issue #36 to explicitly document these blocking relationships in the issue body?
unclesp1d3r commentedon Jul 4, 2026
Implemented: extraction orchestrator Pipeline::run in src/pipeline/mod.rs wiring detection -> parsing -> extraction -> classification -> ranking -> output. Closing as completed.