sandbox-cli 0.2.31__tar.gz → 0.2.33__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.
Files changed (37) hide show
  1. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/PKG-INFO +1 -1
  2. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/pyproject.toml +1 -1
  3. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/scanner/__init__.py +19 -0
  4. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/scanner/advanced.py +4 -0
  5. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/scanner/rescan.py +3 -8
  6. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/.gitignore +0 -0
  7. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/LICENSE +0 -0
  8. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/NOTICE +0 -0
  9. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/README.md +0 -0
  10. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/__main__.py +0 -0
  11. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/__init__.py +0 -0
  12. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/downloader.py +0 -0
  13. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/images.py +0 -0
  14. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/reporter.py +0 -0
  15. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/rules/__init__.py +0 -0
  16. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/cli/unpack.py +0 -0
  17. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/console.py +0 -0
  18. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/internal/__init__.py +0 -0
  19. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/internal/config.py +0 -0
  20. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/internal/helpers.py +0 -0
  21. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/models/__init__.py +0 -0
  22. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/models/detections.py +0 -0
  23. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/models/sandbox_arguments.py +0 -0
  24. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/__init__.py +0 -0
  25. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/compiler/__init__.py +0 -0
  26. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/compiler/abc.py +0 -0
  27. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/compiler/docker.py +0 -0
  28. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/compiler/ssh.py +0 -0
  29. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/downloader/__init__.py +0 -0
  30. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/extractors.py +0 -0
  31. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/merge_dll_hooks.py +0 -0
  32. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/scanner/__init__.py +0 -0
  33. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/unpack/__init__.py +0 -0
  34. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/unpack/plugins/__init__.py +0 -0
  35. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/unpack/plugins/abc.py +0 -0
  36. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/sandbox_cli/utils/unpack/plugins/correlation.py +0 -0
  37. {sandbox_cli-0.2.31 → sandbox_cli-0.2.33}/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.31
3
+ Version: 0.2.33
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sandbox-cli"
3
- version = "0.2.31"
3
+ version = "0.2.33"
4
4
  description = "Command line tool for interaction with sandboxes"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -118,6 +118,14 @@ async def re_scan(
118
118
  negative="",
119
119
  ),
120
120
  ] = False,
121
+ timeout: Annotated[
122
+ int,
123
+ Parameter(
124
+ name=["--timeout", "-t"],
125
+ help="Response waiting time (increase this value if large traces are scanned)",
126
+ validator=validators.Number(gt=0, lt=3600),
127
+ ),
128
+ ] = 300,
121
129
  ) -> None:
122
130
  """
123
131
  Send traces to re-scan.
@@ -146,6 +154,7 @@ async def re_scan(
146
154
  unpack=unpack,
147
155
  debug=debug,
148
156
  open_browser=open_browser,
157
+ timeout=timeout,
149
158
  )
150
159
 
151
160
 
@@ -586,6 +595,15 @@ async def scan_new(
586
595
  negative="",
587
596
  ),
588
597
  ] = None,
598
+ outbound_connections: Annotated[
599
+ list[str] | None,
600
+ Parameter(
601
+ name=["--outbound-connections", "-oc"],
602
+ help="Whitelist of IP addresses to which connections from a VM are allowed (backconnect)",
603
+ group="Sandbox Options",
604
+ negative="",
605
+ ),
606
+ ] = None,
589
607
  all: Annotated[
590
608
  bool,
591
609
  Parameter(
@@ -725,4 +743,5 @@ async def scan_new(
725
743
  procdumps=procdumps,
726
744
  decompress=decompress,
727
745
  open_browser=open_browser,
746
+ outbound_connections=outbound_connections,
728
747
  )
@@ -81,6 +81,7 @@ async def _prepare_sandbox_new_scan(
81
81
  disable_clicker: bool,
82
82
  skip_sample_run: bool,
83
83
  vnc_mode: VNCMode,
84
+ outbound_connections: list[str] | None,
84
85
  ) -> tuple[Sandbox, SandboxOptionsAdvanced, set[VMImage | str]]:
85
86
  sandbox = Sandbox(key=sandbox_key)
86
87
 
@@ -161,6 +162,7 @@ async def _prepare_sandbox_new_scan(
161
162
  sandbox_options.custom_command = custom_command
162
163
 
163
164
  # add extra options
165
+ sandbox_options.debug_options["allowed_outbound_connections"] = outbound_connections or []
164
166
  sandbox_options.procdump_new_processes_on_finish = not no_procdumps_on_finish
165
167
  sandbox_options.bootkitmon = bootkitmon
166
168
  sandbox_options.analysis_duration_bootkitmon = bootkitmon_duration
@@ -206,6 +208,7 @@ async def scan_internal_advanced(
206
208
  procdumps: bool,
207
209
  decompress: bool,
208
210
  open_browser: bool,
211
+ outbound_connections: list[str] | None,
209
212
  ) -> None:
210
213
  key = get_key_by_name(key_name)
211
214
  sandbox_sem = asyncio.Semaphore(value=key.max_workers)
@@ -355,6 +358,7 @@ async def scan_internal_advanced(
355
358
  disable_clicker,
356
359
  skip_sample_run,
357
360
  vnc_mode,
361
+ outbound_connections,
358
362
  )
359
363
  max_image_length = max(len(x) for x in images)
360
364
  for i, image_id in enumerate(images):
@@ -98,6 +98,7 @@ async def rescan_internal(
98
98
  unpack: bool,
99
99
  debug: bool,
100
100
  open_browser: bool,
101
+ timeout: int,
101
102
  ) -> None:
102
103
  key = get_key_by_name(key_name)
103
104
  sandbox_sem = asyncio.Semaphore(value=key.max_workers)
@@ -128,19 +129,13 @@ async def rescan_internal(
128
129
  async with sandbox_sem:
129
130
  task_id = progress.add_task(description="Creating task", idx=idx, url="...")
130
131
 
131
- wait_time = (
132
- round(sandbox_options.sandbox.analysis_duration * 1.5)
133
- if sandbox_options.sandbox.analysis_duration > 70
134
- else 70
135
- )
136
-
137
132
  try:
138
133
  rescan_result = await sandbox.create_rescan(
139
134
  drakvuf_trace,
140
135
  tcpdump_pcap,
141
136
  options=sandbox_options,
142
137
  rules=None,
143
- read_timeout=wait_time,
138
+ read_timeout=timeout,
144
139
  )
145
140
  except SandboxUploadException as e:
146
141
  console.error(f"[yellow]{trace}[/] • an error occurred when uploading a file to the server • {e}")
@@ -162,7 +157,7 @@ async def rescan_internal(
162
157
  description=f"Waiting for full report for [yellow]{trace.name}[/]",
163
158
  url=formatted_link,
164
159
  )
165
- if not (awaited_report := await sandbox.wait_for_report(rescan_result, wait_time)):
160
+ if not (awaited_report := await sandbox.wait_for_report(rescan_result, timeout)):
166
161
  console.error(f"Rescan failed for [yellow]{trace.name}[/] • {formatted_link} • {rescan_result}")
167
162
  progress.remove_task(task_id)
168
163
  return
File without changes
File without changes
File without changes
File without changes