mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-27 06:57:50 +02:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d570b56c55 | |||
| ff4345d3aa | |||
| e59f0d69d9 | |||
| ad2b69c9de | |||
| e874c32c08 | |||
| c0649a863b | |||
| e93dbb5347 | |||
| bbced5b52f | |||
| f134c74585 | |||
| bc5fa55ecd | |||
| 2e2eed9f42 | |||
| 3f83191083 | |||
| e54ece06a2 | |||
| cc986c8d7c | |||
| b7732fb14a | |||
| 6f03662120 | |||
| 4f2952105e | |||
| b34d0d7f7a | |||
| 797d769661 | |||
| bbd2f0da2b | |||
| 5c39162aef | |||
| d8a4301533 |
+7
-1
@@ -29,7 +29,11 @@
|
|||||||
|
|
||||||
* See this document's [code styling and conventions section](#code-style-and-conventions) below to be sure your PR fits our code requirements prior to submitting.
|
* See this document's [code styling and conventions section](#code-style-and-conventions) below to be sure your PR fits our code requirements prior to submitting.
|
||||||
|
|
||||||
* Minor bug fixes can be submitted immediately. However, if you are wanting to make more involved changes, please start a [discussion](https://github.com/Security-Onion-Solutions/securityonion/discussions) first and tell us what you are hoping to achieve. If we agree with your goals, then you can submit the PR.
|
* Change behavior (fix a bug, add a new feature) separately from refactoring code. Refactor pull requests are welcome, but ensure your new code behaves exactly the same as the old.
|
||||||
|
|
||||||
|
* **Do not refactor code for non-functional reasons**. If you are submitting a pull request that refactors code, ensure the refactor is improving the functionality of the code you're refactoring (e.g. decreasing complexity, removing reliance on 3rd party tools, improving performance).
|
||||||
|
|
||||||
|
* Before submitting a PR with significant changes to the project, [start a discussion](https://github.com/Security-Onion-Solutions/securityonion/discussions/new) explaining what you hope to acheive. The project maintainers will provide feedback and determine whether your goal aligns with the project.
|
||||||
|
|
||||||
|
|
||||||
### Code style and conventions
|
### Code style and conventions
|
||||||
@@ -38,3 +42,5 @@
|
|||||||
* All new Bash code should pass [ShellCheck](https://www.shellcheck.net/) analysis. Where errors can be *safely* [ignored](https://github.com/koalaman/shellcheck/wiki/Ignore), the relevant disable directive should be accompanied by a brief explanation as to why the error is being ignored.
|
* All new Bash code should pass [ShellCheck](https://www.shellcheck.net/) analysis. Where errors can be *safely* [ignored](https://github.com/koalaman/shellcheck/wiki/Ignore), the relevant disable directive should be accompanied by a brief explanation as to why the error is being ignored.
|
||||||
|
|
||||||
* **Ensure all YAML (this includes Salt states and pillars) is properly formatted**. The spec for YAML v1.2 can be found [here](https://yaml.org/spec/1.2/spec.html), however there are numerous online resources with simpler descriptions of its formatting rules.
|
* **Ensure all YAML (this includes Salt states and pillars) is properly formatted**. The spec for YAML v1.2 can be found [here](https://yaml.org/spec/1.2/spec.html), however there are numerous online resources with simpler descriptions of its formatting rules.
|
||||||
|
|
||||||
|
* **All code of any language should match the style of other code of that same language within the project.** Be sure that any changes you make do not break from the pre-existing style of Security Onion code.
|
||||||
|
|||||||
+11
-11
@@ -1,18 +1,18 @@
|
|||||||
### 2.3.100-20220202 ISO image built on 2022/02/02
|
### 2.3.100-20220301 ISO image built on 2022/03/01
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Download and Verify
|
### Download and Verify
|
||||||
|
|
||||||
2.3.100-20220202 ISO image:
|
2.3.100-20220301 ISO image:
|
||||||
https://download.securityonion.net/file/securityonion/securityonion-2.3.100-20220202.iso
|
https://download.securityonion.net/file/securityonion/securityonion-2.3.100-20220301.iso
|
||||||
|
|
||||||
MD5: 170337342118DC32F8C2F687F332CA25
|
MD5: 53A992D6321B7C33440219BAD9157769
|
||||||
SHA1: 202235BFE37F1F2E129F5D5DE13173A27A9D8CC0
|
SHA1: D730157F4847EB91393CF0C1A22410708312F605
|
||||||
SHA256: F902C561D35F5B9DFB2D65BDAE97D30FD9E46F6822AFA36CA9C4043C50864484
|
SHA256: F6C0E55968ED1F0AA35CB9E1F7FF5BEB27673638A4F2223302B301360BC401A1
|
||||||
|
|
||||||
Signature for ISO image:
|
Signature for ISO image:
|
||||||
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.100-20220202.iso.sig
|
https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.100-20220301.iso.sig
|
||||||
|
|
||||||
Signing key:
|
Signing key:
|
||||||
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS
|
https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS
|
||||||
@@ -26,22 +26,22 @@ wget https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/ma
|
|||||||
|
|
||||||
Download the signature file for the ISO:
|
Download the signature file for the ISO:
|
||||||
```
|
```
|
||||||
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.100-20220202.iso.sig
|
wget https://github.com/Security-Onion-Solutions/securityonion/raw/master/sigs/securityonion-2.3.100-20220301.iso.sig
|
||||||
```
|
```
|
||||||
|
|
||||||
Download the ISO image:
|
Download the ISO image:
|
||||||
```
|
```
|
||||||
wget https://download.securityonion.net/file/securityonion/securityonion-2.3.100-20220202.iso
|
wget https://download.securityonion.net/file/securityonion/securityonion-2.3.100-20220301.iso
|
||||||
```
|
```
|
||||||
|
|
||||||
Verify the downloaded ISO image using the signature file:
|
Verify the downloaded ISO image using the signature file:
|
||||||
```
|
```
|
||||||
gpg --verify securityonion-2.3.100-20220202.iso.sig securityonion-2.3.100-20220202.iso
|
gpg --verify securityonion-2.3.100-20220301.iso.sig securityonion-2.3.100-20220301.iso
|
||||||
```
|
```
|
||||||
|
|
||||||
The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
|
The output should show "Good signature" and the Primary key fingerprint should match what's shown below:
|
||||||
```
|
```
|
||||||
gpg: Signature made Wed 02 Feb 2022 12:12:39 PM EST using RSA key ID FE507013
|
gpg: Signature made Tue 01 Mar 2022 03:14:02 PM EST using RSA key ID FE507013
|
||||||
gpg: Good signature from "Security Onion Solutions, LLC <info@securityonionsolutions.com>"
|
gpg: Good signature from "Security Onion Solutions, LLC <info@securityonionsolutions.com>"
|
||||||
gpg: WARNING: This key is not certified with a trusted signature!
|
gpg: WARNING: This key is not certified with a trusted signature!
|
||||||
gpg: There is no indication that the signature belongs to the owner.
|
gpg: There is no indication that the signature belongs to the owner.
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
{% set node_types = {} %}
|
{% set node_types = {} %}
|
||||||
|
{% set cached_grains = salt.saltutil.runner('cache.grains', tgt='*') %}
|
||||||
{% for minionid, ip in salt.saltutil.runner(
|
{% for minionid, ip in salt.saltutil.runner(
|
||||||
'mine.get',
|
'mine.get',
|
||||||
tgt='G@role:so-manager or G@role:so-managersearch or G@role:so-standalone or G@role:so-node or G@role:so-heavynode or G@role:so-receiver or G@role:so-helix ',
|
tgt='G@role:so-manager or G@role:so-managersearch or G@role:so-standalone or G@role:so-node or G@role:so-heavynode or G@role:so-receiver or G@role:so-helix ',
|
||||||
fun='network.ip_addrs',
|
fun='network.ip_addrs',
|
||||||
tgt_type='compound') | dictsort()
|
tgt_type='compound') | dictsort()
|
||||||
%}
|
%}
|
||||||
{% set hostname = minionid.split('_')[0] %}
|
|
||||||
|
{% set hostname = cached_grains[minionid]['host'] %}
|
||||||
{% set node_type = minionid.split('_')[1] %}
|
{% set node_type = minionid.split('_')[1] %}
|
||||||
{% if node_type not in node_types.keys() %}
|
{% if node_type not in node_types.keys() %}
|
||||||
{% do node_types.update({node_type: {hostname: ip[0]}}) %}
|
{% do node_types.update({node_type: {hostname: ip[0]}}) %}
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ actions:
|
|||||||
- filtertype: pattern
|
- filtertype: pattern
|
||||||
kind: regex
|
kind: regex
|
||||||
value: '^(logstash-.*|so-.*)$'
|
value: '^(logstash-.*|so-.*)$'
|
||||||
|
- filtertype: pattern
|
||||||
|
kind: regex
|
||||||
|
value: '^(so-case.*)$'
|
||||||
|
exclude: True
|
||||||
- filtertype: space
|
- filtertype: space
|
||||||
source: creation_date
|
source: creation_date
|
||||||
use_age: True
|
use_age: True
|
||||||
|
|||||||
@@ -34,9 +34,13 @@ overlimit() {
|
|||||||
|
|
||||||
closedindices() {
|
closedindices() {
|
||||||
|
|
||||||
INDICES=$({{ ELASTICCURL }} -s -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/_cat/indices?h=index\&expand_wildcards=closed 2> /dev/null)
|
# If we can't query Elasticsearch, then immediately return false.
|
||||||
|
{{ ELASTICCURL }} -s -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/_cat/indices?h=index\&expand_wildcards=closed >/dev/null 2>&1
|
||||||
[ $? -eq 1 ] && return false
|
[ $? -eq 1 ] && return false
|
||||||
echo ${INDICES} | grep -q -E "(logstash-|so-)"
|
# First, get the list of closed indices using _cat/indices?h=index\&expand_wildcards=closed.
|
||||||
|
# Next, filter out any so-case indices.
|
||||||
|
# Finally, use grep's -q option to return true if there are any remaining logstash- or so- indices.
|
||||||
|
{{ ELASTICCURL }} -s -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/_cat/indices?h=index\&expand_wildcards=closed | grep -v "so-case" | grep -q -E "(logstash-|so-)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for 2 conditions:
|
# Check for 2 conditions:
|
||||||
@@ -47,9 +51,10 @@ while overlimit && closedindices; do
|
|||||||
|
|
||||||
# We need to determine OLDEST_INDEX:
|
# We need to determine OLDEST_INDEX:
|
||||||
# First, get the list of closed indices using _cat/indices?h=index\&expand_wildcards=closed.
|
# First, get the list of closed indices using _cat/indices?h=index\&expand_wildcards=closed.
|
||||||
# Then, sort by date by telling sort to use hyphen as delimiter and then sort on the third field.
|
# Next, filter out any so-case indices and only select the remaining logstash- or so- indices.
|
||||||
|
# Then, sort by date by telling sort to use hyphen as delimiter and sort on the third field.
|
||||||
# Finally, select the first entry in that sorted list.
|
# Finally, select the first entry in that sorted list.
|
||||||
OLDEST_INDEX=$({{ ELASTICCURL }} -s -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/_cat/indices?h=index\&expand_wildcards=closed | grep -E "(logstash-|so-)" | sort -t- -k3 | head -1)
|
OLDEST_INDEX=$({{ ELASTICCURL }} -s -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/_cat/indices?h=index\&expand_wildcards=closed | grep -v "so-case" | grep -E "(logstash-|so-)" | sort -t- -k3 | head -1)
|
||||||
|
|
||||||
# Now that we've determined OLDEST_INDEX, ask Elasticsearch to delete it.
|
# Now that we've determined OLDEST_INDEX, ask Elasticsearch to delete it.
|
||||||
{{ ELASTICCURL }} -XDELETE -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/${OLDEST_INDEX}
|
{{ ELASTICCURL }} -XDELETE -k https://{{ELASTICSEARCH_HOST}}:{{ELASTICSEARCH_PORT}}/${OLDEST_INDEX}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ GRAFANA=1
|
|||||||
# HELIXAPIKEY=
|
# HELIXAPIKEY=
|
||||||
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
HNSENSOR=inherit
|
HNSENSOR=inherit
|
||||||
HOSTNAME=distributed-manager
|
HOSTNAME=Distributed-manager
|
||||||
install_type=MANAGER
|
install_type=MANAGER
|
||||||
INTERWEBS=AIRGAP
|
INTERWEBS=AIRGAP
|
||||||
# LSINPUTBATCHCOUNT=
|
# LSINPUTBATCHCOUNT=
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ ZEEKVERSION=ZEEK
|
|||||||
# HELIXAPIKEY=
|
# HELIXAPIKEY=
|
||||||
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
HNMANAGER=10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
|
||||||
HNSENSOR=inherit
|
HNSENSOR=inherit
|
||||||
HOSTNAME=distributed-sensor
|
HOSTNAME=Distributed-sensor
|
||||||
install_type=SENSOR
|
install_type=SENSOR
|
||||||
# LSINPUTBATCHCOUNT=
|
# LSINPUTBATCHCOUNT=
|
||||||
# LSINPUTTHREADS=
|
# LSINPUTTHREADS=
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user