tag:github.com,2008:https://github.com/mandiant/GoReSym/releasesTags from GoReSym2026-03-05T21:29:56Ztag:github.com,2008:Repository/459658677/v3.32026-03-06T20:20:36Zv3.3<p>add support for Go runtime v1.26 (<a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/85">#85</a>)</p>
<p>* clarify Go runtime version vs GoReSym layout version</p>
<p>* Add Go 1.26 support</p>
<p>* Cleanup debugging prints</p>
<p>* Remove remaining debug print in main.go</p>
<p>* Fix redundant nil check in pe.go</p>
<p>* Final touches: fix sudo in build script and rename layout convention to 1.22</p>
<p>* Run go fmt</p>
<p>* Revert unnecessary moduledata scanning changes in executable parsers</p>
<p>* refactor fixes</p>
<p>* better variable name for refactor</p>
<p>* Fix lots of version issues and bugs in magic prefix check, as well as concurrent lock bug</p>
<p>* fmt</p>
<p>* Refactor slice, textsec, and more to use offsets. Cleanup dead code in internal.go</p>
<p>* fmt</p>
<p>---------</p>
<p>Co-authored-by: Stephen Eckels <[email protected]></p>stevemk14ebrtag:github.com,2008:Repository/459658677/v3.22026-02-17T15:21:31Zv3.2<p>Add -strings flag to extract Go strings from binaries (<a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/77">#77</a>)</p>
<p>* Add -strings flag and ExtractMetadata field</p>
<p>- Add Strings []string to ExtractMetadata struct
<br />- Add -strings command-line flag for string extraction
<br />- Update main_impl and main_impl_tmpfile signatures to accept printStrings parameter
<br />- Add placeholder string extraction logic with TODO marker
<br />- Update printForHuman to display extracted strings section
<br />- Verified flag appears in help and outputs correctly in both JSON and human format</p>
<p>Part of <a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/issues/45">#45</a></p>
<p>* Implement Go string extraction algorithm</p>
<p>- Create objfile/strings.go with core extraction logic
<br />- Implement FLOSS-based string internment table detection
<br />- Add string candidate scanning (pointer + length pairs)
<br />- Implement findLongestMonotonicRun() for pattern detection
<br />- Add UTF-8 validation and printability filtering
<br />- Minimum string length: 4 characters, 80% printable
<br />- Add helper methods to elfFile: getSections(), is64Bit(), isLittleEndian()
<br />- Update main.go to call file.ExtractStrings() instead of placeholder
<br />- Tested with testproject/testproject: extracts 512 strings successfully
<br />- Extracts real Go strings: type names, runtime symbols, error messages</p>
<p>Based on FLOSS floss/language/go/extract.py algorithm
<br />Part of <a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/issues/45">#45</a></p>
<p>* Update README with -strings flag documentation</p>
<p>- Add -strings flag to available flags list
<br />- Add Strings field to example JSON output
<br />- Document purpose: extract embedded Go strings from binary</p>
<p>Part of <a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/issues/45">#45</a></p>
<p>* Add tests validated against FLOSS output</p>
<p>Per maintainer request, added comprehensive test suite:</p>
<p>- strings_floss_test.go: Validates GoReSym against FLOSS reference output
<br /> * 99.2% match rate (648/653 strings match FLOSS)
<br /> * Uses FLOSS output from testproject.exe as ground truth
<br /> * Reference saved in testdata/floss_reference.txt</p>
<p>- strings_test.go: Additional unit tests for:
<br /> * ELF and PE binary string extraction
<br /> * Monotonic run detection algorithm
<br /> * String filtering (printability, minimum length)</p>
<p>- pe.go: Added helper methods (getSections, is64Bit, isLittleEndian)
<br /> to enable string extraction from PE binaries</p>
<p>All tests pass.</p>
<p>* Address PR <a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/77">#77</a> review comments</p>
<p>- Convert getSections() to iterateSections() using callback pattern to avoid memory pressure
<br />- Add Strings field to GoReSym.proto for external parsers
<br />- Implement iterateSections() for Mach-O format (previously missing)</p>
<p>Changes requested by <a class="user-mention notranslate" href="https://github.com/stevemk14ebr">@stevemk14ebr</a> in review:
<br />1. Memory optimization: Replace array-based section loading with generator pattern
<br />2. Proto definition: Add 'repeated string strings = 13' field
<br />3. Mach-O support: Add missing iterateSections() implementation</p>
<p>* Fix test failures and expand string extraction testing per PR <a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/77">#77</a> feedback</p>
<p>- Fixed 4 test compilation errors by adding missing printStrings parameter to main_impl() calls
<br />- Added comprehensive TestStringExtraction function with 7 test cases covering Linux/macOS/Windows binaries
<br />- Implemented isPrintable() helper for ASCII validation (range 32-126)</p>
<p>* Align string extraction with FLOSS algorithm per PR <a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/77">#77</a> review</p>
<p>Rewrite string extraction to match FLOSS (extract.py) logic:
<br />- Sort candidates by address (not length) to fix monotonic run detection
<br />- Add image VA range and max section size filtering for candidates
<br />- Use candidate (pointer, length) pairs for direct extraction from blob
<br />- Replace 80% printable threshold with 100% fully printable check
<br />- Fix PE section addresses to include ImageBase for correct VA comparison</p>
<p>Results: 648 strings extracted from PE test binary, 100% match with FLOSS.</p>
<p>* Run string extraction on test build files</p>
<p>* Extend main test to cover all new versions</p>
<p>* Fix string extraction for old Windows binaries and add length sanity check</p>
<p>1. Add .text to data sections for old Go Windows binaries (1.7-1.10)
<br /> that store strings in the code section instead of .rdata</p>
<p>2. Add maxReasonableStringLength (64KB) to filter out garbage candidates
<br /> with huge lengths that cause incorrect blob boundary detection</p>
<p>3. Update TestIsDataSection to reflect .text being a valid data section</p>
<p>Fixes string extraction failures on:
<br />- Old Windows PE binaries (Go 1.7-1.10): 0 -> 256 strings
<br />- Modern Windows: 574 strings
<br />- macOS: 284 strings</p>
<p>All tests pass including TestWeirdBins on 15 real binaries.</p>
<p>* Fix test failures for Go 1.5/1.6 and Go 1.22 macOS; fix build script typo</p>
<p>1. main_test.go: Skip Strings check for Go 1.5/1.6
<br /> Pre-SSA C-based linker does not produce length-sorted string blobs,
<br /> so findLongestMonotonicRun never reaches the minimum threshold of 10.
<br /> Pattern mirrors the existing interface-parsing guard.</p>
<p>2. objfile/strings.go: Handle prevNull == -1 in findStringBlobRange
<br /> Apple's linker on newer Go/macOS (1.22+) packs sections without leading
<br /> padding, so no null bytes exist before the first string candidate.
<br /> bytes.LastIndex returns -1 in that case; treat it as offset 0 instead
<br /> of bailing out with nil.</p>
<p>3. objfile/macho.go: Add missing is64Bit/isLittleEndian for machoFile
<br /> elfFile and peFile already implement these interface methods; machoFile
<br /> was the only rawFile implementation without them. Detect CPU type
<br /> (CpuAmd64/Arm64 = 64-bit) and byte order from the macho.File struct.</p>
<p>4. build_test_files.sh: Fix $ver typo -> $GO_VER on mkdir line
<br /> The directory was never created before Docker ran, causing Go 1.5
<br /> builds to produce no output. Now all 12 binaries are built for
<br /> every version including 1.5 and 1.6.</p>
<p>---------</p>
<p>Co-authored-by: Stephen Eckels <[email protected]></p>stevemk14ebrtag:github.com,2008:Repository/459658677/v3.1.22025-08-08T13:55:19Zv3.1.2stevemk14ebrtag:github.com,2008:Repository/459658677/v3.1.12025-08-07T14:56:21Zv3.1.1<p>Fix release GH workflow</p>
<p>Try to fix GH workflow</p>stevemk14ebrtag:github.com,2008:Repository/459658677/v3.12025-08-07T14:36:15Zv3.1stevemk14ebrtag:github.com,2008:Repository/459658677/v3.0.22025-02-12T15:12:27Zv3.0.2stevemk14ebrtag:github.com,2008:Repository/459658677/v3.0.12024-10-19T19:03:04Zv3.0.1<p>Optimize and omit duplicate pattern matches (<a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/66">#66</a>) (<a class="issue-link js-issue-link" href="https://github.com/mandiant/GoReSym/pull/68">#68</a>)</p>
<p>Co-authored-by: ViRb3 <[email protected]></p>stevemk14ebrtag:github.com,2008:Repository/459658677/v3.02024-10-19T18:51:41Zv3.0stevemk14ebrtag:github.com,2008:Repository/459658677/v2.7.42024-05-07T14:54:56Zv2.7.4stevemk14ebrtag:github.com,2008:Repository/459658677/v2.7.32024-04-15T14:04:20Zv2.7.3stevemk14ebr