mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
Rewrite docs
This commit is contained in:
@@ -8,15 +8,39 @@ Just add your rule file and commit it.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
First, create the rule file; make sure to create the file with a .yar extension
|
** Note: If this is your first time making changes to this repo, you may run into the following error:
|
||||||
`sudo vi my_custom_rule.yar`
|
|
||||||
|
|
||||||
Next, use git to stage the new rule to be commited:
|
fatal: detected dubious ownership in repository at '/nsm/rules/custom-local-repos/local-yara'
|
||||||
`sudo git add my_custom_rule.yar`
|
To add an exception for this directory, call:
|
||||||
|
git config --global --add safe.directory /nsm/rules/custom-local-repos/local-yara
|
||||||
|
|
||||||
Finally, commit it.
|
This means that the user you are running commands as does not match the user that is used for this git repo (socore).
|
||||||
If this is your first time making changes to this repo, you will be asked to set some configuration.
|
You will need to make sure your rule files are accessible to the socore user, so either su to socore
|
||||||
`sudo git commit -m "Initial commit of my_custom_rule.yar"`
|
or add the exception and then chown the rule files later.
|
||||||
|
|
||||||
|
Also, you will be asked to set some configuration:
|
||||||
|
```
|
||||||
|
Author identity unknown
|
||||||
|
*** Please tell me who you are.
|
||||||
|
Run
|
||||||
|
git config --global user.email "you@example.com"
|
||||||
|
git config --global user.name "Your Name"
|
||||||
|
to set your account's default identity.
|
||||||
|
Omit --global to set the identity only in this repository.
|
||||||
|
```
|
||||||
|
|
||||||
|
Run these commands, ommitting the `--global`.
|
||||||
|
|
||||||
|
With that out of the way:
|
||||||
|
|
||||||
|
First, create the rule file with a .yar extension:
|
||||||
|
`vi my_custom_rule.yar`
|
||||||
|
|
||||||
|
Next, use git to stage the new rule to be committed:
|
||||||
|
`git add my_custom_rule.yar`
|
||||||
|
|
||||||
|
Finally, commit it:
|
||||||
|
`git commit -m "Initial commit of my_custom_rule.yar"`
|
||||||
|
|
||||||
The next time the Strelka / YARA engine syncs, the new rule should be imported
|
The next time the Strelka / YARA engine syncs, the new rule should be imported
|
||||||
If there are errors, review the sync log to troubleshoot further.
|
If there are errors, review the sync log to troubleshoot further.
|
||||||
@@ -31,15 +55,39 @@ Just add your rule file and commit it.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
First, create the rule file; make sure to create the file with a .yaml|.yml extension
|
** Note: If this is your first time making changes to this repo, you may run into the following error:
|
||||||
`sudo vi my_custom_rule.yml`
|
|
||||||
|
|
||||||
Next, use git to stage the new rule to be commited:
|
fatal: detected dubious ownership in repository at '/nsm/rules/custom-local-repos/local-sigma'
|
||||||
`sudo git add my_custom_rule.yml`
|
To add an exception for this directory, call:
|
||||||
|
git config --global --add safe.directory /nsm/rules/custom-local-repos/local-sigma
|
||||||
|
|
||||||
Finally, commit it.
|
This means that the user you are running commands as does not match the user that is used for this git repo (socore).
|
||||||
If this is your first time making changes to this repo, you will be asked to set some configuration.
|
You will need to make sure your rule files are accessible to the socore user, so either su to socore
|
||||||
`sudo git commit -m "Initial commit of my_custom_rule.yml"`
|
or add the exception and then chown the rule files later.
|
||||||
|
|
||||||
|
Also, you will be asked to set some configuration:
|
||||||
|
```
|
||||||
|
Author identity unknown
|
||||||
|
*** Please tell me who you are.
|
||||||
|
Run
|
||||||
|
git config --global user.email "you@example.com"
|
||||||
|
git config --global user.name "Your Name"
|
||||||
|
to set your account's default identity.
|
||||||
|
Omit --global to set the identity only in this repository.
|
||||||
|
```
|
||||||
|
|
||||||
|
Run these commands, ommitting the `--global`.
|
||||||
|
|
||||||
|
With that out of the way:
|
||||||
|
|
||||||
|
First, create the rule file with a .yml or .yaml extension:
|
||||||
|
`vi my_custom_rule.yml`
|
||||||
|
|
||||||
|
Next, use git to stage the new rule to be committed:
|
||||||
|
`git add my_custom_rule.yml`
|
||||||
|
|
||||||
|
Finally, commit it:
|
||||||
|
`git commit -m "Initial commit of my_custom_rule.yml"`
|
||||||
|
|
||||||
The next time the Elastalert / Sigma engine syncs, the new rule should be imported
|
The next time the Elastalert / Sigma engine syncs, the new rule should be imported
|
||||||
If there are errors, review the sync log to troubleshoot further.
|
If there are errors, review the sync log to troubleshoot further.
|
||||||
|
|||||||
Reference in New Issue
Block a user