sandbox-cli 0.2.43__tar.gz → 0.2.45__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.43 → sandbox_cli-0.2.45}/PKG-INFO +2 -2
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/pyproject.toml +2 -2
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/scanner/__init__.py +29 -1
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/scanner/advanced.py +42 -17
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/.gitignore +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/LICENSE +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/NOTICE +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/README.md +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/__main__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/downloader.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/images.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/reporter.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/rules/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/cli/unpack.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/console.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/internal/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/internal/config.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/internal/helpers.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/models/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/models/detections.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/models/sandbox_arguments.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/compiler/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/compiler/abc.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/compiler/docker.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/compiler/ssh.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/downloader/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/extractors.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/merge_dll_hooks.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/scanner/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/scanner/rescan.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/unpack/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/unpack/plugins/__init__.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/unpack/plugins/abc.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/unpack/plugins/correlation.py +0 -0
- {sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/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.45
|
|
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
|
|
@@ -17,7 +17,7 @@ Requires-Dist: colorama>=0.4.6
|
|
|
17
17
|
Requires-Dist: cryptography>=46.0.2
|
|
18
18
|
Requires-Dist: cyclopts>=4.2.5
|
|
19
19
|
Requires-Dist: docker>=7.1.0
|
|
20
|
-
Requires-Dist: ptsandbox>=5.0.
|
|
20
|
+
Requires-Dist: ptsandbox>=5.0.8
|
|
21
21
|
Requires-Dist: pyzipper>=0.3.6
|
|
22
22
|
Requires-Dist: rich>=14.1.0
|
|
23
23
|
Requires-Dist: zstandard>=0.23.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sandbox-cli"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.45"
|
|
4
4
|
description = "Command line tool for interaction with sandboxes"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -14,7 +14,7 @@ dependencies = [
|
|
|
14
14
|
"cryptography>=46.0.2",
|
|
15
15
|
"cyclopts>=4.2.5",
|
|
16
16
|
"docker>=7.1.0",
|
|
17
|
-
"ptsandbox>=5.0.
|
|
17
|
+
"ptsandbox>=5.0.8",
|
|
18
18
|
"pyzipper>=0.3.6",
|
|
19
19
|
"rich>=14.1.0",
|
|
20
20
|
"zstandard>=0.23.0",
|
|
@@ -494,7 +494,7 @@ async def scan_new(
|
|
|
494
494
|
Path | None,
|
|
495
495
|
Parameter(
|
|
496
496
|
name=["--syscall-hooks", "-s"],
|
|
497
|
-
help="Path to
|
|
497
|
+
help="Path to file with syscall hooks (file with syscall names splitted by newline)",
|
|
498
498
|
group="Sandbox Options",
|
|
499
499
|
),
|
|
500
500
|
] = None,
|
|
@@ -506,6 +506,22 @@ async def scan_new(
|
|
|
506
506
|
group="Sandbox Options",
|
|
507
507
|
),
|
|
508
508
|
] = None,
|
|
509
|
+
unimon_hooks: Annotated[
|
|
510
|
+
Path | None,
|
|
511
|
+
Parameter(
|
|
512
|
+
name=["--unimon-hooks", "-u"],
|
|
513
|
+
help="Path to file with unimon hooks",
|
|
514
|
+
group="Sandbox Options",
|
|
515
|
+
),
|
|
516
|
+
] = None,
|
|
517
|
+
fileextractor_excludes: Annotated[
|
|
518
|
+
Path | None,
|
|
519
|
+
Parameter(
|
|
520
|
+
name=["--fileextractor-excludes", "-fe"],
|
|
521
|
+
help="Path to file with fileextractor excludes",
|
|
522
|
+
group="Sandbox Options",
|
|
523
|
+
),
|
|
524
|
+
] = None,
|
|
509
525
|
custom_command: Annotated[
|
|
510
526
|
str | None,
|
|
511
527
|
Parameter(
|
|
@@ -540,6 +556,15 @@ async def scan_new(
|
|
|
540
556
|
negative="",
|
|
541
557
|
),
|
|
542
558
|
] = False,
|
|
559
|
+
disable_lightweight_dumps: Annotated[
|
|
560
|
+
bool,
|
|
561
|
+
Parameter(
|
|
562
|
+
name=["--disable-lightweight-dumps", "-dl"],
|
|
563
|
+
help="Disable lightweight memory dumps (mostly for testing purposes)",
|
|
564
|
+
group="Sandbox Options",
|
|
565
|
+
negative="",
|
|
566
|
+
),
|
|
567
|
+
] = False,
|
|
543
568
|
bootkitmon: Annotated[
|
|
544
569
|
bool,
|
|
545
570
|
Parameter(
|
|
@@ -729,12 +754,15 @@ async def scan_new(
|
|
|
729
754
|
is_local=is_local,
|
|
730
755
|
analysis_duration=analysis_duration,
|
|
731
756
|
syscall_hooks=syscall_hooks,
|
|
757
|
+
unimon_hooks=unimon_hooks,
|
|
732
758
|
custom_command=custom_command,
|
|
733
759
|
dll_hooks_dir=dll_hooks_dir,
|
|
760
|
+
fileextractor_excludes=fileextractor_excludes,
|
|
734
761
|
fake_name=fake_name,
|
|
735
762
|
unpack=unpack,
|
|
736
763
|
priority=priority,
|
|
737
764
|
no_procdumps_on_finish=no_procdumps_on_finish,
|
|
765
|
+
disable_lightweight_dumps=disable_lightweight_dumps,
|
|
738
766
|
bootkitmon=bootkitmon,
|
|
739
767
|
bootkitmon_duration=bootkitmon_duration,
|
|
740
768
|
mitm_disabled=mitm_disabled,
|
|
@@ -91,9 +91,12 @@ async def _prepare_sandbox_new_scan(
|
|
|
91
91
|
is_local: bool,
|
|
92
92
|
analysis_duration: int,
|
|
93
93
|
syscall_hooks: Path | None,
|
|
94
|
+
unimon_hooks: Path | None,
|
|
94
95
|
dll_hooks_dir: Path | None,
|
|
96
|
+
filextractor_excludes: Path | None,
|
|
95
97
|
custom_command: str | None,
|
|
96
98
|
no_procdumps_on_finish: bool,
|
|
99
|
+
disable_lightweight_dumps: bool,
|
|
97
100
|
bootkitmon: bool,
|
|
98
101
|
bootkitmon_duration: int,
|
|
99
102
|
mitm_disabled: bool,
|
|
@@ -155,6 +158,8 @@ async def _prepare_sandbox_new_scan(
|
|
|
155
158
|
# all debug options available in library
|
|
156
159
|
sandbox_options.debug_options["save_debug_files"] = True
|
|
157
160
|
sandbox_options.debug_options["extract_crashdumps"] = True
|
|
161
|
+
# by default we want to use lightweight memory dumps
|
|
162
|
+
sandbox_options.debug_options["procdump_lightweight_mode"] = not disable_lightweight_dumps
|
|
158
163
|
|
|
159
164
|
# process custom options
|
|
160
165
|
compiled_rules = await _get_compiled_rules(rules_dir=rules_dir, is_local=is_local, progress=progress)
|
|
@@ -170,12 +175,26 @@ async def _prepare_sandbox_new_scan(
|
|
|
170
175
|
syscall_hooks_uri = (await sandbox.api.upload_file(data)).data.file_uri
|
|
171
176
|
sandbox_options.debug_options["custom_syscall_hooks"] = syscall_hooks_uri
|
|
172
177
|
|
|
178
|
+
if unimon_hooks:
|
|
179
|
+
progress.console.print(f"{console.INFO} Upload unimon hooks: {unimon_hooks}")
|
|
180
|
+
async with aiofiles.open(unimon_hooks, mode="rb") as fd:
|
|
181
|
+
data = await fd.read()
|
|
182
|
+
unimon_hooks_uri = (await sandbox.api.upload_file(data)).data.file_uri
|
|
183
|
+
sandbox_options.debug_options["custom_unimon_hooks"] = unimon_hooks_uri
|
|
184
|
+
|
|
173
185
|
if dll_hooks_dir:
|
|
174
186
|
progress.console.print(f"{console.INFO} Upload dll hooks: {dll_hooks_dir}")
|
|
175
187
|
data = merge_dll_hooks(Path(dll_hooks_dir))
|
|
176
188
|
dll_hooks_uri = (await sandbox.api.upload_file(data)).data.file_uri
|
|
177
189
|
sandbox_options.debug_options["custom_dll_hooks"] = dll_hooks_uri
|
|
178
190
|
|
|
191
|
+
if filextractor_excludes:
|
|
192
|
+
progress.console.print(f"{console.INFO} Upload fileextractor excludes: {filextractor_excludes}")
|
|
193
|
+
async with aiofiles.open(filextractor_excludes, mode="rb") as fd:
|
|
194
|
+
data = await fd.read()
|
|
195
|
+
fileextractor_excludes_uri = (await sandbox.api.upload_file(data)).data.file_uri
|
|
196
|
+
sandbox_options.debug_options["custom_fileextractor_exclude"] = fileextractor_excludes_uri
|
|
197
|
+
|
|
179
198
|
if custom_command:
|
|
180
199
|
progress.console.print(f"{console.INFO} Commandline: {custom_command}")
|
|
181
200
|
sandbox_options.custom_command = custom_command
|
|
@@ -205,12 +224,15 @@ async def scan_internal_advanced(
|
|
|
205
224
|
is_local: bool,
|
|
206
225
|
analysis_duration: int,
|
|
207
226
|
syscall_hooks: Path | None,
|
|
227
|
+
unimon_hooks: Path | None,
|
|
208
228
|
dll_hooks_dir: Path | None,
|
|
229
|
+
fileextractor_excludes: Path | None,
|
|
209
230
|
custom_command: str | None,
|
|
210
231
|
fake_name: str | None,
|
|
211
232
|
unpack: bool,
|
|
212
233
|
priority: int,
|
|
213
234
|
no_procdumps_on_finish: bool,
|
|
235
|
+
disable_lightweight_dumps: bool,
|
|
214
236
|
bootkitmon: bool,
|
|
215
237
|
bootkitmon_duration: int,
|
|
216
238
|
mitm_disabled: bool,
|
|
@@ -376,23 +398,26 @@ async def scan_internal_advanced(
|
|
|
376
398
|
tasks: list[Coroutine[Any, Any, None]] = []
|
|
377
399
|
with progress:
|
|
378
400
|
sandbox, sandbox_options, images = await _prepare_sandbox_new_scan(
|
|
379
|
-
progress,
|
|
380
|
-
scan_images,
|
|
381
|
-
rules_dir,
|
|
382
|
-
key,
|
|
383
|
-
is_local,
|
|
384
|
-
analysis_duration,
|
|
385
|
-
syscall_hooks,
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
401
|
+
progress=progress,
|
|
402
|
+
scan_images=scan_images,
|
|
403
|
+
rules_dir=rules_dir,
|
|
404
|
+
sandbox_key=key,
|
|
405
|
+
is_local=is_local,
|
|
406
|
+
analysis_duration=analysis_duration,
|
|
407
|
+
syscall_hooks=syscall_hooks,
|
|
408
|
+
unimon_hooks=unimon_hooks,
|
|
409
|
+
dll_hooks_dir=dll_hooks_dir,
|
|
410
|
+
filextractor_excludes=fileextractor_excludes,
|
|
411
|
+
custom_command=custom_command,
|
|
412
|
+
no_procdumps_on_finish=no_procdumps_on_finish,
|
|
413
|
+
disable_lightweight_dumps=disable_lightweight_dumps,
|
|
414
|
+
bootkitmon=bootkitmon,
|
|
415
|
+
bootkitmon_duration=bootkitmon_duration,
|
|
416
|
+
mitm_disabled=mitm_disabled,
|
|
417
|
+
disable_clicker=disable_clicker,
|
|
418
|
+
skip_sample_run=skip_sample_run,
|
|
419
|
+
vnc_mode=vnc_mode,
|
|
420
|
+
outbound_connections=outbound_connections,
|
|
396
421
|
)
|
|
397
422
|
max_image_length = max(len(x) for x in images)
|
|
398
423
|
for i, image_id in enumerate(images):
|
|
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
|
|
File without changes
|
{sandbox_cli-0.2.43 → sandbox_cli-0.2.45}/sandbox_cli/utils/unpack/plugins/sort_by_plugins.py
RENAMED
|
File without changes
|