Debug Options
Warning
Full support for debugging options is not guaranteed.
They may change on both the library side and the product side.
Don't use them in production code.
When creating any scan task, you can specify DebugOptions to configure the sample launch parameters.
ptsandbox.models.api.analysis.DebugOptions
Bases: TypedDict
Description of all available debugging options for very detailed scan configuration
keep_sandbox
instance-attribute
Don't destroy the sandbox after scanning
skip_work
instance-attribute
Perform a scan, skipping the data collection stage for analysis
extract_crashdumps
instance-attribute
Extract crashdumps from the sandbox
save_debug_files
instance-attribute
Save files necessary for debugging (error logs, tcpdump logs, etc)
rules_url
instance-attribute
Use the specified normalization and correlation rules The rules are specified as a link to the archive containing the compiled rules
sleep_work
instance-attribute
Perform a scan, replacing the data collection stage for analysis with an equivalent waiting time
disable_syscall_hooks
instance-attribute
Disable syscall hooks functionality
Read more about these hooks in documentation
disable_dll_hooks
instance-attribute
Disable dll hooks functionality
Read more about these hooks in documentation
disable_correlation
instance-attribute
Disable the functionality of normalization and correlation of events.
It is useful if the correlation results are not needed anyway.
In this case, all collected artifacts (drops, memdumps, procdumps) will be included in the response, without filtering at the level of correlation rules
custom_syscall_hooks
instance-attribute
Use the specified list of system calls to intercept
The list is transmitted as an http link to a file with the names of system calls
Read more about this file in documentation
custom_dll_hooks
instance-attribute
Use the specified list of system calls to intercept
The list is transmitted as an http link to a file with the names of dll hooks for apimon plugin
Read more about this file in documentation
disable_retries
instance-attribute
Disable task re-execution in case of a scan error
enable_sanitizers
instance-attribute
Enable the debugging mechanisms of the sanitizers group
allowed_outbound_connections
instance-attribute
Whitelist of IP addresses to which connections from a VM are allowed (backconnect)
payload_completion_event
instance-attribute
A regular expression for the raw DRAKVUF event, signaling the end of the useful work of the sample.
If this option is specified, sandbox-worker will calculate and log the PAYLOAD_SCAN_TIME metric.
disable_procdump_on_finish
instance-attribute
Disable the functionality of removing the memory dump from the sample at the end of the observation
skip_update_time
instance-attribute
Do not synchronize the time in the VM with the host
disable_manual_scan_events
instance-attribute
Do not send lifecycle notifications for manual behavioral analysis (console is ready, console is closed, etc.)
bootkitmon_boot_timeout
instance-attribute
The maximum waiting time for VM loading in seconds (90 seconds by default)
custom_procdump_exclude
instance-attribute
A file with a list of processes for which memory dumps should not be removed.
Each line in the file is a regular expression of the path to the process file on disk.
Read more about this file in documentation
custom_fileextractor_exclude
instance-attribute
A file with a list of files that should not be extracted
Each line in the file is a regular expression of the path to the file on disk.
Read more about this file in documentation
validate_plugins
instance-attribute
Check plugins for at least one event during the entire behavioral analysis
extra_vm_init_url
instance-attribute
Run this script in the VM immediately before launching the behavioral analysis.
It is useful, for example, to check the network during analysis.
procdump_lightweight_mode
instance-attribute
Use "light" memory dumps or not
custom_unimon_hooks
instance-attribute
Use a special format for hooks (not stable, will changed in the future)
custom_syscall_hooks
Set a custom list of system calls to intercept.
Be careful: hooking a frequently used syscall can slow down the analysis.
The full list of system calls:
- Linux - syscalls.mebeim.net
- Windows - j00ru.vexillium.org
Usecase
You need to check a unique sample, and the sandbox doesn't track the function of interest.
custom_dll_hooks
This is not well-documented, so use it with caution.
format:
AbortSystemShutdownA,log,lpMachineName:lpstr
AbortSystemShutdownW,log,lpMachineName:lpwstr
InitiateShutdownA,log,lpMachineName:lpstr,lpMessage:lpstr,dwGracePeriod:dword,dwShutdownFlags:shutdown_flags,dwReason:shutdown_reason
waveInOpen,log,phwi:lpvoid,uDeviceID:int,pwfx:lpvoid,dwCallback:lpvoid,dwInstance:lpvoid,fdwOpen:dword
Usecase
You need to check a unique sample, and the sandbox doesn't track the function of interest.
custom_procdump_exclude
Use regular expressions to specify processes that will be ignored during a memory dump.
To check that a regular expression is exactly right, use regex101.com and Golang flavor.
Usecase
Speeds up analysis when you need to ignore flooding processes.
custom_fileextractor_exclude
Use regular expressions to specify files that will be ignored during extraction.
Usecase
Speeds up analysis when you need to ignore flooding files.