Skip to content
Merged
Show file tree
Hide file tree
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
295 changes: 145 additions & 150 deletions analyzer/windows/modules/auxiliary/evtx.py

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions modules/processing/analysisinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,15 @@ def get_package(self):
raise CuckooProcessingError(f"Error opening {self.log_path}: {e}") from e
else:
with suppress(Exception):
idx = analysis_log.index('INFO: Automatically selected analysis package "')
package = analysis_log[idx + 47 :].split('"', 1)[0]
# Try both Windows and Linux analyzer log formats
for marker in (
'INFO: analysis package selected: "',
'INFO: Automatically selected analysis package "',
):
idx = analysis_log.find(marker)
if idx != -1:
package = analysis_log[idx + len(marker) :].split('"', 1)[0]
break
return package

def run(self):
Expand Down
14 changes: 14 additions & 0 deletions systemd/cape-sigma-update.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Update CAPE Sigma rules via Zircolite
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
User=cape
Group=cape
WorkingDirectory=/opt/zircolite
ExecStart=/etc/poetry/bin/poetry --directory /opt/CAPEv2/ run python zircolite.py --update-rules
ExecStartPost=/bin/bash -c 'for f in /opt/zircolite/rules/*.json; do cp "$f" "/opt/CAPEv2/data/sigma/$(basename "$f")"; done'
ExecStartPost=+/bin/systemctl restart cape-processor.service
TimeoutStartSec=300
9 changes: 9 additions & 0 deletions systemd/cape-sigma-update.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Daily CAPE Sigma rules update

[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true

[Install]
WantedBy=timers.target
2 changes: 2 additions & 0 deletions web/analysis/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
re_path(r"^page/(?P<page>\d+)/$", views.index, name="index"),
re_path(r"^(?P<task_id>\d+)/$", views.report, name="report"),
re_path(r"^load_files/(?P<task_id>\d+)/(?P<category>\w+)/$", views.load_files, name="load_files"),
re_path(r"^load_evtx_channel/(?P<task_id>\d+)/$", views.load_evtx_channel, name="load_evtx_channel"),
re_path(r"^load_evtx_channel_count/(?P<task_id>\d+)/$", views.load_evtx_channel_count, name="load_evtx_channel_count"),
re_path(r"^surialert/(?P<task_id>\d+)/$", views.surialert, name="surialert"),
re_path(r"^surihttp/(?P<task_id>\d+)/$", views.surihttp, name="surihttp"),
re_path(r"^suritls/(?P<task_id>\d+)/$", views.suritls, name="suritls"),
Expand Down
Loading
Loading