Skip to content
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

update cape #7

Merged
merged 851 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
851 commits
Select commit Hold shift + click to select a range
9c3bec6
style: Automatic code formatting
actions-user Feb 15, 2024
96602f7
fix conf load on each file processing
doomedraven Feb 15, 2024
3fddeb1
njrat test
doomedraven Feb 15, 2024
7ca3d4f
Merge pull request #1957 from T1m3M/njrat-parser
doomedraven Feb 15, 2024
0f13be7
style: Automatic code formatting
actions-user Feb 15, 2024
3048bf2
Set tools_folder to tmp in test_file_extra_info
josh-feather Feb 15, 2024
b47a146
Merge pull request #1964 from josh-feather/test-improvements
doomedraven Feb 15, 2024
5dc60ed
style: Automatic code formatting
actions-user Feb 15, 2024
33a9ef0
fix indent
doomedraven Feb 16, 2024
9ff2ca6
QakBot v5 detection & anti-anti-vm
kevoreilly Feb 16, 2024
f9041ec
Update scheduler.py
doomedraven Feb 16, 2024
cdd418f
Missing monitor yara from previous QakBot v5 commit
kevoreilly Feb 16, 2024
1f430f5
Stealc yara: fix FP & improve detection
kevoreilly Feb 16, 2024
3348904
Bump cryptography from 42.0.0 to 42.0.2
dependabot[bot] Feb 17, 2024
9aec107
Merge pull request #1968 from kevoreilly/dependabot/pip/cryptography-…
doomedraven Feb 17, 2024
1b1e5a4
ci: Update requirements.txt
actions-user Feb 17, 2024
fb3f99b
Fix zip_compound package
x9090 Feb 20, 2024
61f8ea0
Merge pull request #1970 from x9090/master
doomedraven Feb 20, 2024
d796735
root remove yara-python folder
doomedraven Feb 21, 2024
13cdfab
Update installation.rst
doomedraven Feb 21, 2024
a89f8c3
Update cleaners_utils.py
doomedraven Feb 21, 2024
fd95af9
Update zip_compound.py
doomedraven Feb 21, 2024
e1561af
Bump cryptography from 42.0.2 to 42.0.4
dependabot[bot] Feb 21, 2024
f9bac5b
Merge pull request #1977 from kevoreilly/dependabot/pip/cryptography-…
doomedraven Feb 21, 2024
8c64d68
ci: Update requirements.txt
actions-user Feb 21, 2024
d580b1a
Update cleaners_utils.py
doomedraven Feb 22, 2024
7880b18
Update aws.conf.default
doomedraven Feb 22, 2024
5a7f7eb
Monitor updates: Debugger/Trace enhancements
kevoreilly Feb 23, 2024
a444770
Update cleaners_utils.py
doomedraven Feb 23, 2024
4e05ee8
Update Latrodectus parser
enzok Feb 23, 2024
3bef033
Update aws.conf.default
doomedraven Feb 23, 2024
9062a43
Merge branch 'master' of https://github.com/kevoreilly/CAPEv2
doomedraven Feb 23, 2024
5743421
Fixing AWS Deployment Bugs
plutusrt Feb 23, 2024
6a88553
Update aws.conf
doomedraven Feb 24, 2024
d632737
Merge pull request #1980 from plutusrt/master
doomedraven Feb 24, 2024
c7f1ded
Fix config item names
enzok Feb 24, 2024
8af57c7
Update test_latrodectus.py
doomedraven Feb 24, 2024
f2dff87
Merge pull request #1979 from enzok/patch-1
doomedraven Feb 24, 2024
49ed6b2
style: Automatic code formatting
actions-user Feb 24, 2024
cc0871b
Update Latrodectus.py
enzok Feb 25, 2024
69649b9
Merge pull request #1981 from enzok/patch-1
doomedraven Feb 25, 2024
d73199d
Update web_utils.py
doomedraven Feb 26, 2024
4ed50f1
Monitor update: Service injection delay for e.g. msi detonation
kevoreilly Feb 26, 2024
2300e95
Update DarkGate parser
enzok Feb 26, 2024
ef54cd6
Merge pull request #1983 from enzok/darkgate-update
doomedraven Feb 26, 2024
d657513
DarkGate yaras: fix whitespace
kevoreilly Feb 26, 2024
3b49c29
Monitor update: EnumDisplayDevices hooks & anti-vm (thanks @enzo)
kevoreilly Feb 26, 2024
e47f407
Update az.conf.default
cccs-mog Feb 26, 2024
d2bbf91
Latrodectus auto-export selection
kevoreilly Feb 26, 2024
0e2a406
Update github actions to new versions using node 20, since node 16 is…
rkoumis Feb 26, 2024
35f1f05
Monitor update: fix issue with non-exe process names (e.g. MSIXXXX.tmp)
kevoreilly Feb 26, 2024
22ad15a
Merge pull request #1984 from cccs-mog/patch-1
doomedraven Feb 26, 2024
6108813
Merge pull request #1985 from rkoumis/update-actions-node-20
doomedraven Feb 26, 2024
4f39cd4
Bump orjson from 3.8.5 to 3.9.15
dependabot[bot] Feb 26, 2024
4b00e87
Merge pull request #1986 from kevoreilly/dependabot/pip/orjson-3.9.15
doomedraven Feb 27, 2024
a456733
ci: Update requirements.txt
actions-user Feb 27, 2024
47984f8
AgentTesla update
ClaudioWayne Feb 27, 2024
63ddb3d
AgentTeslaV4JIT: promote to full decrypted string capture
kevoreilly Feb 27, 2024
4cf3546
Merge pull request #1987 from ClaudioWayne/master
kevoreilly Feb 27, 2024
3822784
style: Automatic code formatting
actions-user Feb 27, 2024
48b309d
the github action for pip-audit needs us to specify the requirements.…
rkoumis Feb 27, 2024
70b4c4c
Merge pull request #1990 from rkoumis/github-action-pip-audit
doomedraven Feb 27, 2024
33f905a
Update QakBot.py
doomedraven Feb 28, 2024
7b814a3
Merge branch 'master' of https://github.com/kevoreilly/CAPEv2
doomedraven Feb 28, 2024
268a3f4
Add 'ShellWindows' COM object injection mechanism (e.g. Latrodectus M…
kevoreilly Feb 28, 2024
2a2a310
style: Automatic code formatting
actions-user Feb 28, 2024
0906c5c
Add monitor option to disable ntdll remap protection (ntdll-remap=0) …
kevoreilly Feb 28, 2024
bea5730
add TLP to dist
doomedraven Feb 29, 2024
34749be
style: Automatic code formatting
actions-user Feb 29, 2024
c5470d4
Update env.py
doomedraven Feb 29, 2024
7799c59
Update web_utils.py
doomedraven Feb 29, 2024
04bb840
Monitor fixes
kevoreilly Feb 29, 2024
12e74f0
Abstract python setup code into a composite action.
rkoumis Feb 27, 2024
dfcadca
Now able to run actions locally with nektos/act
rkoumis Feb 29, 2024
db3ac4e
Turn off certain jobs/steps when being run by nektos act
rkoumis Feb 29, 2024
a53c983
Revert accidental change to test_rats.py
rkoumis Feb 29, 2024
aaafd9d
Fix composite action by specifying shell on each step.
rkoumis Feb 29, 2024
f4c5a6a
Omit shell:bash on step which does not have "run"
rkoumis Feb 29, 2024
a9dece4
Omit poetry cache checking
rkoumis Feb 29, 2024
a09f027
Merge pull request #1991 from rkoumis/github-action-test
doomedraven Mar 1, 2024
b16a5b1
Oyster extractor
enzok Feb 29, 2024
b8f2476
Run tests on the windows analyzer
rkoumis Mar 1, 2024
1757f81
Update: XWorm Parser
para0x0dise Mar 1, 2024
478b24c
Update XWorm.py
para0x0dise Mar 1, 2024
5bf6519
Update XWorm.py
para0x0dise Mar 1, 2024
c25a7c2
Merge pull request #1992 from enzok/oyster
doomedraven Mar 1, 2024
468b1c7
style: Automatic code formatting
actions-user Mar 1, 2024
72a9bc2
Better control of environment variable for nektos act
rkoumis Mar 1, 2024
c952197
Merge pull request #1995 from rkoumis/github-actions-act-simplify
doomedraven Mar 1, 2024
7ecff41
Update XWorm.py
para0x0dise Mar 1, 2024
7e0969a
Update XWorm.py
doomedraven Mar 1, 2024
3b10ba7
Merge pull request #1994 from para0x0dise/XWorm-parser
doomedraven Mar 1, 2024
5d7eb8e
Merge pull request #1993 from rkoumis/windows-tests-github-actions
doomedraven Mar 1, 2024
4585fa8
style: Automatic code formatting
actions-user Mar 1, 2024
b877b1a
fix #1591
doomedraven Mar 2, 2024
a9f5241
Update XWorm.py
para0x0dise Mar 4, 2024
59556a6
Update Oyster.py
doomedraven Mar 4, 2024
2caf6f6
Merge branch 'master' into pr/1997
doomedraven Mar 5, 2024
57c4ae5
Update test_oyster.py
doomedraven Mar 5, 2024
a91487f
Merge pull request #1997 from para0x0dise/XWorm-parser-update
doomedraven Mar 5, 2024
0277e8c
style: Automatic code formatting
actions-user Mar 5, 2024
24f11ee
Update scheduler.py
doomedraven Mar 5, 2024
76754ee
Merge branch 'master' of https://github.com/kevoreilly/CAPEv2
doomedraven Mar 5, 2024
10760cf
feat: better segregation of windows and linux signatures
winson0123 Feb 19, 2024
dc03a41
add: __init__.py for signature segregation
winson0123 Feb 19, 2024
78223da
Fix file name
enzok Mar 6, 2024
1b03234
Merge pull request #1998 from enzok/patch-1
doomedraven Mar 6, 2024
1d21c64
Run ruff during pre-commit checks
rkoumis Mar 6, 2024
45bb5e0
feat: linux analysis api captured to log and report json
kenleejl Sep 14, 2023
965234c
add: strace processing module process tree
winson0123 Oct 5, 2023
6bae8c8
add: strace analysis for frontend
winson0123 Oct 6, 2023
d790edd
add: strace page
winson0123 Oct 6, 2023
090afe6
add: strace view in frontend
winson0123 Oct 6, 2023
e56acea
refractor: strace argument parsing on frontend
winson0123 Oct 9, 2023
ab84cb4
fix: strace tab
kenleejl Oct 11, 2023
db80c82
refactor: accurate args fetched by syscall number and categorisation
winson0123 Oct 20, 2023
76a6129
refactor: strace processing output similar to behavior output
winson0123 Oct 26, 2023
8387522
add: linux agent installation script
winson0123 Nov 1, 2023
5058082
refactor: strace process calls store as objects in mongodb
winson0123 Nov 8, 2023
2670a97
feat: behavioral analysis tab for linux syscalls
winson0123 Nov 9, 2023
9f85988
Merge pull request #1999 from rkoumis/install-ruff-in-pre-commit
doomedraven Mar 7, 2024
cae3428
fix: strace process tree on behavioral tab
winson0123 Nov 10, 2023
77b5c10
feat: filename match w/ file descriptor in sycall
winson0123 Dec 5, 2023
5583f9e
fix: strace processing crashes upon unclosed file descriptors
winson0123 Dec 21, 2023
14498f6
refactor: reformatted strace processing
winson0123 Jan 25, 2024
901bd84
add: more syscalls that utilize file descriptors
winson0123 Feb 1, 2024
a2b01bb
fix: default file descriptors
winson0123 Feb 7, 2024
1e8b614
fix: allow 32bit to run on 64bit for linux
winson0123 Feb 7, 2024
92841fa
fix: syscall incorrect arguments
winson0123 Feb 19, 2024
48d08f8
refactor: strace processing readability
winson0123 Feb 23, 2024
f15de26
refactor: move "strace" to "behavior" key
winson0123 Feb 26, 2024
cbf3969
refactor: add machine platform to cape report
winson0123 Mar 6, 2024
6ee6c27
Merge pull request #2000 from winson0123/signature-segregation
doomedraven Mar 7, 2024
be4af7c
style: Automatic code formatting
actions-user Mar 7, 2024
2145cf2
refactor: migrate strace implementation to behavior
winson0123 Mar 6, 2024
60ab9c2
update: alembic upgrades and schema version
winson0123 Mar 7, 2024
f0367fe
chore: remove unused import functions
winson0123 Mar 7, 2024
3b303a4
Monitor updates & Pikabot detonation bypass
kevoreilly Mar 7, 2024
a2476e3
fix: update platform accept nullable
winson0123 Mar 8, 2024
714636f
Pikabot updates
kevoreilly Mar 8, 2024
b01c8f9
Unit tests for agent
rkoumis Mar 6, 2024
9d5ade1
Stricter checks when setting status
rkoumis Mar 7, 2024
5dc78fd
Monitor a background process
rkoumis Mar 7, 2024
f247ce4
Added support for locking and releasing mutexes
rkoumis Mar 7, 2024
45bea6c
Update views.py
doomedraven Mar 8, 2024
5a9b85f
Update index.html
doomedraven Mar 8, 2024
03be55f
Update index.html
doomedraven Mar 8, 2024
edb6b17
Merge pull request #2002 from rkoumis/automated-unit-tests-for-agent
doomedraven Mar 9, 2024
82a9a7f
Update views.py
doomedraven Mar 9, 2024
75de6c9
Update views.py
doomedraven Mar 9, 2024
4228600
Merge pull request #1937 from bartblaze/master
doomedraven Mar 9, 2024
f68c25a
style: Automatic code formatting
actions-user Mar 9, 2024
5435004
Update plugins.py
doomedraven Mar 9, 2024
add23ac
chore: removal of systemtap-based support
winson0123 Mar 11, 2024
d08b727
Update resultserver.py
doomedraven Mar 11, 2024
46d2e9b
Update resultserver.py
doomedraven Mar 11, 2024
02c9ca8
Update resultserver.py
doomedraven Mar 11, 2024
f3a0089
Merge pull request #2004 from kevoreilly/resultserver
doomedraven Mar 11, 2024
edcbf55
style: Automatic code formatting
actions-user Mar 11, 2024
5c8e4e0
Lumma detection update
kevoreilly Mar 11, 2024
4e89d74
Analyzer: if a process is created from a dropped file, capture (dump)…
kevoreilly Mar 11, 2024
1d1bfba
Analyzer: Fix incorrect variable name in previous commit - thanks @rk…
kevoreilly Mar 11, 2024
ac79838
Improvement to process.py logging
rkoumis Mar 11, 2024
654bfc1
Rescind Pikabot dynamic config capture as it's in plain text in the p…
kevoreilly Mar 12, 2024
8b2a4fd
Retrieve file encoded base64
rkoumis Mar 11, 2024
30c1509
EVTX single endpoint added
dsecuma Mar 12, 2024
98e1387
Tweak PikaBot detection
kevoreilly Mar 12, 2024
b9f324e
Monitor update: Initial IPv6 support - thanks @cccs-mog
kevoreilly Mar 12, 2024
19c8b0a
fix config
doomedraven Mar 12, 2024
679bb3d
Merge pull request #2007 from dsecuma/evtx-endpoint
doomedraven Mar 12, 2024
566d03a
style: Automatic code formatting
actions-user Mar 12, 2024
0b9167d
Merge pull request #2006 from rkoumis/base-64-send-file-dont-set-length
doomedraven Mar 12, 2024
b75bec3
Linux and Config
doomedraven Mar 12, 2024
f2a9bfb
confs
doomedraven Mar 13, 2024
37280fa
Update config.py
doomedraven Mar 13, 2024
2581393
Merge branch 'master' into pr/2001
doomedraven Mar 13, 2024
d46b28e
Merge pull request #2001 from winson0123/linux-support
doomedraven Mar 13, 2024
bce0696
style: Automatic code formatting
actions-user Mar 13, 2024
8305d18
PikaBot parser update
enzok Mar 13, 2024
0bb95cb
PikaBot parser: embed depended-upon yara pattern
kevoreilly Mar 13, 2024
5ca8798
PikaBot detection - update recent sig with enzo's config pattern
kevoreilly Mar 13, 2024
a7d3580
fixed unrecognized bytes encoding in remcos parser
federicofantini Mar 12, 2024
2544ce4
PikaBot parser: remove unused imports & constants
kevoreilly Mar 13, 2024
45f79c0
Update yara rule
enzok Mar 13, 2024
aa23f2e
PikaBot detection update
kevoreilly Mar 13, 2024
a5ff261
Merge pull request #2009 from enzok/update-01
kevoreilly Mar 13, 2024
61d9f05
style: Automatic code formatting
actions-user Mar 13, 2024
89433bc
Lumma updates
kevoreilly Mar 13, 2024
8eb7fe4
Rozena (Metasploit) payload parser
para0x0dise Mar 13, 2024
8a3e9ca
Update Rozena.py
para0x0dise Mar 13, 2024
1e4c682
PikaBot ignore empty config
enzok Mar 13, 2024
9961069
Merge pull request #2012 from enzok/update-2
doomedraven Mar 14, 2024
f45b720
style: Automatic code formatting
actions-user Mar 14, 2024
2b9b122
Monitor update: Unpacker refinement for e.g. Shikata Ga Nai - thanks …
kevoreilly Mar 14, 2024
9616452
Monitor update: Further unpacker refinement: Improve filter for unwan…
kevoreilly Mar 15, 2024
41547c0
Monitor update: ignore dump limit at process dump time
kevoreilly Mar 15, 2024
116445d
Update: Remove emulation
para0x0dise Mar 15, 2024
b7e1789
Merge pull request #2010 from certego/fix_remcos_parser
kevoreilly Mar 15, 2024
7180083
Update guest.py
doomedraven Mar 15, 2024
e05be92
process.py: fix capitalisation in debug output
kevoreilly Mar 15, 2024
7259d42
process.py logging: fix pid int format specifier
kevoreilly Mar 15, 2024
d532a71
Merge pull request #2005 from rkoumis/additional-analyzer-tests
kevoreilly Mar 15, 2024
8471e8b
Update guest.py
doomedraven Mar 15, 2024
40ff102
Rozena detection: add second code pattern
kevoreilly Mar 15, 2024
37f95fd
Merge pull request #2011 from para0x0dise/Rozea-payload
kevoreilly Mar 15, 2024
334e8b1
style: Automatic code formatting
actions-user Mar 15, 2024
bd38848
AgentTesla parser: fix broken dynamic V4 handling - thanks @ClaudioWa…
kevoreilly Mar 18, 2024
1a7e268
Update views.py
doomedraven Mar 18, 2024
600a7e9
Carbanak update
enzok Mar 18, 2024
7755f00
Merge pull request #2016 from enzok/update-1
doomedraven Mar 18, 2024
3d158ae
Fix bug in sample_path_by_hash.
Mar 18, 2024
256cb24
chore(deps): bump django from 4.2.10 to 4.2.11
dependabot[bot] Mar 18, 2024
9064e10
Merge pull request #2018 from kevoreilly/dependabot/pip/django-4.2.11
doomedraven Mar 19, 2024
b851ab4
ci: Update requirements.txt
actions-user Mar 19, 2024
0eba08b
Merge pull request #2017 from tbeadle/read-error
doomedraven Mar 19, 2024
90ecacc
process.py: fix capitalisation in recent PR (#2005)
kevoreilly Mar 19, 2024
0037219
analyzer: quieten noisy debug output in pids_from_image_names()
kevoreilly Mar 19, 2024
7083eab
style: Automatic code formatting
actions-user Mar 19, 2024
a81385f
Formbook: anti-hook bypass update
kevoreilly Mar 19, 2024
98b00ca
Formbook config extraction tweak
kevoreilly Mar 19, 2024
4c478c6
Formbook: further tweaks
kevoreilly Mar 20, 2024
2f3b267
Monitor update: Trace GetRegister() tweak
kevoreilly Mar 20, 2024
bc8ed13
chore(deps-dev): bump black from 22.12.0 to 24.3.0
dependabot[bot] Mar 20, 2024
7b76419
More Formbook tweaks
kevoreilly Mar 20, 2024
c38397a
Check for the default config file.
Mar 20, 2024
d7b91aa
Remove another place where we check for the existence of the config f…
Mar 20, 2024
b753480
Merge pull request #2020 from kevoreilly/dependabot/pip/black-24.3.0
doomedraven Mar 20, 2024
69265e1
Merge pull request #2021 from tbeadle/startup-config-check
doomedraven Mar 20, 2024
9d3ce80
style: Automatic code formatting
actions-user Mar 20, 2024
f5a7cd8
Improvements for the dynamic handling of V4
ClaudioWayne Mar 21, 2024
c801ad0
add exist_ok=True
doomedraven Mar 21, 2024
3f06c39
Update views.py
doomedraven Mar 21, 2024
8a39864
Ask the agent to create a directory that already exists - this is no …
rkoumis Mar 21, 2024
7682dd8
Merge pull request #2022 from rkoumis/test-agent-exist-ok-true
doomedraven Mar 22, 2024
9425632
Merge branch 'kevoreilly:master' into master
ClaudioWayne Mar 22, 2024
5e7a6b9
AgentTesla yara rule optimization to match sample that are deobfuscat…
ClaudioWayne Mar 22, 2024
b1ea552
Merge pull request #2023 from ClaudioWayne/master
kevoreilly Mar 22, 2024
ab17481
Heaven's Gate direct syscall bypass & misc monitor fixes
kevoreilly Mar 25, 2024
7e55c03
Update objects.py
doomedraven Mar 25, 2024
f22a79b
Merge pull request #2025 from kevoreilly/fix_yara
kevoreilly Mar 25, 2024
8bdc29e
Docs: overhaul CAPE intro & history
kevoreilly Mar 26, 2024
69e5e9c
Update README.md
kevoreilly Mar 26, 2024
dba7e4c
Readme: add UPX unpacking screenshot
kevoreilly Mar 26, 2024
a39b50b
Readme: improve UPX unpacking screenshot
kevoreilly Mar 26, 2024
d5e82b1
Readme: improve debugger section
kevoreilly Mar 26, 2024
056136a
Merge remote-tracking branch 'origin/master' into fix/cape
mjbradford89 Mar 26, 2024
5f84638
update poetry.lock
mjbradford89 Mar 26, 2024
f9c2ac9
disable mongo
mjbradford89 Mar 26, 2024
f20d78d
httpreplay
mjbradford89 Mar 27, 2024
997bad6
poetry.lock
mjbradford89 Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Nektos act runs tests as root. Without this environment variable
# being set, CAPE exits at line 10 of web/web/settings.py,
# and no tests are run.

--env CAPE_AS_ROOT=1
30 changes: 30 additions & 0 deletions .github/actions/python-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Python setup steps that can be reused'
description: 'Install dependencies, poetry, requirements'
inputs:
python-version:
required: true
description: The python version

runs:
using: "composite"
steps:
- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
sudo apt update && sudo apt-get install -y --no-install-recommends libxml2-dev libxslt-dev python3-dev libgeoip-dev ssdeep libfuzzy-dev p7zip-full innoextract unrar upx

- name: Install poetry
shell: bash
run: pip install poetry

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'poetry'

- name: Install requirements
shell: bash
run: |
poetry install --no-interaction --no-root
17 changes: 0 additions & 17 deletions .github/workflows/cape_sh.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/export-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ on:

jobs:
update:
if: ${{ !github.event.act }} # skip during local actions testing
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.10"]

steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install poetry
run: pip install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# check-latest: true
python-version: ${{ matrix.python-version }}
Expand All @@ -33,6 +34,8 @@ jobs:
run: poetry export --format requirements.txt --output requirements.txt

- name: Commit changes if any
# Skip this step if being run by nektos/act
if: ${{ !env.ACT }}
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pip-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.10"]

steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pypa/[email protected].0
- uses: pypa/[email protected].8
with:
inputs: requirements.txt
43 changes: 43 additions & 0 deletions .github/workflows/python-package-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python tests on windows

env:
COLUMNS: 120

on:
push:
branches: [ master, staging ]
pull_request:
branches: [ master, staging ]

jobs:
test:
runs-on: windows-latest
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.10", "3.11"]

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
# Use x86 python because of https://github.com/kevoreilly/CAPEv2/issues/168
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
architecture: 'x86'

- name: Install dependencies
run: pip install --upgrade pytest requests

- name: Run analyzer unit tests
run: |
cd analyzer/windows
pytest -v .

- name: Run agent unit tests
run: |
cd agent
pytest -v .
56 changes: 17 additions & 39 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,85 +15,61 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.8", "3.11"]

python-version: ["3.10", "3.11"]
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Checkout test files repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: CAPESandbox/CAPE-TestFiles
path: tests/data/

- name: Install dependencies
run: |
sudo apt update && sudo apt-get install libxml2-dev libxslt-dev python3-dev libgeoip-dev ssdeep libfuzzy-dev p7zip-full innoextract unrar upx

- name: Install poetry
run: pip install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: ./.github/actions/python-setup/
with:
# check-latest: true
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install requirements
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Install pyattck
run: |
poetry install --no-interaction --no-root
poetry run pip install pyattck==7.1.2

- name: Run Ruff
run: poetry run ruff . --line-length 132 --ignore E501,E402

- name: Run unit tests
run: poetry run python -m pytest --import-mode=append

# Test parsers only if any parser changed
- uses: dorny/paths-filter@v2
- name: See if any parser changed
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
src:
- 'modules/processing/parsers/CAPE/*.py'

- if: steps.changes.outputs.src == 'true'
- name: Test parsers only if any parser changed
if: steps.changes.outputs.src == 'true'
run: poetry run python -m pytest tests_parsers -s --import-mode=append

# Todo unify in future
format:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.10", "3.11"]
if: ${{ github.ref == 'refs/heads/master' }}

steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev python3-dev libgeoip-dev ssdeep libfuzzy-dev

- name: Install poetry
run: pip install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Set up python
uses: ./.github/actions/python-setup
with:
check-latest: true
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install requirements
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --no-interaction --no-root

- name: Format with black
run: poetry run black .
Expand All @@ -103,6 +79,8 @@ jobs:
run: poetry run isort .

- name: Commit changes if any
# Skip this step if being run by nektos/act
if: ${{ !env.ACT }}
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/yara-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,21 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.10"]

steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev python3-dev libgeoip-dev ssdeep libfuzzy-dev

- name: Install poetry
run: pip install poetry
- name: Checkout test files repo
uses: actions/checkout@v4
with:
repository: CAPESandbox/CAPE-TestFiles
path: tests/data/

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: ./.github/actions/python-setup/
with:
# check-latest: true
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install requirements
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --no-interaction --no-root

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ tests/test_bson.bson.compressed
*~

installer/cape-config.sh
installer/kvm-config.sh
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ repos:
# hooks:
# - id: pyproject-flake8

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff
args: [ --fix ]

- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
Expand Down
15 changes: 4 additions & 11 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"
python: "3.12"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand All @@ -27,9 +23,6 @@ sphinx:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
python:
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion .yara-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
files:
accept:
- "data/yara/**.yar"
- "analyzer/windows/data/yara/*.yar"

false_positives:
ignore:
Expand All @@ -10,3 +9,4 @@ false_positives:
- rule: "NSIS"
- rule: "UPX"
- rule: "Syscall"
- rule: "FormhookB"
4 changes: 4 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -658,3 +658,7 @@ License, Version 2.0.
The files bootstrap.min.js, bootstrap.min.css, bootstrap-responsive.min.css,
glyphicons-halflings.png, glyphicons-halflings-white.png are copyrighted by Twitter, Inc.
and licensed under the Apache License, Version 2.0.

The file analyzer/windows/modules/amsi.py uses parts of pywintrace
(https://github.com/fireeye/pywintrace), which is copyrighted by FireEye, Inc. and licensed
under the Apache License, Version 2.0.
Loading