Skip to content

Commit 0cdbc7a

Browse files
authored
Merge pull request #2939 from wmetcalf/feat/sigma-evtx-web
feat: enhanced EVTX collection and event logs web UI with Sigma support
2 parents 0e35d16 + 7ef1457 commit 0cdbc7a

9 files changed

Lines changed: 1028 additions & 160 deletions

File tree

analyzer/windows/modules/auxiliary/evtx.py

Lines changed: 145 additions & 150 deletions
Large diffs are not rendered by default.

modules/processing/analysisinfo.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,15 @@ def get_package(self):
6868
raise CuckooProcessingError(f"Error opening {self.log_path}: {e}") from e
6969
else:
7070
with suppress(Exception):
71-
idx = analysis_log.index('INFO: Automatically selected analysis package "')
72-
package = analysis_log[idx + 47 :].split('"', 1)[0]
71+
# Try both Windows and Linux analyzer log formats
72+
for marker in (
73+
'INFO: analysis package selected: "',
74+
'INFO: Automatically selected analysis package "',
75+
):
76+
idx = analysis_log.find(marker)
77+
if idx != -1:
78+
package = analysis_log[idx + len(marker) :].split('"', 1)[0]
79+
break
7380
return package
7481

7582
def run(self):

systemd/cape-sigma-update.service

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=Update CAPE Sigma rules via Zircolite
3+
After=network-online.target
4+
Wants=network-online.target
5+
6+
[Service]
7+
Type=oneshot
8+
User=cape
9+
Group=cape
10+
WorkingDirectory=/opt/zircolite
11+
ExecStart=/etc/poetry/bin/poetry --directory /opt/CAPEv2/ run python zircolite.py --update-rules
12+
ExecStartPost=/bin/bash -c 'for f in /opt/zircolite/rules/*.json; do cp "$f" "/opt/CAPEv2/data/sigma/$(basename "$f")"; done'
13+
ExecStartPost=+/bin/systemctl restart cape-processor.service
14+
TimeoutStartSec=300

systemd/cape-sigma-update.timer

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
Description=Daily CAPE Sigma rules update
3+
4+
[Timer]
5+
OnCalendar=*-*-* 03:00:00
6+
Persistent=true
7+
8+
[Install]
9+
WantedBy=timers.target

web/analysis/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
re_path(r"^page/(?P<page>\d+)/$", views.index, name="index"),
1212
re_path(r"^(?P<task_id>\d+)/$", views.report, name="report"),
1313
re_path(r"^load_files/(?P<task_id>\d+)/(?P<category>\w+)/$", views.load_files, name="load_files"),
14+
re_path(r"^load_evtx_channel/(?P<task_id>\d+)/$", views.load_evtx_channel, name="load_evtx_channel"),
15+
re_path(r"^load_evtx_channel_count/(?P<task_id>\d+)/$", views.load_evtx_channel_count, name="load_evtx_channel_count"),
1416
re_path(r"^surialert/(?P<task_id>\d+)/$", views.surialert, name="surialert"),
1517
re_path(r"^surihttp/(?P<task_id>\d+)/$", views.surihttp, name="surihttp"),
1618
re_path(r"^suritls/(?P<task_id>\d+)/$", views.suritls, name="suritls"),

0 commit comments

Comments
 (0)