-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1052 from JayJersan/release
Added crypto-miner policy and changes
- Loading branch information
Showing
5 changed files
with
104 additions
and
24 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
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,68 @@ | ||
# KubeArmor is an open source software that enables you to protect your cloud workload at run-time. | ||
# To learn more about KubeArmor visit: | ||
# https://www.accuknox.com/kubearmor/ | ||
|
||
apiVersion: security.kubearmor.com/v1 | ||
kind: KubeArmorPolicy | ||
metadata: | ||
name: ksp-mitre-prevent-crypto-miners | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: wordpress | ||
|
||
action: Block | ||
process: | ||
matchDirectories: | ||
- dir: /tmp/ | ||
recursive: true | ||
|
||
matchPaths: | ||
# do not allow execution of xmrig (xmrig.com) | ||
- execname: xmrig | ||
|
||
# prevent execution of Dero miner | ||
- execname: dero | ||
- execname: dero-miner-linux-amd64 | ||
- execname: dero-wallet-cli-linux-amd64 | ||
- execname: derod-linux-amd64 | ||
|
||
# do not allow execution of masscan/zgrab2/nmap used for recon | ||
- execname: zgrab2 | ||
- execname: masscan | ||
- execname: nmap | ||
|
||
# do not allow package management tools execution | ||
- execname: apt | ||
- execname: apk | ||
|
||
# time sync is important for miners. typically ntpdate is used. | ||
- execname: ntpdate | ||
|
||
# Do not allow overwriting system binaries | ||
file: | ||
matchDirectories: | ||
- dir: /usr/local/bin/ | ||
readOnly: true | ||
recursive: true | ||
- dir: /sbin/ | ||
readOnly: true | ||
recursive: true | ||
- dir: /bin/ | ||
readOnly: true | ||
recursive: true | ||
- dir: /usr/bin/ | ||
readOnly: true | ||
recursive: true | ||
- dir: /var/local/bin/ | ||
readOnly: true | ||
recursive: true | ||
- dir: /boot/ | ||
readOnly: true | ||
recursive: true | ||
|
||
message: cryptominer detected and blocked | ||
severity: 10 | ||
tags: | ||
- cryptominer | ||
- MITRE_T1496_resource_hijacking |
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