Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsorted output and moving metadata to the front of the archive #216

Closed
rbcrwd opened this issue Apr 3, 2024 · 4 comments
Closed

Unsorted output and moving metadata to the front of the archive #216

rbcrwd opened this issue Apr 3, 2024 · 4 comments
Assignees

Comments

@rbcrwd
Copy link
Contributor

rbcrwd commented Apr 3, 2024

My team automates parsing UAC artifacts to ingest into our internal evidence systems. The uac.log file contains crucial metadata that we would like to use to guide parsing and routing, but it is unfortunately at the end of the [sorted] archive. We can scan the archive twice: once for uac.log and once for understanding, but it would be nice to limit how far the first scan must go, especially for large collections.

As such, I've implemented a pair of changes that, when combined, would allow us to move that log file to the front of the archive without materially affecting normal operation. Those changes are represented in my fork here: https://github.com/rbcrwd/uac/tree/feature/uac_log_move.

As I'm a first-time UAC contributor, I presumed it'd be better to open a ticket for discussion before a PR, so we can discuss whether the approach is reasonable.

@tclahr
Copy link
Owner

tclahr commented Apr 5, 2024

I think adding uac.log at the beginning of the .output_file.tmp is not an issue. We can work on a change that does not require adding a new command line option either.
Just for curiosity. Are you using .output_file.tmp during your automation process?

@rbcrwd
Copy link
Contributor Author

rbcrwd commented Apr 5, 2024

We are not using the temporary file in our automation.

I agree that there are many ways to inject uac.log at the top of the tarball, and am happy to submit a PR doing so.

Given the "any Bourne shell" requirement the most stringently compatible way of doing so may involve a second temp file, which I was trying to avoid with the --unsorted approach. The option satisfies two goals for us, since we handle quite a few large collections for which sorting things like hash lists is wasted time and forensic spoliation.

@rbcrwd
Copy link
Contributor Author

rbcrwd commented Apr 12, 2024

Per discussion, removed the --unsorted component for separate discussion and submitted PR #217 to move the log to the front of the archive.

@tclahr
Copy link
Owner

tclahr commented Apr 15, 2024

Code merged via PR #217

@tclahr tclahr closed this as completed Apr 15, 2024
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

No branches or pull requests

2 participants