sandbox-cli 0.2.42__tar.gz → 0.2.44__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.42 → sandbox_cli-0.2.44}/PKG-INFO +4 -4
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/pyproject.toml +4 -4
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/__init__.py +4 -1
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/scanner/__init__.py +20 -1
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/scanner/advanced.py +15 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/unpack/plugins/correlation.py +3 -3
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/unpack/plugins/sort_by_plugins.py +1 -1
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/.gitignore +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/LICENSE +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/NOTICE +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/README.md +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/__main__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/downloader.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/images.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/reporter.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/rules/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/cli/unpack.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/console.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/internal/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/internal/config.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/internal/helpers.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/models/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/models/detections.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/models/sandbox_arguments.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/compiler/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/compiler/abc.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/compiler/docker.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/compiler/ssh.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/downloader/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/extractors.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/merge_dll_hooks.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/scanner/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/scanner/rescan.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/unpack/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/unpack/plugins/__init__.py +0 -0
- {sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/unpack/plugins/abc.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.44
|
|
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
|
|
@@ -14,10 +14,10 @@ Requires-Python: >=3.11
|
|
|
14
14
|
Requires-Dist: aiofiles>=24.1.0
|
|
15
15
|
Requires-Dist: asyncssh>=2.21.1
|
|
16
16
|
Requires-Dist: colorama>=0.4.6
|
|
17
|
-
Requires-Dist: cryptography>=46.0.
|
|
18
|
-
Requires-Dist: cyclopts>=
|
|
17
|
+
Requires-Dist: cryptography>=46.0.2
|
|
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.44"
|
|
4
4
|
description = "Command line tool for interaction with sandboxes"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -11,10 +11,10 @@ dependencies = [
|
|
|
11
11
|
"aiofiles>=24.1.0",
|
|
12
12
|
"asyncssh>=2.21.1",
|
|
13
13
|
"colorama>=0.4.6",
|
|
14
|
-
"cryptography>=46.0.
|
|
15
|
-
"cyclopts>=
|
|
14
|
+
"cryptography>=46.0.2",
|
|
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",
|
|
@@ -10,7 +10,8 @@ from sandbox_cli.cli.unpack import unpack_logs
|
|
|
10
10
|
from sandbox_cli.console import console
|
|
11
11
|
from sandbox_cli.internal.config import configpath, settings
|
|
12
12
|
|
|
13
|
-
init()
|
|
13
|
+
init() # colorama stuff for working on windows
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
def get_version() -> str:
|
|
16
17
|
import importlib.metadata
|
|
@@ -32,6 +33,8 @@ app = App(
|
|
|
32
33
|
console=console,
|
|
33
34
|
)
|
|
34
35
|
|
|
36
|
+
app.register_install_completion_command(add_to_startup=False)
|
|
37
|
+
|
|
35
38
|
app.command(name=["conv", "unpack"])(unpack_logs)
|
|
36
39
|
app.command(name="report")(generate_report)
|
|
37
40
|
app.command(name="browser")(open_browser)
|
|
@@ -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,14 @@ 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,
|
|
509
517
|
custom_command: Annotated[
|
|
510
518
|
str | None,
|
|
511
519
|
Parameter(
|
|
@@ -540,6 +548,15 @@ async def scan_new(
|
|
|
540
548
|
negative="",
|
|
541
549
|
),
|
|
542
550
|
] = False,
|
|
551
|
+
disable_lightweight_dumps: Annotated[
|
|
552
|
+
bool,
|
|
553
|
+
Parameter(
|
|
554
|
+
name=["--disable-lightweight-dumps", "-dl"],
|
|
555
|
+
help="Disable lightweight memory dumps (mostly for testing purposes)",
|
|
556
|
+
group="Sandbox Options",
|
|
557
|
+
negative="",
|
|
558
|
+
),
|
|
559
|
+
] = False,
|
|
543
560
|
bootkitmon: Annotated[
|
|
544
561
|
bool,
|
|
545
562
|
Parameter(
|
|
@@ -729,12 +746,14 @@ async def scan_new(
|
|
|
729
746
|
is_local=is_local,
|
|
730
747
|
analysis_duration=analysis_duration,
|
|
731
748
|
syscall_hooks=syscall_hooks,
|
|
749
|
+
unimon_hooks=unimon_hooks,
|
|
732
750
|
custom_command=custom_command,
|
|
733
751
|
dll_hooks_dir=dll_hooks_dir,
|
|
734
752
|
fake_name=fake_name,
|
|
735
753
|
unpack=unpack,
|
|
736
754
|
priority=priority,
|
|
737
755
|
no_procdumps_on_finish=no_procdumps_on_finish,
|
|
756
|
+
disable_lightweight_dumps=disable_lightweight_dumps,
|
|
738
757
|
bootkitmon=bootkitmon,
|
|
739
758
|
bootkitmon_duration=bootkitmon_duration,
|
|
740
759
|
mitm_disabled=mitm_disabled,
|
|
@@ -91,9 +91,11 @@ 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,
|
|
95
96
|
custom_command: str | None,
|
|
96
97
|
no_procdumps_on_finish: bool,
|
|
98
|
+
disable_lightweight_dumps: bool,
|
|
97
99
|
bootkitmon: bool,
|
|
98
100
|
bootkitmon_duration: int,
|
|
99
101
|
mitm_disabled: bool,
|
|
@@ -155,6 +157,8 @@ async def _prepare_sandbox_new_scan(
|
|
|
155
157
|
# all debug options available in library
|
|
156
158
|
sandbox_options.debug_options["save_debug_files"] = True
|
|
157
159
|
sandbox_options.debug_options["extract_crashdumps"] = True
|
|
160
|
+
# by default we want to use lightweight memory dumps
|
|
161
|
+
sandbox_options.debug_options["procdump_lightweight_mode"] = not disable_lightweight_dumps
|
|
158
162
|
|
|
159
163
|
# process custom options
|
|
160
164
|
compiled_rules = await _get_compiled_rules(rules_dir=rules_dir, is_local=is_local, progress=progress)
|
|
@@ -170,6 +174,13 @@ async def _prepare_sandbox_new_scan(
|
|
|
170
174
|
syscall_hooks_uri = (await sandbox.api.upload_file(data)).data.file_uri
|
|
171
175
|
sandbox_options.debug_options["custom_syscall_hooks"] = syscall_hooks_uri
|
|
172
176
|
|
|
177
|
+
if unimon_hooks:
|
|
178
|
+
progress.console.print(f"{console.INFO} Upload unimon hooks: {unimon_hooks}")
|
|
179
|
+
async with aiofiles.open(unimon_hooks, mode="rb") as fd:
|
|
180
|
+
data = await fd.read()
|
|
181
|
+
unimon_hooks_uri = (await sandbox.api.upload_file(data)).data.file_uri
|
|
182
|
+
sandbox_options.debug_options["custom_unimon_hooks"] = unimon_hooks_uri
|
|
183
|
+
|
|
173
184
|
if dll_hooks_dir:
|
|
174
185
|
progress.console.print(f"{console.INFO} Upload dll hooks: {dll_hooks_dir}")
|
|
175
186
|
data = merge_dll_hooks(Path(dll_hooks_dir))
|
|
@@ -205,12 +216,14 @@ async def scan_internal_advanced(
|
|
|
205
216
|
is_local: bool,
|
|
206
217
|
analysis_duration: int,
|
|
207
218
|
syscall_hooks: Path | None,
|
|
219
|
+
unimon_hooks: Path | None,
|
|
208
220
|
dll_hooks_dir: Path | None,
|
|
209
221
|
custom_command: str | None,
|
|
210
222
|
fake_name: str | None,
|
|
211
223
|
unpack: bool,
|
|
212
224
|
priority: int,
|
|
213
225
|
no_procdumps_on_finish: bool,
|
|
226
|
+
disable_lightweight_dumps: bool,
|
|
214
227
|
bootkitmon: bool,
|
|
215
228
|
bootkitmon_duration: int,
|
|
216
229
|
mitm_disabled: bool,
|
|
@@ -383,9 +396,11 @@ async def scan_internal_advanced(
|
|
|
383
396
|
is_local,
|
|
384
397
|
analysis_duration,
|
|
385
398
|
syscall_hooks,
|
|
399
|
+
unimon_hooks,
|
|
386
400
|
dll_hooks_dir,
|
|
387
401
|
custom_command,
|
|
388
402
|
no_procdumps_on_finish,
|
|
403
|
+
disable_lightweight_dumps,
|
|
389
404
|
bootkitmon,
|
|
390
405
|
bootkitmon_duration,
|
|
391
406
|
mitm_disabled,
|
|
@@ -35,16 +35,16 @@ class CorrelatedRules(BasePlugin):
|
|
|
35
35
|
pass
|
|
36
36
|
|
|
37
37
|
if len(malware) > 0:
|
|
38
|
-
with open(
|
|
38
|
+
with open(base_path / "malware.log", "w", encoding="utf-8") as fd:
|
|
39
39
|
for line in malware:
|
|
40
40
|
fd.write(line)
|
|
41
41
|
|
|
42
42
|
for key, lines in silent.items():
|
|
43
|
-
with open(f"{
|
|
43
|
+
with open(base_path / f"{key}.silent.log", "w", encoding="utf-8") as fd:
|
|
44
44
|
for line in lines:
|
|
45
45
|
fd.write(line)
|
|
46
46
|
|
|
47
47
|
for key, lines in suspicious.items():
|
|
48
|
-
with open(f"{
|
|
48
|
+
with open(base_path / f"{key}.suspicious.log", "w", encoding="utf-8") as fd:
|
|
49
49
|
for line in lines:
|
|
50
50
|
fd.write(line)
|
{sandbox_cli-0.2.42 → sandbox_cli-0.2.44}/sandbox_cli/utils/unpack/plugins/sort_by_plugins.py
RENAMED
|
@@ -23,6 +23,6 @@ class SortByPlugins(BasePlugin):
|
|
|
23
23
|
plugins[data["plugin"]].append(line)
|
|
24
24
|
|
|
25
25
|
for plugin, lines in plugins.items():
|
|
26
|
-
with open(f"{
|
|
26
|
+
with open(base_path / f"{plugin}.log", "w", encoding="utf-8") as fd:
|
|
27
27
|
for line in lines:
|
|
28
28
|
fd.write(line)
|
|
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
|