Skip to content

Collect Capability Manager History directory #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from dissect.target.helpers import fsutil
from dissect.target.loaders.local import _windows_get_devices
from dissect.target.plugins.apps.webserver import iis
from dissect.target.plugins.os.windows.cam import CamPlugin
from dissect.target.plugins.os.windows.log import evt, evtx
from dissect.target.tools.utils import args_to_uri
from dissect.util.stream import RunlistStream
Expand Down Expand Up @@ -568,6 +569,21 @@
return spec


@register_module("--cam-history")
class CamHistory(Module):
DESC = "Capability Manager History Database"

@classmethod
def get_spec_additions(cls, target: Target, cli_args: argparse.Namespace) -> Iterator[tuple]:
spec = set()

Check warning on line 578 in acquire/acquire.py

View check run for this annotation

Codecov / codecov/patch

acquire/acquire.py#L578

Added line #L578 was not covered by tests

cam_history_db_file = CamPlugin(target)._find_db()
if cam_history_db_file and cam_history_db_file.exists():

Check warning on line 581 in acquire/acquire.py

View check run for this annotation

Codecov / codecov/patch

acquire/acquire.py#L580-L581

Added lines #L580 - L581 were not covered by tests
# Collect all files from the db path, including .db-wal and .db-shm files.
spec.add(("dir", cam_history_db_file.parent))
return spec

Check warning on line 584 in acquire/acquire.py

View check run for this annotation

Codecov / codecov/patch

acquire/acquire.py#L583-L584

Added lines #L583 - L584 were not covered by tests


@register_module("-e", "--eventlogs")
class EventLogs(Module):
DESC = "event logs"
Expand Down Expand Up @@ -1992,6 +2008,7 @@
ActiveDirectory,
RemoteAccess,
ActivitiesCache,
CamHistory,
)
FULL = (
*DEFAULT,
Expand Down
Loading