Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To make things less hardcoded in the Karton service itself, let's move analysis process to the separate module called "analyzer"
Analyzer is parametrized by
AnalysisOptions
object that is composed from configuration file values and task parameters.analyzer.analyze_sample
andAnalysisOptions
interface is used both by DrakrunKarton and new CLI tool calleddrakstart
that allows to run raw analysis process directly from CLI. It will be useful tool for setup and further development and debugging.List of things implemented a bit different than in the original code:
/tmp/drakrun/vm-<N>/sample
instead of/tmp/drakrun/vm-<N>/<target_name>
. The target file name (which is usuallymalwar.exe
) is used only when writing file to the target VM.metadata.json
includesdumps_metadata
analyzer.run_vm
. It sounds a bit cleaner to me as user may changeout_interface
/dns_server
/net_enable
settings and we need to setup network accordingly.