-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into loobin-stix-export
- Loading branch information
Showing
46 changed files
with
960 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Bump version | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
poetry_bump: | ||
name: bump version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.DEPLOY }} | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python - -y | ||
- name: Update PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Run Poetry bump (patch) | ||
run: poetry version patch | ||
|
||
- name: Commit new version | ||
run: | | ||
git config --global user.name "infosecB" | ||
git config --global user.email "[email protected]" | ||
git commit -a -m "bump version" | ||
git push | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python - -y | ||
- name: Update PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Install dependecies | ||
run: poetry install | ||
- name: Run Tox | ||
run: poetry run tox | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python - -y | ||
- name: Update PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Build project for distribution | ||
run: poetry build | ||
|
||
- name: Check Version | ||
id: check-version | ||
run: | | ||
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "dist/*" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: true | ||
prerelease: steps.check-version.outputs.prerelease == 'true' | ||
|
||
- name: Publish to PyPI | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
run: poetry publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: caffeinate | ||
author: Ethan Nay | ||
short_description: Prevent the system from sleeping on behalf of a utility. | ||
full_description: |- | ||
caffeinate creates assertions to alter system sleep behavior. If no assertion flags are specified, caffeinate creates an assertion to prevent idle sleep. | ||
If a utility is specified, caffeinate creates the assertions on the utility's behalf, and those assertions will persist for the duration of the utility's execution. | ||
Otherwise, caffeinate creates the assertions directly, and those assertions will persist until caffeinate exits. | ||
created: 2023-07-12 | ||
example_use_cases: | ||
- name: Fork a process | ||
description: Make caffeinate fork a process and hold an assertion that prevents idle sleep as long as that process is running | ||
code: caffeinate -i /tmp/evil | ||
tactics: | ||
- Execution | ||
- Defense Evasion | ||
tags: | ||
- bash | ||
- zsh | ||
- name: Prevent a sleep | ||
description: Prevent a macOS from going to sleep for 4 hours (14400 seconds) | ||
code: caffeinate -u -t 14400 | ||
tactics: | ||
- Execution | ||
tags: | ||
- bash | ||
- zsh | ||
paths: | ||
- /usr/bin/caffeinate | ||
detections: | ||
- name: No detections at time of publishing | ||
url: N/A | ||
resources: | ||
- name: "macOS/binaries/caffeinate" | ||
url: https://macosbin.com/bin/caffeinate | ||
- name: "caffeinate man page" | ||
url: https://ss64.com/osx/caffeinate.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: chflags | ||
author: demonduck | ||
short_description: Changes file or directory flags | ||
full_description: |- | ||
The chflags utility modifies the file flags of the listed files as | ||
specified by the flags operand. | ||
created: 2024-07-25 | ||
example_use_cases: | ||
- name: Hide a file | ||
description: |- | ||
Add the hidden flag to a file or directory to prevent it from being | ||
visible in Finder and Terminal. | ||
code: chflags hidden ~/evil | ||
tactics: | ||
- Defense Evasion | ||
tags: | ||
- finder | ||
- name: Remove hidden flag | ||
description: |- | ||
Remove the hidden flag to a file or directory to make it visible in Finder | ||
and Terminal. | ||
code: chflags nohidden ~/evil | ||
tactics: | ||
- Defense Evasion | ||
tags: | ||
- finder | ||
paths: | ||
- /usr/bin/chflags | ||
detections: | ||
- name: "Sigma: Hidden Flag Set On File/Directory Via Chflags" | ||
url: https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_chflags_hidden_flag.yml | ||
resources: | ||
- name: "chflags man page" | ||
url: https://ss64.com/mac/chflags.html | ||
- name: "macOS/binaries/chflags" | ||
url: https://macosbin.com/bin/chflags | ||
- name: "How to hide files and folders" | ||
url: https://eclecticlight.co/2024/07/03/how-to-hide-files-and-folders/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: codesign | ||
author: Thijs Xhaflaire | ||
short_description: Create, manipulate and verify code signatures. | ||
full_description: The codesign command is used to create, check, and display code signatures, as well as inquire into the dynamic status of signed code in the system. | ||
created: 2024-07-29 | ||
example_use_cases: | ||
- name: Ad-hod codesigning an app bundle | ||
description: This command forcefully re-signs the MyApp.app application with an ad-hoc signature, applying the signature deeply to all nested code within the app | ||
code: codesign --force --deep -s - MyApp.app | ||
tactics: | ||
- Defense Evasion | ||
tags: | ||
- codesign | ||
paths: | ||
- /usr/bin/codesign | ||
detections: | ||
- name: "Jamf Protect: Detect ad-hod codesigning activity" | ||
url: https://github.com/jamf/jamfprotect/blob/main/custom_analytic_detections/adhoc_codesigning | ||
resources: | ||
- name: "When Apple Admits macOS Malware Is A Problem – It’s Time To Take Notice" | ||
url: https://www.sentinelone.com/blog/when-apple-admits-macos-malware-is-a-problem-its-time-to-take-notice/ | ||
- name: "codesign man page" | ||
url: https://ss64.com/mac/codesign.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: dscacheutil | ||
author: Ethan Nay | ||
short_description: gather information, statistics and initiate queries to the Directory Service cache. | ||
full_description: |- | ||
dscacheutil does various operations against the Directory Service cache including gathering statistics, initiating lookups, inspection, cache flush, etc. | ||
This tool replaces most of the functionality of the lookupd tool previously available in the OS. | ||
created: 2023-08-23 | ||
example_use_cases: | ||
- name: Lookup a user | ||
description: List the user information | ||
code: dscacheutil -q user -a name <USER_NAME> | ||
tactics: | ||
- Discovery | ||
tags: | ||
- bash | ||
- zsh | ||
- name: Lookup all users | ||
description: List the all users information | ||
code: dscacheutil -q user | ||
tactics: | ||
- Discovery | ||
tags: | ||
- bash | ||
- zsh | ||
paths: | ||
- /usr/bin/dscacheutil | ||
detections: | ||
- name: No detections at time of publishing | ||
url: N/A | ||
resources: | ||
- name: "macOS/binaries/dscacheutil" | ||
url: https://macosbin.com/bin/dscacheutil | ||
- name: "dscacheutil man page" | ||
url: https://ss64.com/osx/dscacheutil.html |
Oops, something went wrong.