Dosu LogoDosu Logo
Ask
Join our Discord
Organization avatar
stringyPublic
EvilBit Labs LLC
Documentsstringy
Section Weighting and Symbol Extraction
Section Weighting and Symbol Extraction
Type
Document
Status
Published
Created
Feb 1, 2026
Updated
Feb 1, 2026
Updated by
Dosu Bot

Heuristic Section Weighting for String-Bearing Sections#

The section weighting heuristic is designed to prioritize binary sections most likely to contain meaningful strings, improving both the accuracy and efficiency of binary analysis. Each section is assigned a base weight according to its type, with format-specific bonuses applied to sections known to be rich in strings. The overall ranking score for a string is calculated as:

Final Score = SectionWeight + EncodingConfidence + SemanticBoost - NoisePenalty

Section types and their base weights include: StringData (40), Resources (35), ReadOnlyData (25), Debug (15), WritableData (10), Code (5), and Other (0). Format-specific bonuses further increase the weight for sections like ELF’s .rodata.str1.1 (+5), PE’s .rsrc (+5), and Mach-O’s __TEXT,__cstring (+5), reflecting their higher likelihood of containing valuable strings. The ranking system also incorporates encoding confidence, semantic boosts (for URLs, GUIDs, file paths, symbols, etc.), and noise penalties (for high entropy, excessive length, repeated patterns, or known noise patterns) to filter out less relevant strings and prioritize those with higher analytical value. Expensive calculations such as entropy and pattern detection are cached, and batch processing is used to maintain performance when analyzing large binaries .

Section Classification and Weighting by Format#

ELF#

ELF binaries classify string-bearing sections with high priority for .rodata and .rodata.str1.1, medium for .data.rel.ro and .comment, and low for .note.*. Section weights are typically 10 for string data sections like .rodata, with a +5 bonus for .rodata.str1.1. The classification leverages section flags such as SHF_EXECINSTR and SHF_WRITE to distinguish between code, writable, and read-only data .

PE#

PE binaries prioritize .rdata and .rsrc (resources) with high weights (10.0 and 9.0, respectively), assign medium weight to .data (5.0), and low weight to .text (1.0). The .rsrc section receives a +5 bonus due to its frequent use for storing version info, string tables, and manifests. The parser also extracts strings from VERSIONINFO, STRINGTABLE, and MANIFEST resources, supporting multiple languages and encoding detection .

Mach-O#

Mach-O binaries classify __TEXT,__cstring and __TEXT,__const as high priority, __DATA_CONST as medium, and __DATA as low. The __TEXT,__cstring section receives a +5 bonus, reflecting its role as the primary repository for C string literals. Mach-O analysis also extracts strings from load commands such as LC_LOAD_DYLIB, LC_RPATH, and LC_BUILD_VERSION .

Enhanced Symbol Extraction#

Symbol extraction is improved by considering multiple symbol tables, symbol bindings, and symbol types, increasing the comprehensiveness and accuracy of symbol identification.

  • ELF: The parser extracts import and export symbols from both .dynsym and .symtab, supporting functions, objects, TLS variables, and indirect functions. It handles global and weak bindings, filters out hidden and internal symbols, and uses ELF version tables (versym and verneed) to map imported symbols to their providing libraries, with heuristics for unversioned symbols .

  • PE: The parser extracts import symbols from the import directory and export symbols from the export directory, including function names, DLL names, addresses, and ordinals. It also processes resource sections for additional strings .

  • Mach-O: Symbol extraction includes processing load commands for library paths, runtime search paths, and build tool information, in addition to extracting symbols from the symbol table .

Rationale and Impact#

These improvements leverage format-specific knowledge to prioritize sections and symbols most likely to contain meaningful strings, increasing the accuracy of string extraction and symbol attribution. By focusing analysis on high-value sections and filtering out noise, the system reduces unnecessary processing and improves performance, especially when handling large binaries. Enhanced symbol extraction supports better string classification and attribution, which is critical for tasks such as reverse engineering, malware analysis, and software auditing , .

Documents
Binary Container Parsers
Binary Section Weighting and Symbol Extraction
Project Specification and Task Documentation
Section Weighting and Symbol Extraction
Stringy Binary Analyzer Specification
Stringy Project Specification
Code Quality and Formatting Tools
contributing
Developer Tooling and Quality Configurations
Developer Tooling and Quality Configurations
Documentation and Repository Naming Conventions
Kiro Automation Hooks
Rust Code Analysis and Performance Hooks
Continuous Integration and Dependency Management
AI Agent Contribution Guidelines
CI/CD Pipeline and Release Workflow
Kiro Automation Hooks
release-process
Security Analysis with CodeQL
Security Analysis with CodeQL
Memory-Mapped File I/O Abstraction
api-reference
architecture
development
getting-started
integration
release-process
safety
testing
Project Overview
product
tech
Specification-Driven Development
Documentation and Repository Naming Consistency
Project Specification and Task Documentation
Stringy Project Specification
String Extraction and Deduplication
Binary Section Weighting and Symbol Extraction
Project Specification and Task Documentation
Section Weighting and Symbol Extraction
Stringy Binary Analyzer Specification
Stringy Project Specification
tech
Testing Infrastructure and Quality Assurance
contributing
Contributor Code of Conduct
Documentation and Repository Naming Conventions
release-process
Rust Code Analysis and Performance Hooks
Stringy Binary Analyzer Specification
Stringy Project Specification
testing
AGENTS
Architecture & Design Internals
Architecture Decision Records (ADR) Summary
CHANGELOG
CLAUDE
CODE_OF_CONDUCT
CONTRIBUTING
Contributor & AI-Agent Guidelines - Stringy
GOTCHAS
Product Overview
README
Recently Opened Issues / Near-Term Planned Work
SECURITY
SKILL
SUMMARY
SUMMARY
Strategy
THIRD_PARTY_NOTICES
api
architecture
binary-formats
classification
cli
coding-style
commit-instructions
configuration
development
hooks
installation
introduction
introduction
output-formats
patterns
performance
quickstart
ranking
security
security-assurance
string-extraction
structure
testing
troubleshooting