-
Notifications
You must be signed in to change notification settings - Fork 207
175 lines (129 loc) · 6.31 KB
/
integration-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Integration Test
on:
workflow_dispatch:
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
jobs:
integration-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04', 'windows-2019']
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
submodules: recursive
path: main
- name: Checkout hayabusa-sample-evtx repo
uses: actions/checkout@v4
with:
repository: Yamato-Security/hayabusa-sample-evtx
path: hayabusa-sample-evtx
- name: Set up Rust toolchain
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: dtolnay/rust-toolchain@stable
- name: help
run: cd main && cargo run --release -- help
- name: update-rules
run: cd main && cargo run --release -- update-rules -q
- name: computer-metrics
run: cd main && cargo run --release -- computer-metrics -d ../hayabusa-sample-evtx -q
- name: csv-timeline
run: cd main && cargo run --release -- csv-timeline -d ../hayabusa-sample-evtx -o out.csv -q -w -D -n -u
- name: csv-timeline(-p super-verbose)
run: cd main && cargo run --release -- csv-timeline -d ../hayabusa-sample-evtx -o out-s.csv -p super-verbose -q -w -D -n -u
- name: eid-metrics
run: cd main && cargo run --release -- eid-metrics -d ../hayabusa-sample-evtx -q
- name: json-timeline
run: cd main && cargo run --release -- json-timeline -d ../hayabusa-sample-evtx -o out.json -q -w -D -n -u
- name: json-timeline(-p super-verbose)
run: cd main && cargo run --release -- json-timeline -d ../hayabusa-sample-evtx -o out-s.json -p super-verbose -q -w -D -n -u
- name: json-timeline(-L)
run: cd main && cargo run --release -- json-timeline -d ../hayabusa-sample-evtx -o out.jsonl -q -L -w -D -n -u
- name: level-tuning
run: cd main && cargo run --release -- level-tuning -f ./rules/config/level_tuning.txt -q
- name: list-contributors
run: cd main && cargo run --release -- list-contributors -q
- name: list-profiles
run: cd main && cargo run --release -- list-profiles -q
- name: logon-summary
run: cd main && cargo run --release -- logon-summary -d ../hayabusa-sample-evtx -q
- name: pivot-keywords-list
run: cd main && cargo run --release -- pivot-keywords-list -d ../hayabusa-sample-evtx -o key -q -w
- name: search
run: cd main && cargo run --release -- search -d ../hayabusa-sample-evtx -k mimikatz -o search.csv -q
- name: set-default-profile
run: cd main && cargo run --release -- set-default-profile -p verbose -q
integration-test-encoded-rules:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-24.04', 'windows-2022']
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
submodules: recursive
path: main
- name: Checkout hayabusa-sample-evtx repo
uses: actions/checkout@v4
with:
repository: Yamato-Security/hayabusa-sample-evtx
path: hayabusa-sample-evtx
- name: Set up Rust toolchain
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
uses: dtolnay/rust-toolchain@stable
- name: Download encoded rules and config files (Windows)
if: contains(matrix.os, 'windows') == true
shell: pwsh
run: |
cd main
cargo build --release
Copy-Item -Path target\release\hayabusa.exe -Destination .\hayabusa.exe
Remove-Item -Path ./config -Recurse -Force
Remove-Item -Path ./rules -Recurse -Force
Invoke-WebRequest -Uri https://raw.githubusercontent.com/Yamato-Security/hayabusa-encoded-rules/refs/heads/main/encoded_rules.yml -OutFile encoded_rules.yml
Invoke-WebRequest -Uri https://raw.githubusercontent.com/Yamato-Security/hayabusa-encoded-rules/refs/heads/main/rules_config_files.txt -OutFile rules_config_files.txt
- name: Download encoded rules and config files (Ubuntu)
if: contains(matrix.os, 'ubuntu') == true
run: |
cd main
cargo build --release
cp target/release/hayabusa .
rm -rf ./config && rm -rf ./rules/
curl -O https://raw.githubusercontent.com/Yamato-Security/hayabusa-encoded-rules/refs/heads/main/encoded_rules.yml
curl -O https://raw.githubusercontent.com/Yamato-Security/hayabusa-encoded-rules/refs/heads/main/rules_config_files.txt
- name: help
run: cd main && ./hayabusa help
- name: update-rules
run: cd main && ./hayabusa update-rules -q
- name: computer-metrics
run: cd main && ./hayabusa computer-metrics -d ../hayabusa-sample-evtx -q
- name: csv-timeline
run: cd main && ./hayabusa csv-timeline -d ../hayabusa-sample-evtx -o out.csv -q -w -D -n -u
- name: csv-timeline(-p super-verbose)
run: cd main && ./hayabusa csv-timeline -d ../hayabusa-sample-evtx -o out-s.csv -p super-verbose -q -w -D -n -u
- name: eid-metrics
run: cd main && ./hayabusa eid-metrics -d ../hayabusa-sample-evtx -q
- name: json-timeline
run: cd main && ./hayabusa json-timeline -d ../hayabusa-sample-evtx -o out.json -q -w -D -n -u
- name: json-timeline(-p super-verbose)
run: cd main && ./hayabusa json-timeline -d ../hayabusa-sample-evtx -o out-s.json -p super-verbose -q -w -D -n -u
- name: json-timeline(-L)
run: cd main && ./hayabusa json-timeline -d ../hayabusa-sample-evtx -o out.jsonl -q -L -w -D -n -u
- name: level-tuning
run: cd main && ./hayabusa level-tuning -f ./rules/config/level_tuning.txt -q
- name: list-contributors
run: cd main && ./hayabusa list-contributors -q
- name: list-profiles
run: cd main && ./hayabusa list-profiles -q
- name: logon-summary
run: cd main && ./hayabusa logon-summary -d ../hayabusa-sample-evtx -q
- name: pivot-keywords-list
run: cd main && ./hayabusa pivot-keywords-list -d ../hayabusa-sample-evtx -o key -q -w
- name: search
run: cd main && ./hayabusa search -d ../hayabusa-sample-evtx -k mimikatz -o search.csv -q
- name: set-default-profile
run: cd main && ./hayabusa set-default-profile -p verbose -q