Skip to content

Conversation

@coffeegist
Copy link
Contributor

Overview

Refactors the parsing pipeline to use streaming input instead of loading entire files into memory. This architectural change prepares the codebase for better memory efficiency and sets the foundation for future optimizations.

Changes

  • Introduced DataSource and DataStream abstractions with generator-based processing
  • Implemented FileDataStream, OutflankDataStream, and MythicDataStream
  • Refactored parsers to use BoundaryBasedParser pattern
  • Streamlined parser registration in ParsingPipelineFactory
  • Cleaned up imports and removed unused parser code
  • Updated tests to be compliant with the new architecture

Testing

  • All existing tests pass
  • Verified output matches previous implementation using JSON diffs

Notes

  • This PR contains only architectural changes, no algorithm optimizations
  • Follow-up PR will include performance improvements built on this foundation

Tw1sm and others added 29 commits April 29, 2025 14:43
Allow schemaIDGUID to be formatted as UUID
Fix: Prevent KeyError when 'operatingsystem' is missing during service pack append
* fix: Ensure self.certtemplates exists before iterating in resolve_published_templates

* update changelog
* tweak logging; start mythic parser

* add quiet flag

* updated ldapsearch BOF syntax in examples

* fix securityidentifier in test data

* uploader class to send files to BHCE

* update server default, move Path() cast

* readme/help edits

* suppress unverified https warning

* prep readme/changelog

* require mythic api token instead of user/pass

* prep merge
* make search for non-cobalt log files more generic

* version and changelog
* Fix to brc4 computer object parsing for msds-allowedtodelegateto

* add another variant for never expries

* Check if sid and object_type are solved, bloodhound-ce import fails if either is set to None

* bump version and changelog

---------

Co-authored-by: Tw1sm <[email protected]>
* Bugfix - Neo.ClientError.Statement.TypeError

In some cases, msds-allowedtodelegateto generates an invalid map type that breaks the Bloodhound and Neo4ldap parser. Furthermore, this information is redundant, as the attribute is also stored as AllowedToDelegate.

* bump version & changelog

---------

Co-authored-by: Tw1sm <[email protected]>
* Add NoneType check for x509Certificate in build_certificate_chain

* bump version + changelog

---------

Co-authored-by: Tw1sm <[email protected]>
* Remove MythicCallback wrapper
- Updated attribute names in LocalGroupMembership, LocalPrivilegedSession, LocalRegistrySession, and LocalSession classes to use lowercase for consistency.
- Removed the GenericParser class and replaced its functionality with specific parsers for netloggedon, netsession, netlocalgroup, and regsession BOF outputs.
- Introduced new parsers: NetLocalGroupBofParser, NetLoggedOnBofParser, NetSessionBofParser, and RegSessionBofParser, each with specific start and end boundary patterns.
- Enhanced ParsingPipeline to register and process new parsers, allowing for better organization and handling of parsed objects.
- Updated tests to utilize the new parser structure and ensure correct parsing of BOF outputs.
- Removed unused shared parsers and generic parser code to streamline the codebase.
…; add minimal OU GPLink log fixture for testing
…onsolidate local group/session object retrieval
… streamline parser registration based on type
@coffeegist coffeegist closed this Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants