sandbox-cli 0.2.45__tar.gz → 0.2.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/PKG-INFO +1 -1
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/pyproject.toml +1 -1
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/scanner/__init__.py +9 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/scanner/advanced.py +7 -1
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/scanner/rescan.py +4 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/.gitignore +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/LICENSE +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/NOTICE +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/README.md +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/__main__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/downloader.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/images.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/reporter.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/rules/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/cli/unpack.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/console.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/internal/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/internal/config.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/internal/helpers.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/models/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/models/detections.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/models/sandbox_arguments.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/compiler/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/compiler/abc.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/compiler/docker.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/compiler/ssh.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/downloader/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/extractors.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/merge_dll_hooks.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/scanner/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/unpack/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/unpack/plugins/__init__.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/unpack/plugins/abc.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/unpack/plugins/correlation.py +0 -0
- {sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/unpack/plugins/sort_by_plugins.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sandbox-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.46
|
|
4
4
|
Summary: Command line tool for interaction with sandboxes
|
|
5
5
|
Project-URL: Homepage, https://github.com/Security-Experts-Community/sandbox-cli
|
|
6
6
|
Project-URL: Documentation, https://security-experts-community.github.io/sandbox-cli
|
|
@@ -707,6 +707,14 @@ async def scan_new(
|
|
|
707
707
|
negative="",
|
|
708
708
|
),
|
|
709
709
|
] = False,
|
|
710
|
+
preserve_filename: Annotated[
|
|
711
|
+
bool,
|
|
712
|
+
Parameter(
|
|
713
|
+
name=["--preserve-filename", "-pf"],
|
|
714
|
+
help="Do not change filename for analysis. \nWhen set to false (default behaviour): local/path/to/malware.exe[_~] -> sandbox/guest/os/malware.exe \nWhen set to true name will remain unchanged.",
|
|
715
|
+
negative="",
|
|
716
|
+
),
|
|
717
|
+
] = False,
|
|
710
718
|
) -> None:
|
|
711
719
|
"""
|
|
712
720
|
Send files to scan with the sandbox (advanced scan).
|
|
@@ -780,5 +788,6 @@ async def scan_new(
|
|
|
780
788
|
procdumps=procdumps,
|
|
781
789
|
decompress=decompress,
|
|
782
790
|
open_browser=open_browser,
|
|
791
|
+
preserve_filename=preserve_filename,
|
|
783
792
|
outbound_connections=outbound_connections,
|
|
784
793
|
)
|
|
@@ -39,6 +39,7 @@ from sandbox_cli.utils.merge_dll_hooks import merge_dll_hooks
|
|
|
39
39
|
from sandbox_cli.utils.unpack import Unpack
|
|
40
40
|
|
|
41
41
|
DELIMETER = "\n"
|
|
42
|
+
SAFE_SUFFIXES = "_~"
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
async def _get_compiled_rules(progress: Progress, rules_dir: Path | None, is_local: bool) -> bytes | None:
|
|
@@ -250,6 +251,7 @@ async def scan_internal_advanced(
|
|
|
250
251
|
procdumps: bool,
|
|
251
252
|
decompress: bool,
|
|
252
253
|
open_browser: bool,
|
|
254
|
+
preserve_filename: bool,
|
|
253
255
|
outbound_connections: list[str] | None,
|
|
254
256
|
) -> None:
|
|
255
257
|
key = get_key_by_name(key_name)
|
|
@@ -291,9 +293,13 @@ async def scan_internal_advanced(
|
|
|
291
293
|
wait_time = wait_timeout
|
|
292
294
|
|
|
293
295
|
try:
|
|
296
|
+
guest_filename = file_path.name
|
|
297
|
+
if not preserve_filename:
|
|
298
|
+
guest_filename = guest_filename.rstrip(SAFE_SUFFIXES)
|
|
299
|
+
|
|
294
300
|
scan_result = await sandbox.create_advanced_scan(
|
|
295
301
|
file_path,
|
|
296
|
-
file_name=fake_name or
|
|
302
|
+
file_name=fake_name or guest_filename,
|
|
297
303
|
extra_files=extra_files,
|
|
298
304
|
async_result=True,
|
|
299
305
|
priority=priority,
|
|
@@ -76,6 +76,10 @@ async def _prepare_rescan_options(
|
|
|
76
76
|
|
|
77
77
|
sandbox_options = SandboxBaseScanTaskRequest.Options(analysis_depth=2, passwords_for_unpack=settings.passwords)
|
|
78
78
|
|
|
79
|
+
# some enabled options by default
|
|
80
|
+
# all debug options available in library
|
|
81
|
+
sandbox_options.debug_options["save_debug_files"] = True
|
|
82
|
+
|
|
79
83
|
# process custom options
|
|
80
84
|
compiled_rules = await _get_compiled_rules(rules_dir=rules_dir, is_local=is_local, progress=progress)
|
|
81
85
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sandbox_cli-0.2.45 → sandbox_cli-0.2.46}/sandbox_cli/utils/unpack/plugins/sort_by_plugins.py
RENAMED
|
File without changes
|