Compare commits

...

78 Commits

Author SHA1 Message Date
Mike Reeves
ebc1152376 Rebuild all analyzer source-packages for Python 3.14
Full rebuild of all analyzer source-packages via pip download targeting
cp314/manylinux_2_17_x86_64 to match the so-soc Dockerfile base image
(python:3.14.3-slim).

Replaces cp313 wheels with cp314 for pyyaml and charset_normalizer,
and picks up certifi 2026.2.25 (from 2026.1.4).
2026-03-16 18:58:24 -04:00
Mike Reeves
625bfb3ba7 Rebuild analyzer source-packages wheels for Python 3.14
The so-soc Dockerfile base image moved to python:3.14.3-slim but
analyzer source-packages still contained cp313 wheels for pyyaml and
charset_normalizer, causing pip install failures at container startup.

Replace all cp313 wheels with cp314 builds (pyyaml 6.0.3,
charset_normalizer 3.4.6) across all 14 analyzers and update the
CI python-test workflow to match.
2026-03-16 18:58:23 -04:00
Jason Ertel
c11b83c712 Merge pull request #15622 from Security-Onion-Solutions/jertel/wip
fix health check for new hydra version
2026-03-16 18:45:34 -04:00
Jason Ertel
a3b471c1d1 fix health check for new hydra version 2026-03-16 18:43:36 -04:00
Mike Reeves
64bb0dfb5b Merge pull request #15610 from Security-Onion-Solutions/moresoup
Add -r flag to so-yaml get and migrate pcap pillar to suricata
2026-03-16 17:36:32 -04:00
Mike Reeves
ddb26a9f42 Add test for raw dict output in so-yaml get to reach 100% coverage
Covers the dict/list branch in raw mode (line 358) that was missing
test coverage.
2026-03-16 17:19:14 -04:00
Josh Patterson
5b2def6fdd Merge pull request #15618 from Security-Onion-Solutions/delta
forcedType bool
2026-03-16 12:50:06 -04:00
Josh Patterson
9b6d29212d forcedType bool 2026-03-16 12:46:25 -04:00
Josh Patterson
c1bff03b1c Merge pull request #15615 from Security-Onion-Solutions/delta
initialize pcap-log
2026-03-14 20:33:28 -04:00
Josh Patterson
b00f113658 initialize pcap-log 2026-03-14 19:45:50 -04:00
Jason Ertel
7dcd923ebf Merge pull request #15612 from Security-Onion-Solutions/jertel/wip
API errors will no longer redirect
2026-03-13 17:04:51 -04:00
Jason Ertel
1fcd8a7c1a API errors will no longer redirect 2026-03-13 16:53:38 -04:00
Mike Reeves
4a89f7f26b Add -r flag to so-yaml get for raw output without YAML formatting
Preserve default get behavior with yaml.safe_dump output for backwards
compatibility. Add -r flag for clean scalar output used by soup pcap
migration.
2026-03-13 16:24:41 -04:00
Mike Reeves
a9196348ab Merge pull request #15609 from Security-Onion-Solutions/moresoup
Moresoup
2026-03-13 16:16:35 -04:00
Mike Reeves
12dec366e0 Fix so-yaml get to output booleans in YAML format and add bool test 2026-03-13 15:58:47 -04:00
Mike Reeves
1713f6af76 Fix so-yaml tests to match scalar output without document end marker 2026-03-13 15:53:53 -04:00
Mike Reeves
7f4adb70bd Fix so-yaml get to print scalar values without YAML document end marker 2026-03-13 15:34:04 -04:00
Mike Reeves
e2483e4be0 Fix so-yaml addKey crash when intermediate key has None value 2026-03-13 15:22:29 -04:00
Mike Reeves
322c0b8d56 Move pcap.enabled under suricata.pcap.enabled in so-minion 2026-03-13 15:14:19 -04:00
Mike Reeves
81c1d8362d Fix pcap migration to strip yaml document end marker from so-yaml output 2026-03-13 15:09:37 -04:00
Mike Reeves
d1156ee3fd Merge pull request #15608 from Security-Onion-Solutions/moresoup
Improve soup version checks and migrate pcap to suricata
2026-03-13 14:59:57 -04:00
Mike Reeves
18f971954b Improve soup version checks and migrate pcap pillar to suricata
Consolidate version checks to use regex patterns for 2.4.21X and 3.x
versions. Add migrate_pcap_to_suricata to move pcap.enabled to
suricata.pcap.enabled in minion and pcap pillar files during upgrade.
2026-03-13 14:54:23 -04:00
Josh Patterson
e55ac7062c Merge pull request #15574 from Security-Onion-Solutions/delta
pcap cleanup state. enable/disable pcap for suricata in soc
2026-03-13 14:54:06 -04:00
Josh Patterson
c178eada22 Merge pull request #15595 from Security-Onion-Solutions/TOoSmOotH-patch-5
Update version check to include 2.4.211
2026-03-13 14:32:59 -04:00
Doug Burks
92213e302f Merge pull request #15603 from Security-Onion-Solutions/dougburks-patch-1
Remove version 3.0.0 from 2.4 discussion template
2026-03-13 10:53:24 -04:00
Doug Burks
72193b0249 Remove version 3.0.0 from 2.4 discussion template 2026-03-13 10:51:25 -04:00
Mike Reeves
066d7106b0 Merge pull request #15599 from Security-Onion-Solutions/TOoSmOotH-patch-6
Add version 2.4.211 to discussion template
2026-03-13 10:49:12 -04:00
Doug Burks
589de8e361 Update discussion template by removing unsupported options
Removed unsupported network installation options for Red Hat, Ubuntu, and Debian.
2026-03-13 10:48:15 -04:00
Doug Burks
914cd8b611 Add discussion template for Security Onion 3.0 2026-03-12 13:52:41 -04:00
Doug Burks
845290595e Delete .github/DISCUSSION_TEMPLATE/3.0.yml 2026-03-12 13:52:14 -04:00
Doug Burks
544b60d111 Add discussion template for version 3.0 2026-03-12 13:51:27 -04:00
Mike Reeves
aa0787b0ff Add version 2.4.211 to discussion template 2026-03-12 13:11:43 -04:00
Mike Reeves
89f144df75 Remove upgrade instructions for 2.4 branch
Removed outdated instructions for upgrading to the latest 2.4 branch.
2026-03-11 16:05:06 -04:00
Mike Reeves
cfccbe2bed Update version check to include 2.4.211 2026-03-11 15:59:23 -04:00
Josh Patterson
3dd9a06d67 Merge pull request #15591 from Security-Onion-Solutions/temp-3dev-merge
remove 10T virtual disk limit. URL_BASE to vm hosts file
2026-03-11 15:54:08 -04:00
Josh Patterson
4bfe9039ed Merge pull request #15594 from Security-Onion-Solutions/temp/ulimit-cherry-pick
set container ulimits to default
2026-03-11 14:49:36 -04:00
Josh Patterson
75cddbf444 set container ulimits to default 2026-03-11 14:46:29 -04:00
Josh Patterson
89b18341c5 add URL_BASE to vm hosts file 2026-03-11 12:29:13 -04:00
Josh Patterson
90137f7093 remove 10T limit for virtual disk 2026-03-11 12:29:10 -04:00
Josh Patterson
480187b1f5 Merge pull request #15575 from Security-Onion-Solutions/stenoclean
cleanup steno. sensor run pcap.cleanup
2026-03-10 16:14:22 -04:00
Josh Patterson
b3ed54633f cleanup steno. sensor run pcap.cleanup 2026-03-10 16:09:32 -04:00
Josh Patterson
0360d4145c sensors run pcap.cleanup state 2026-03-10 15:58:26 -04:00
Mike Reeves
2bec5afcdd Merge pull request #15567 from Security-Onion-Solutions/soupupdates
Refactor upgrade functions and version checks
2026-03-10 15:14:17 -04:00
Mike Reeves
4539024280 Add minimum version check and fix function call syntax in soup
Require at least Security Onion 2.4.210 before allowing upgrade.
Fix determine_elastic_agent_upgrade() call syntax (remove parens).
2026-03-10 15:05:52 -04:00
Josh Patterson
398bd0c1da Update VERSION 2026-03-10 15:00:19 -04:00
Mike Reeves
91759587f5 Update version numbers for upgrade scripts 2026-03-10 14:58:43 -04:00
Mike Reeves
bc9841ea8c Refactor upgrade functions and remove unused code
Removed deprecated functions and updated version checks for upgrades.
2026-03-10 14:45:40 -04:00
Josh Patterson
32241faf55 cleanup steno 2026-03-10 14:02:28 -04:00
Mike Reeves
685e22bd68 soup cleanup 2026-03-10 11:58:06 -04:00
Josh Patterson
88de779ff7 revert to salt 3006.19 2026-03-10 11:31:56 -04:00
Josh Patterson
d452694c55 enable/disable suricata pcap 2026-03-10 11:30:24 -04:00
Josh Patterson
7fba8ac2b4 Merge remote-tracking branch 'origin/3/dev' into delta 2026-03-10 11:24:44 -04:00
Josh Brower
0738208627 Merge pull request #15572 from Security-Onion-Solutions/fix/suricatatest
Update so-suricata-testrule for idstools removal
2026-03-10 11:19:36 -04:00
Josh Brower
a3720219d8 add missing cp 2026-03-10 11:11:11 -04:00
Josh Brower
385726b87c update paths 2026-03-10 11:09:56 -04:00
Mike Reeves
d78a5867b8 Refactor upgrade functions and version checks
Removed redundant upgrade functions and streamlined version checks.
2026-03-09 17:10:18 -04:00
Jason Ertel
ad960c2101 Merge pull request #15566 from Security-Onion-Solutions/jertel/wip
pcapout still used for extracts
2026-03-09 15:01:22 -04:00
Jason Ertel
7f07c96a2f pcapout still used for extracts 2026-03-09 14:58:27 -04:00
Jason Ertel
90bea975d0 Merge pull request #15563 from Security-Onion-Solutions/jertel/wip
remove steno
2026-03-09 11:46:37 -04:00
Jason Ertel
e8adea3022 restore pcapout since it's still used 2026-03-07 08:20:08 -05:00
Jason Ertel
71839bc87f remove steno 2026-03-06 15:45:36 -05:00
Josh Patterson
6809a40257 Merge remote-tracking branch 'origin/delta' into delta 2026-03-05 16:40:02 -05:00
Josh Patterson
cea55a72c3 upgrade salt 3006.23 2026-03-05 16:35:15 -05:00
Jason Ertel
e38a4a21ee version for delta 2026-03-05 11:52:51 -05:00
Jason Ertel
7ac1e767ab Merge pull request #15556 from Security-Onion-Solutions/jertel/wip
update 2.4 references to 3
2026-03-05 11:38:50 -05:00
Jason Ertel
2c4d833a5b update 2.4 references to 3 2026-03-05 11:05:19 -05:00
Jason Ertel
41d3dd0aa5 Merge pull request #15554 from Security-Onion-Solutions/jertel/wip
update repo readme
2026-03-04 15:54:38 -05:00
Josh Patterson
6050ab6b21 Merge pull request #15555 from Security-Onion-Solutions/altwebcert
Support additional alt names in web cert
2026-03-04 15:50:05 -05:00
Jason Ertel
ae05251359 update repo readme 2026-03-04 15:48:16 -05:00
Jason Ertel
f23158aed5 update repo readme 2026-03-04 15:46:19 -05:00
Josh Patterson
b03b75315d Support additional alt names in web cert 2026-03-04 15:45:03 -05:00
Jason Ertel
cbd98efaf4 update repo readme 2026-03-04 15:44:48 -05:00
Jason Ertel
1f7bf1fd88 update repo readme 2026-03-04 15:42:06 -05:00
Mike Reeves
179019b136 Merge pull request #15545 from Security-Onion-Solutions/TOoSmOotH-patch-1
Add version 3.0.0 to discussion template
2026-03-02 15:23:48 -05:00
Mike Reeves
ac022acbbe Add version 3.0.0 to discussion template 2026-03-02 15:22:10 -05:00
Mike Reeves
6bfe020c3b Merge pull request #15544 from Security-Onion-Solutions/3/dev-merge-fix
3/dev merge fix
2026-03-02 15:21:12 -05:00
Mike Reeves
55a960bbc5 Merge 2.4/main into 3/dev, resolve VERSION conflict to 3.0.0 2026-03-02 15:17:50 -05:00
Mike Reeves
80f8fdc8d3 Change version from 2.4.201 to UNRELEASED 2026-01-29 12:55:54 -05:00
155 changed files with 493 additions and 1932 deletions

View File

@@ -2,13 +2,11 @@ body:
- type: markdown
attributes:
value: |
⚠️ This category is solely for conversations related to Security Onion 2.4 ⚠️
If your organization needs more immediate, enterprise grade professional support, with one-on-one virtual meetings and screensharing, contact us via our website: https://securityonion.com/support
- type: dropdown
attributes:
label: Version
description: Which version of Security Onion 2.4.x are you asking about?
description: Which version of Security Onion are you asking about?
options:
-
- 2.4.10
@@ -35,6 +33,7 @@ body:
- 2.4.200
- 2.4.201
- 2.4.210
- 2.4.211
- Other (please provide detail below)
validations:
required: true

177
.github/DISCUSSION_TEMPLATE/3-0.yml vendored Normal file
View File

@@ -0,0 +1,177 @@
body:
- type: markdown
attributes:
value: |
If your organization needs more immediate, enterprise grade professional support, with one-on-one virtual meetings and screensharing, contact us via our website: https://securityonion.com/support
- type: dropdown
attributes:
label: Version
description: Which version of Security Onion are you asking about?
options:
-
- 3.0.0
- Other (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Installation Method
description: How did you install Security Onion?
options:
-
- Security Onion ISO image
- Cloud image (Amazon, Azure, Google)
- Network installation on Oracle 9 (unsupported)
- Other (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Description
description: >
Is this discussion about installation, configuration, upgrading, or other?
options:
-
- installation
- configuration
- upgrading
- other (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Installation Type
description: >
When you installed, did you choose Import, Eval, Standalone, Distributed, or something else?
options:
-
- Import
- Eval
- Standalone
- Distributed
- other (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Location
description: >
Is this deployment in the cloud, on-prem with Internet access, or airgap?
options:
-
- cloud
- on-prem with Internet access
- airgap
- other (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Hardware Specs
description: >
Does your hardware meet or exceed the minimum requirements for your installation type as shown at https://securityonion.net/docs/hardware?
options:
-
- Meets minimum requirements
- Exceeds minimum requirements
- Does not meet minimum requirements
- other (please provide detail below)
validations:
required: true
- type: input
attributes:
label: CPU
description: How many CPU cores do you have?
validations:
required: true
- type: input
attributes:
label: RAM
description: How much RAM do you have?
validations:
required: true
- type: input
attributes:
label: Storage for /
description: How much storage do you have for the / partition?
validations:
required: true
- type: input
attributes:
label: Storage for /nsm
description: How much storage do you have for the /nsm partition?
validations:
required: true
- type: dropdown
attributes:
label: Network Traffic Collection
description: >
Are you collecting network traffic from a tap or span port?
options:
-
- tap
- span port
- other (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Network Traffic Speeds
description: >
How much network traffic are you monitoring?
options:
-
- Less than 1Gbps
- 1Gbps to 10Gbps
- more than 10Gbps
validations:
required: true
- type: dropdown
attributes:
label: Status
description: >
Does SOC Grid show all services on all nodes as running OK?
options:
-
- Yes, all services on all nodes are running OK
- No, one or more services are failed (please provide detail below)
validations:
required: true
- type: dropdown
attributes:
label: Salt Status
description: >
Do you get any failures when you run "sudo salt-call state.highstate"?
options:
-
- Yes, there are salt failures (please provide detail below)
- No, there are no failures
validations:
required: true
- type: dropdown
attributes:
label: Logs
description: >
Are there any additional clues in /opt/so/log/?
options:
-
- Yes, there are additional clues in /opt/so/log/ (please provide detail below)
- No, there are no additional clues
validations:
required: true
- type: textarea
attributes:
label: Detail
description: Please read our discussion guidelines at https://github.com/Security-Onion-Solutions/securityonion/discussions/1720 and then provide detailed information to help us help you.
placeholder: |-
STOP! Before typing, please read our discussion guidelines at https://github.com/Security-Onion-Solutions/securityonion/discussions/1720 in their entirety!
If your organization needs more immediate, enterprise grade professional support, with one-on-one virtual meetings and screensharing, contact us via our website: https://securityonion.com/support
validations:
required: true
- type: checkboxes
attributes:
label: Guidelines
options:
- label: I have read the discussion guidelines at https://github.com/Security-Onion-Solutions/securityonion/discussions/1720 and assert that I have followed the guidelines.
required: true

View File

@@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
python-version: ["3.14"]
python-code-path: ["salt/sensoroni/files/analyzers", "salt/manager/tools/sbin"]
steps:

View File

@@ -1,50 +1,58 @@
## Security Onion 2.4
<p align="center">
<img src="https://securityonionsolutions.com/logo/logo-so-onion-dark.svg" width="400" alt="Security Onion Logo">
</p>
Security Onion 2.4 is here!
# Security Onion
## Screenshots
Security Onion is a free and open Linux distribution for threat hunting, enterprise security monitoring, and log management. It includes a comprehensive suite of tools designed to work together to provide visibility into your network and host activity.
Alerts
![Alerts](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/50_alerts.png)
## ✨ Features
Dashboards
![Dashboards](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/53_dashboards.png)
Security Onion includes everything you need to monitor your network and host systems:
Hunt
![Hunt](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/56_hunt.png)
* **Security Onion Console (SOC)**: A unified web interface for analyzing security events and managing your grid.
* **Elastic Stack**: Powerful search backed by Elasticsearch.
* **Intrusion Detection**: Network-based IDS with Suricata and host-based monitoring with Elastic Fleet.
* **Network Metadata**: Detailed network metadata generated by Zeek or Suricata.
* **Full Packet Capture**: Retain and analyze raw network traffic with Suricata PCAP.
Detections
![Detections](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/57_detections.png)
## ⭐ Security Onion Pro
PCAP
![PCAP](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/62_pcap.png)
For organizations and enterprises requiring advanced capabilities, **Security Onion Pro** offers additional features designed for scale and efficiency:
Grid
![Grid](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/75_grid.png)
* **Onion AI**: Leverage powerful AI-driven insights to accelerate your analysis and investigations.
* **Enterprise Features**: Enhanced tools and integrations tailored for enterprise-grade security operations.
Config
![Config](https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion-docs/2.4/images/87_config.png)
For more information, visit the [Security Onion Pro](https://securityonionsolutions.com/pro) page.
### Release Notes
## ☁️ Cloud Deployment
https://securityonion.net/docs/release-notes
Security Onion is available and ready to deploy in the **AWS**, **Azure**, and **Google Cloud (GCP)** marketplaces.
### Requirements
## 🚀 Getting Started
https://securityonion.net/docs/hardware
| Goal | Resource |
| :--- | :--- |
| **Download** | [Security Onion ISO](https://securityonion.net/docs/download) |
| **Requirements** | [Hardware Guide](https://securityonion.net/docs/hardware) |
| **Install** | [Installation Instructions](https://securityonion.net/docs/installation) |
| **What's New** | [Release Notes](https://securityonion.net/docs/release-notes) |
### Download
## 📖 Documentation & Support
https://securityonion.net/docs/download
For more detailed information, please visit our [Documentation](https://docs.securityonion.net).
### Installation
* **FAQ**: [Frequently Asked Questions](https://securityonion.net/docs/faq)
* **Community**: [Discussions & Support](https://securityonion.net/docs/community-support)
* **Training**: [Official Training](https://securityonion.net/training)
https://securityonion.net/docs/installation
## 🤝 Contributing
### FAQ
We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to get involved.
https://securityonion.net/docs/faq
## 🛡️ License
### Feedback
Security Onion is licensed under the terms of the license found in the [LICENSE](LICENSE) file.
https://securityonion.net/docs/community-support
---
*Built with 🧅 by Security Onion Solutions.*

View File

@@ -4,6 +4,7 @@
| Version | Supported |
| ------- | ------------------ |
| 3.x | :white_check_mark: |
| 2.4.x | :white_check_mark: |
| 2.3.x | :x: |
| 16.04.x | :x: |

View File

@@ -1 +1 @@
2.4.210
3.0.0

View File

@@ -87,8 +87,6 @@ base:
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- minions.{{ grains.id }}
@@ -134,8 +132,6 @@ base:
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- minions.{{ grains.id }}
@@ -185,8 +181,6 @@ base:
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- minions.{{ grains.id }}
@@ -209,8 +203,6 @@ base:
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- strelka.soc_strelka
@@ -297,8 +289,6 @@ base:
- zeek.adv_zeek
- bpf.soc_bpf
- bpf.adv_bpf
- pcap.soc_pcap
- pcap.adv_pcap
- suricata.soc_suricata
- suricata.adv_suricata
- strelka.soc_strelka

View File

@@ -38,7 +38,6 @@
] %}
{% set sensor_states = [
'pcap',
'suricata',
'healthcheck',
'tcpreplay',

View File

@@ -1,21 +1,15 @@
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% set PCAP_BPF_STATUS = 0 %}
{% set STENO_BPF_COMPILED = "" %}
{% if GLOBALS.pcap_engine == "TRANSITION" %}
{% set PCAPBPF = ["ip and host 255.255.255.1 and port 1"] %}
{% else %}
{% import_yaml 'bpf/defaults.yaml' as BPFDEFAULTS %}
{% set BPFMERGED = salt['pillar.get']('bpf', BPFDEFAULTS.bpf, merge=True) %}
{% import 'bpf/macros.jinja' as MACROS %}
{{ MACROS.remove_comments(BPFMERGED, 'pcap') }}
{% set PCAPBPF = BPFMERGED.pcap %}
{% endif %}
{% if PCAPBPF %}
{% set PCAP_BPF_CALC = salt['cmd.script']('salt://common/tools/sbin/so-bpf-compile', GLOBALS.sensor.interface + ' ' + PCAPBPF|join(" "),cwd='/root') %}
{% if PCAP_BPF_CALC['retcode'] == 0 %}
{% set PCAP_BPF_STATUS = 1 %}
{% set STENO_BPF_COMPILED = ",\\\"--filter=" + PCAP_BPF_CALC['stdout'] + "\\\"" %}
{% endif %}
{% endif %}

View File

@@ -8,5 +8,12 @@
"base": "172.17.0.0/24",
"size": 24
}
]
],
"default-ulimits": {
"nofile": {
"Name": "nofile",
"Soft": 1048576,
"Hard": 1048576
}
}
}

View File

@@ -3,8 +3,6 @@
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% if '2.4' in salt['cp.get_file_str']('/etc/soversion') %}
{% import_yaml '/opt/so/saltstack/local/pillar/global/soc_global.sls' as SOC_GLOBAL %}
{% if SOC_GLOBAL.global.airgap %}
{% set UPDATE_DIR='/tmp/soagupdate/SecurityOnion' %}
@@ -120,23 +118,3 @@ copy_bootstrap-salt_sbin:
- source: {{UPDATE_DIR}}/salt/salt/scripts/bootstrap-salt.sh
- force: True
- preserve: True
{# this is added in 2.4.120 to remove salt repo files pointing to saltproject.io to accomodate the move to broadcom and new bootstrap-salt script #}
{% if salt['pkg.version_cmp'](SOVERSION, '2.4.120') == -1 %}
{% set saltrepofile = '/etc/yum.repos.d/salt.repo' %}
{% if grains.os_family == 'Debian' %}
{% set saltrepofile = '/etc/apt/sources.list.d/salt.list' %}
{% endif %}
remove_saltproject_io_repo_manager:
file.absent:
- name: {{ saltrepofile }}
{% endif %}
{% else %}
fix_23_soup_sbin:
cmd.run:
- name: curl -s -f -o /usr/sbin/soup https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.3/main/salt/common/tools/sbin/soup
fix_23_soup_salt:
cmd.run:
- name: curl -s -f -o /opt/so/saltstack/defalt/salt/common/tools/sbin/soup https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/2.3/main/salt/common/tools/sbin/soup
{% endif %}

View File

@@ -16,7 +16,7 @@
if [ "$#" -lt 2 ]; then
cat 1>&2 <<EOF
$0 compiles a BPF expression to be passed to stenotype to apply a socket filter.
$0 compiles a BPF expression to be passed to PCAP to apply a socket filter.
Its first argument is the interface (link type is required) and all other arguments
are passed to TCPDump.

View File

@@ -333,8 +333,8 @@ get_elastic_agent_vars() {
if [ -f "$defaultsfile" ]; then
ELASTIC_AGENT_TARBALL_VERSION=$(egrep " +version: " $defaultsfile | awk -F: '{print $2}' | tr -d '[:space:]')
ELASTIC_AGENT_URL="https://repo.securityonion.net/file/so-repo/prod/2.4/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz"
ELASTIC_AGENT_MD5_URL="https://repo.securityonion.net/file/so-repo/prod/2.4/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5"
ELASTIC_AGENT_URL="https://repo.securityonion.net/file/so-repo/prod/3/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz"
ELASTIC_AGENT_MD5_URL="https://repo.securityonion.net/file/so-repo/prod/3/elasticagent/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5"
ELASTIC_AGENT_FILE="/nsm/elastic-fleet/artifacts/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.tar.gz"
ELASTIC_AGENT_MD5="/nsm/elastic-fleet/artifacts/elastic-agent_SO-$ELASTIC_AGENT_TARBALL_VERSION.md5"
ELASTIC_AGENT_EXPANSION_DIR=/nsm/elastic-fleet/artifacts/beats/elastic-agent

View File

@@ -32,7 +32,6 @@ container_list() {
"so-nginx"
"so-pcaptools"
"so-soc"
"so-steno"
"so-suricata"
"so-telegraf"
"so-zeek"
@@ -58,7 +57,6 @@ container_list() {
"so-pcaptools"
"so-redis"
"so-soc"
"so-steno"
"so-strelka-backend"
"so-strelka-manager"
"so-suricata"
@@ -71,7 +69,6 @@ container_list() {
"so-logstash"
"so-nginx"
"so-redis"
"so-steno"
"so-suricata"
"so-soc"
"so-telegraf"

View File

@@ -179,7 +179,6 @@ if [[ $EXCLUDE_KNOWN_ERRORS == 'Y' ]]; then
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|salt-minion-check" # bug in early 2.4 place Jinja script in non-jinja salt dir causing cron output errors
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|monitoring.metrics" # known issue with elastic agent casting the field incorrectly if an integer value shows up before a float
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|repodownload.conf" # known issue with reposync on pre-2.4.20
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|missing versions record" # stenographer corrupt index
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|soc.field." # known ingest type collisions issue with earlier versions of SO
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|error parsing signature" # Malformed Suricata rule, from upstream provider
EXCLUDED_ERRORS="$EXCLUDED_ERRORS|sticky buffer has no matches" # Non-critical Suricata error

View File

@@ -55,19 +55,22 @@ if [ $SKIP -ne 1 ]; then
fi
delete_pcap() {
PCAP_DATA="/nsm/pcap/"
[ -d $PCAP_DATA ] && so-pcap-stop && rm -rf $PCAP_DATA/* && so-pcap-start
PCAP_DATA="/nsm/suripcap/"
[ -d $PCAP_DATA ] && rm -rf $PCAP_DATA/*
}
delete_suricata() {
SURI_LOG="/nsm/suricata/"
[ -d $SURI_LOG ] && so-suricata-stop && rm -rf $SURI_LOG/* && so-suricata-start
[ -d $SURI_LOG ] && rm -rf $SURI_LOG/*
}
delete_zeek() {
ZEEK_LOG="/nsm/zeek/logs/"
[ -d $ZEEK_LOG ] && so-zeek-stop && rm -rf $ZEEK_LOG/* && so-zeek-start
}
so-suricata-stop
delete_pcap
delete_suricata
delete_zeek
so-suricata-start

View File

@@ -23,7 +23,6 @@ if [ $# -ge 1 ]; then
fi
case $1 in
"steno") docker stop so-steno && docker rm so-steno && salt-call state.apply pcap queue=True;;
"elastic-fleet") docker stop so-elastic-fleet && docker rm so-elastic-fleet && salt-call state.apply elasticfleet queue=True;;
*) docker stop so-$1 ; docker rm so-$1 ; salt-call state.apply $1 queue=True;;
esac

View File

@@ -72,7 +72,7 @@ clean() {
done
fi
## Clean up extracted pcaps from Steno
## Clean up extracted pcaps
PCAPS='/nsm/pcapout'
OLDEST_PCAP=$(find $PCAPS -type f -printf '%T+ %p\n' | sort -n | head -n 1)
if [ -z "$OLDEST_PCAP" -o "$OLDEST_PCAP" == ".." -o "$OLDEST_PCAP" == "." ]; then

View File

@@ -23,7 +23,6 @@ if [ $# -ge 1 ]; then
case $1 in
"all") salt-call state.highstate queue=True;;
"steno") if docker ps | grep -q so-$1; then printf "\n$1 is already running!\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply pcap queue=True; fi ;;
"elastic-fleet") if docker ps | grep -q so-$1; then printf "\n$1 is already running!\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply elasticfleet queue=True; fi ;;
*) if docker ps | grep -E -q '^so-$1$'; then printf "\n$1 is already running\n\n"; else docker rm so-$1 >/dev/null 2>&1 ; salt-call state.apply $1 queue=True; fi ;;
esac

View File

@@ -174,11 +174,6 @@ docker:
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-steno':
final_octet: 99
custom_bind_mounts: []
extra_hosts: []
extra_env: []
'so-suricata':
final_octet: 99
custom_bind_mounts: []

View File

@@ -62,7 +62,6 @@ docker:
so-idh: *dockerOptions
so-elastic-agent: *dockerOptions
so-telegraf: *dockerOptions
so-steno: *dockerOptions
so-suricata:
final_octet:
description: Last octet of the container IP address.

View File

@@ -1,3 +1,3 @@
global:
pcapengine: STENO
pcapengine: SURICATA
pipeline: REDIS

View File

@@ -18,13 +18,11 @@ global:
regexFailureMessage: You must enter either ZEEK or SURICATA.
global: True
pcapengine:
description: Which engine to use for generating pcap. Options are STENO, SURICATA or TRANSITION.
regex: ^(STENO|SURICATA|TRANSITION)$
description: Which engine to use for generating pcap. Currently only SURICATA is supported.
regex: ^(SURICATA)$
options:
- STENO
- SURICATA
- TRANSITION
regexFailureMessage: You must enter either STENO, SURICATA or TRANSITION.
regexFailureMessage: You must enter either SURICATA.
global: True
ids:
description: Which IDS engine to use. Currently only Suricata is supported.

View File

@@ -1,27 +0,0 @@
[{
"apiVersion": "influxdata.com/v2alpha1",
"kind": "CheckThreshold",
"metadata": {
"name": "steno-packet-loss"
},
"spec": {
"description": "Triggers when the average percent of packet loss is above the defined threshold. To tune this alert, modify the value for the appropriate alert level.",
"every": "1m",
"name": "Stenographer Packet Loss",
"query": "from(bucket: \"telegraf/so_short_term\")\n |\u003e range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |\u003e filter(fn: (r) =\u003e r[\"_measurement\"] == \"stenodrop\")\n |\u003e filter(fn: (r) =\u003e r[\"_field\"] == \"drop\")\n |\u003e aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n |\u003e yield(name: \"mean\")",
"status": "active",
"statusMessageTemplate": "Stenographer Packet Loss on node ${r.host} has reached the ${ r._level } threshold. The current packet loss is ${ r.drop }%.",
"thresholds": [
{
"level": "CRIT",
"type": "greater",
"value": 5
},
{
"level": "WARN",
"type": "greater",
"value": 3
}
]
}
}]

File diff suppressed because one or more lines are too long

View File

@@ -180,16 +180,6 @@ logrotate:
- extension .log
- dateext
- dateyesterday
/opt/so/log/stenographer/*_x_log:
- daily
- rotate 14
- missingok
- copytruncate
- compress
- create
- extension .log
- dateext
- dateyesterday
/opt/so/log/salt/so-salt-minion-check:
- daily
- rotate 14

View File

@@ -112,13 +112,6 @@ logrotate:
multiline: True
global: True
forcedType: "[]string"
"/opt/so/log/stenographer/*_x_log":
description: List of logrotate options for this file.
title: /opt/so/log/stenographer/*.log
advanced: True
multiline: True
global: True
forcedType: "[]string"
"/opt/so/log/salt/so-salt-minion-check":
description: List of logrotate options for this file.
title: /opt/so/log/salt/so-salt-minion-check

View File

@@ -1,2 +1,2 @@
https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9
https://repo-alt.securityonion.net/prod/2.4/oracle/9
https://repo.securityonion.net/file/so-repo/prod/3/oracle/9
https://repo-alt.securityonion.net/prod/3/oracle/9

View File

@@ -134,8 +134,8 @@ function require() {
function verifyEnvironment() {
require "jq"
require "curl"
response=$(curl -Ss -L ${hydraUrl}/)
[[ "$response" != *"Error 404"* ]] && fail "Unable to communicate with Hydra; specify URL via HYDRA_URL environment variable"
response=$(curl -Ss -L ${hydraUrl}/health/alive)
[[ "$response" != '{"status":"ok"}' ]] && fail "Unable to communicate with Hydra; specify URL via HYDRA_URL environment variable"
}
function createFile() {

View File

@@ -462,19 +462,14 @@ function add_sensor_to_minion() {
echo " lb_procs: '$CORECOUNT'"
echo "suricata:"
echo " enabled: True "
echo " pcap:"
echo " enabled: True"
if [[ $is_pcaplimit ]]; then
echo " pcap:"
echo " maxsize: $MAX_PCAP_SPACE"
fi
echo " config:"
echo " af-packet:"
echo " threads: '$CORECOUNT'"
echo "pcap:"
echo " enabled: True"
if [[ $is_pcaplimit ]]; then
echo " config:"
echo " diskfreepercentage: $DFREEPERCENT"
fi
echo " "
} >> $PILLARFILE
if [ $? -ne 0 ]; then

View File

@@ -143,7 +143,7 @@ show_usage() {
echo " -v Show verbose output (files changed/added/deleted)"
echo " -vv Show very verbose output (includes file diffs)"
echo " --test Test mode - show what would change without making changes"
echo " branch Git branch to checkout (default: 2.4/main)"
echo " branch Git branch to checkout (default: 3/main)"
echo ""
echo "Examples:"
echo " $0 # Normal operation"
@@ -193,7 +193,7 @@ done
# Set default branch if not provided
if [ -z "$BRANCH" ]; then
BRANCH=2.4/main
BRANCH=3/main
fi
got_root

View File

@@ -22,7 +22,7 @@ def showUsage(args):
print(' removelistitem - Remove a list item from a yaml key, if it exists and is a list. Requires KEY and LISTITEM args.', file=sys.stderr)
print(' replacelistobject - Replace a list object based on a condition. Requires KEY, CONDITION_FIELD, CONDITION_VALUE, and JSON_OBJECT args.', file=sys.stderr)
print(' add - Add a new key and set its value. Fails if key already exists. Requires KEY and VALUE args.', file=sys.stderr)
print(' get - Displays (to stdout) the value stored in the given key. Requires KEY arg.', file=sys.stderr)
print(' get [-r] - Displays (to stdout) the value stored in the given key. Requires KEY arg. Use -r for raw output without YAML formatting.', file=sys.stderr)
print(' remove - Removes a yaml key, if it exists. Requires KEY arg.', file=sys.stderr)
print(' replace - Replaces (or adds) a new key and set its value. Requires KEY and VALUE args.', file=sys.stderr)
print(' help - Prints this usage information.', file=sys.stderr)
@@ -256,7 +256,7 @@ def replacelistobject(args):
def addKey(content, key, value):
pieces = key.split(".", 1)
if len(pieces) > 1:
if not pieces[0] in content:
if pieces[0] not in content or content[pieces[0]] is None:
content[pieces[0]] = {}
addKey(content[pieces[0]], pieces[1], value)
elif key in content:
@@ -332,6 +332,11 @@ def getKeyValue(content, key):
def get(args):
raw = False
if len(args) > 0 and args[0] == '-r':
raw = True
args = args[1:]
if len(args) != 2:
print('Missing filename or key arg', file=sys.stderr)
showUsage(None)
@@ -346,7 +351,15 @@ def get(args):
print(f"Key '{key}' not found by so-yaml.py", file=sys.stderr)
return 2
print(yaml.safe_dump(output))
if raw:
if isinstance(output, bool):
print(str(output).lower())
elif isinstance(output, (dict, list)):
print(yaml.safe_dump(output).strip())
else:
print(output)
else:
print(yaml.safe_dump(output))
return 0

View File

@@ -395,6 +395,17 @@ class TestRemove(unittest.TestCase):
self.assertEqual(result, 0)
self.assertIn("45\n...", mock_stdout.getvalue())
def test_get_int_raw(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"
file = open(filename, "w")
file.write("{key1: { child1: 123, child2: { deep1: 45 } }, key2: false, key3: [e,f,g]}")
file.close()
result = soyaml.get(["-r", filename, "key1.child2.deep1"])
self.assertEqual(result, 0)
self.assertEqual("45\n", mock_stdout.getvalue())
def test_get_str(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"
@@ -406,6 +417,51 @@ class TestRemove(unittest.TestCase):
self.assertEqual(result, 0)
self.assertIn("hello\n...", mock_stdout.getvalue())
def test_get_str_raw(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"
file = open(filename, "w")
file.write("{key1: { child1: 123, child2: { deep1: \"hello\" } }, key2: false, key3: [e,f,g]}")
file.close()
result = soyaml.get(["-r", filename, "key1.child2.deep1"])
self.assertEqual(result, 0)
self.assertEqual("hello\n", mock_stdout.getvalue())
def test_get_bool(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"
file = open(filename, "w")
file.write("{key1: { child1: 123, child2: { deep1: 45 } }, key2: false, key3: [e,f,g]}")
file.close()
result = soyaml.get([filename, "key2"])
self.assertEqual(result, 0)
self.assertIn("false\n...", mock_stdout.getvalue())
def test_get_bool_raw(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"
file = open(filename, "w")
file.write("{key1: { child1: 123, child2: { deep1: 45 } }, key2: false, key3: [e,f,g]}")
file.close()
result = soyaml.get(["-r", filename, "key2"])
self.assertEqual(result, 0)
self.assertEqual("false\n", mock_stdout.getvalue())
def test_get_dict_raw(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"
file = open(filename, "w")
file.write("{key1: { child1: 123, child2: { deep1: 45 } }, key2: false, key3: [e,f,g]}")
file.close()
result = soyaml.get(["-r", filename, "key1"])
self.assertEqual(result, 0)
self.assertIn("child1: 123", mock_stdout.getvalue())
self.assertNotIn("...", mock_stdout.getvalue())
def test_get_list(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
filename = "/tmp/so-yaml_test-get.yaml"

File diff suppressed because it is too large Load Diff

View File

@@ -1,184 +0,0 @@
#!/bin/bash
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
UPDATE_URL=https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/refs/heads/3/main/VERSION
# Check if already running version 3
CURRENT_VERSION=$(cat /etc/soversion 2>/dev/null)
if [[ "$CURRENT_VERSION" =~ ^3\. ]]; then
echo ""
echo "========================================================================="
echo " Already Running Security Onion 3"
echo "========================================================================="
echo ""
echo " This system is already running Security Onion $CURRENT_VERSION."
echo " Use 'soup' to update within the 3.x release line."
echo ""
exit 0
fi
echo ""
echo "Checking PCAP settings."
echo ""
# Check pcapengine setting - must be SURICATA before upgrading to version 3
PCAP_ENGINE=$(lookup_pillar "pcapengine")
PCAP_DELETED=false
prompt_delete_pcap() {
read -rp " Would you like to delete all remaining Stenographer PCAP data? (y/N): " DELETE_PCAP
if [[ "$DELETE_PCAP" =~ ^[Yy]$ ]]; then
echo ""
echo " WARNING: This will permanently delete all Stenographer PCAP data"
echo " on all nodes. This action cannot be undone."
echo ""
read -rp " Are you sure? (y/N): " CONFIRM_DELETE
if [[ "$CONFIRM_DELETE" =~ ^[Yy]$ ]]; then
echo ""
echo " Deleting Stenographer PCAP data on all nodes..."
salt '*' cmd.run "rm -rf /nsm/pcap/* && rm -rf /nsm/pcapindex/*"
echo " Done."
PCAP_DELETED=true
else
echo ""
echo " Delete cancelled."
fi
fi
}
pcapengine_not_changed() {
echo ""
echo " PCAP engine must be set to SURICATA before upgrading to Security Onion 3."
echo " You can change this in SOC by navigating to:"
echo " Configuration -> global -> pcapengine"
}
prompt_change_engine() {
local current_engine=$1
echo ""
read -rp " Would you like to change the PCAP engine to SURICATA now? (y/N): " CHANGE_ENGINE
if [[ "$CHANGE_ENGINE" =~ ^[Yy]$ ]]; then
if [[ "$PCAP_DELETED" != "true" ]]; then
echo ""
echo " WARNING: Stenographer PCAP data was not deleted. If you proceed,"
echo " this data will no longer be accessible through SOC and will never"
echo " be automatically deleted. You will need to manually remove it later."
echo ""
read -rp " Continue with changing pcapengine to SURICATA? (y/N): " CONFIRM_CHANGE
if [[ ! "$CONFIRM_CHANGE" =~ ^[Yy]$ ]]; then
pcapengine_not_changed
return 1
fi
fi
echo ""
echo " Updating PCAP engine to SURICATA..."
so-yaml.py replace /opt/so/saltstack/local/pillar/global/soc_global.sls global.pcapengine SURICATA
echo " Done."
return 0
else
pcapengine_not_changed
return 1
fi
}
case "$PCAP_ENGINE" in
SURICATA)
echo "PCAP engine settings OK."
;;
TRANSITION|STENO)
echo ""
echo "========================================================================="
echo " PCAP Engine Check Failed"
echo "========================================================================="
echo ""
echo " Your PCAP engine is currently set to $PCAP_ENGINE."
echo ""
echo " Before upgrading to Security Onion 3, Stenographer PCAP data must be"
echo " removed and the PCAP engine must be set to SURICATA."
echo ""
echo " To check remaining Stenographer PCAP usage, run:"
echo " salt '*' cmd.run 'du -sh /nsm/pcap'"
echo ""
prompt_delete_pcap
if ! prompt_change_engine "$PCAP_ENGINE"; then
echo ""
exit 1
fi
;;
*)
echo ""
echo "========================================================================="
echo " PCAP Engine Check Failed"
echo "========================================================================="
echo ""
echo " Unable to determine the PCAP engine setting (got: '$PCAP_ENGINE')."
echo " Please ensure the PCAP engine is set to SURICATA."
echo " In SOC, navigate to Configuration -> global -> pcapengine"
echo " and change the value to SURICATA."
echo ""
exit 1
;;
esac
echo ""
echo "Checking Versions."
echo ""
# Check if Security Onion 3 has been released
VERSION=$(curl -sSf "$UPDATE_URL" 2>/dev/null)
if [[ -z "$VERSION" ]]; then
echo ""
echo "========================================================================="
echo " Unable to Check Version"
echo "========================================================================="
echo ""
echo " Could not retrieve version information from:"
echo " $UPDATE_URL"
echo ""
echo " Please check your network connection and try again."
echo ""
exit 1
fi
if [[ "$VERSION" == "UNRELEASED" ]]; then
echo ""
echo "========================================================================="
echo " Security Onion 3 Not Available"
echo "========================================================================="
echo ""
echo " Security Onion 3 has not been released yet."
echo ""
echo " Please check back later or visit https://securityonion.net for updates."
echo ""
exit 1
fi
# Validate version format (e.g., 3.0.2)
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ""
echo "========================================================================="
echo " Invalid Version"
echo "========================================================================="
echo ""
echo " Received unexpected version format: '$VERSION'"
echo ""
echo " Please check back later or visit https://securityonion.net for updates."
echo ""
exit 1
fi
echo "Security Onion 3 ($VERSION) is available. Upgrading..."
echo ""
# All checks passed - proceed with upgrade
BRANCH=3/main soup

View File

@@ -3,6 +3,7 @@ nginx:
external_suricata: False
ssl:
replace_cert: False
alt_names: []
config:
throttle_login_burst: 12
throttle_login_rate: 20

View File

@@ -60,6 +60,8 @@ http {
{%- endif %}
{%- if GLOBALS.is_manager %}
{%- set all_names = [GLOBALS.hostname, GLOBALS.url_base] + NGINXMERGED.ssl.alt_names %}
{%- set full_server_name = all_names | unique | join(' ') %}
server {
listen 80 default_server;
@@ -69,7 +71,7 @@ http {
server {
listen 8443;
server_name {{ GLOBALS.url_base }};
server_name {{ full_server_name }};
root /opt/socore/html;
location /artifacts/ {
try_files $uri =206;
@@ -112,7 +114,7 @@ http {
server {
listen 7788;
server_name {{ GLOBALS.url_base }};
server_name {{ full_server_name }};
root /nsm/rules;
location / {
allow all;
@@ -128,7 +130,7 @@ http {
server {
listen 7789 ssl;
http2 on;
server_name {{ GLOBALS.url_base }};
server_name {{ full_server_name }};
root /surirules;
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' https: data: blob: wss:; frame-ancestors 'self'";
@@ -161,7 +163,7 @@ http {
server {
listen 443 ssl;
http2 on;
server_name {{ GLOBALS.url_base }};
server_name {{ full_server_name }};
root /opt/socore/html;
index index.html;
@@ -385,15 +387,13 @@ http {
error_page 429 = @error429;
location @error401 {
if ($request_uri ~* (^/connect/.*|^/oauth2/.*)) {
if ($request_uri ~* (^/api/.*|^/connect/.*|^/oauth2/.*)) {
return 401;
}
if ($request_uri ~* ^/(?!(^/api/.*))) {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
}
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
if ($request_uri ~* ^/(?!(api/|login|auth|oauth2|$))) {
if ($request_uri ~* ^/(?!(login|auth|oauth2|$))) {
add_header Set-Cookie "AUTH_REDIRECT=$request_uri;Path=/;Max-Age=14400";
}
return 302 /auth/self-service/login/browser;

View File

@@ -30,6 +30,12 @@ nginx:
advanced: True
global: True
helpLink: nginx.html
alt_names:
description: Provide a list of alternate names to allow remote systems the ability to refer to the SOC API as another hostname.
global: True
forcedType: '[]string'
multiline: True
helpLink: nginx.html
config:
throttle_login_burst:
description: Number of login requests that can burst without triggering request throttling. Higher values allow more repeated login attempts. Values greater than zero are required in order to provide a usable login flow.

View File

@@ -49,6 +49,17 @@ managerssl_key:
- docker_container: so-nginx
# Create a cert for the reverse proxy
{% set san_list = [GLOBALS.hostname, GLOBALS.node_ip, GLOBALS.url_base] + NGINXMERGED.ssl.alt_names %}
{% set unique_san_list = san_list | unique %}
{% set managerssl_san_list = [] %}
{% for item in unique_san_list %}
{% if item | ipaddr %}
{% do managerssl_san_list.append("IP:" + item) %}
{% else %}
{% do managerssl_san_list.append("DNS:" + item) %}
{% endif %}
{% endfor %}
{% set managerssl_san = managerssl_san_list | join(', ') %}
managerssl_crt:
x509.certificate_managed:
- name: /etc/pki/managerssl.crt
@@ -56,7 +67,7 @@ managerssl_crt:
- signing_policy: managerssl
- private_key: /etc/pki/managerssl.key
- CN: {{ GLOBALS.hostname }}
- subjectAltName: "DNS:{{ GLOBALS.hostname }}, IP:{{ GLOBALS.node_ip }}, DNS:{{ GLOBALS.url_base }}"
- subjectAltName: {{ managerssl_san }}
- days_remaining: 7
- days_valid: 820
- backup: True

View File

@@ -1,22 +0,0 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states or sls in allowed_states%}
stenoca:
file.directory:
- name: /opt/so/conf/steno/certs
- user: 941
- group: 939
- makedirs: True
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

59
salt/pcap/cleanup.sls Normal file
View File

@@ -0,0 +1,59 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% if GLOBALS.is_sensor %}
delete_so-steno_so-status.conf:
file.line:
- name: /opt/so/conf/so-status/so-status.conf
- mode: delete
- match: so-steno
remove_stenographer_user:
user.absent:
- name: stenographer
- force: True
remove_stenographer_log_dir:
file.absent:
- name: /opt/so/log/stenographer
remove_stenoloss_script:
file.absent:
- name: /opt/so/conf/telegraf/scripts/stenoloss.sh
remove_steno_conf_dir:
file.absent:
- name: /opt/so/conf/steno
remove_so_pcap_export:
file.absent:
- name: /usr/sbin/so-pcap-export
remove_so_pcap_restart:
file.absent:
- name: /usr/sbin/so-pcap-restart
remove_so_pcap_start:
file.absent:
- name: /usr/sbin/so-pcap-start
remove_so_pcap_stop:
file.absent:
- name: /usr/sbin/so-pcap-stop
so-steno:
docker_container.absent:
- force: True
{% else %}
{{sls}}.non_sensor_node:
test.show_notification:
- text: "Stenographer cleanup not applicable on non-sensor nodes."
{% endif %}

View File

@@ -1,13 +0,0 @@
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
https://securityonion.net/license; you may not use this file except in compliance with the
Elastic License 2.0. #}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% import_yaml 'pcap/defaults.yaml' as PCAPDEFAULTS %}
{% set PCAPMERGED = salt['pillar.get']('pcap', PCAPDEFAULTS.pcap, merge=True) %}
{# disable stenographer if the pcap engine is set to SURICATA #}
{% if GLOBALS.pcap_engine == "SURICATA" %}
{% do PCAPMERGED.update({'enabled': False}) %}
{% endif %}

View File

@@ -1,87 +0,0 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from "pcap/config.map.jinja" import PCAPMERGED %}
{% from 'bpf/pcap.map.jinja' import PCAPBPF, PCAP_BPF_STATUS, PCAP_BPF_CALC, STENO_BPF_COMPILED %}
# PCAP Section
stenographergroup:
group.present:
- name: stenographer
- gid: 941
stenographer:
user.present:
- uid: 941
- gid: 941
- home: /opt/so/conf/steno
stenoconfdir:
file.directory:
- name: /opt/so/conf/steno
- user: 941
- group: 939
- makedirs: True
pcap_sbin:
file.recurse:
- name: /usr/sbin
- source: salt://pcap/tools/sbin
- user: 939
- group: 939
- file_mode: 755
{% if PCAPBPF and not PCAP_BPF_STATUS %}
stenoPCAPbpfcompilationfailure:
test.configurable_test_state:
- changes: False
- result: False
- comment: "BPF Syntax Error - Discarding Specified BPF. Error: {{ PCAP_BPF_CALC['stderr'] }}"
{% endif %}
stenoconf:
file.managed:
- name: /opt/so/conf/steno/config
- source: salt://pcap/files/config.jinja
- user: stenographer
- group: stenographer
- mode: 644
- template: jinja
- defaults:
PCAPMERGED: {{ PCAPMERGED }}
STENO_BPF_COMPILED: "{{ STENO_BPF_COMPILED }}"
pcaptmpdir:
file.directory:
- name: /nsm/pcaptmp
- user: 941
- group: 941
- makedirs: True
pcapindexdir:
file.directory:
- name: /nsm/pcapindex
- user: 941
- group: 941
- makedirs: True
stenolog:
file.directory:
- name: /opt/so/log/stenographer
- user: 941
- group: 941
- makedirs: True
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,11 +0,0 @@
pcap:
enabled: False
config:
maxdirectoryfiles: 30000
diskfreepercentage: 10
blocks: 2048
preallocate_file_mb: 4096
aiops: 128
pin_to_cpu: False
cpus_to_pin_to: []
disks: []

View File

@@ -1,27 +0,0 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
include:
- pcap.sostatus
so-steno:
docker_container.absent:
- force: True
so-steno_so-status.disabled:
file.comment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-steno$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,63 +0,0 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'docker/docker.map.jinja' import DOCKER %}
include:
- pcap.ca
- pcap.config
- pcap.sostatus
so-steno:
docker_container.running:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-steno:{{ GLOBALS.so_version }}
- start: True
- network_mode: host
- privileged: True
- binds:
- /opt/so/conf/steno/certs:/etc/stenographer/certs:rw
- /opt/so/conf/steno/config:/etc/stenographer/config:rw
- /nsm/pcap:/nsm/pcap:rw
- /nsm/pcapindex:/nsm/pcapindex:rw
- /nsm/pcaptmp:/tmp:rw
- /opt/so/log/stenographer:/var/log/stenographer:rw
{% if DOCKER.containers['so-steno'].custom_bind_mounts %}
{% for BIND in DOCKER.containers['so-steno'].custom_bind_mounts %}
- {{ BIND }}
{% endfor %}
{% endif %}
{% if DOCKER.containers['so-steno'].extra_hosts %}
- extra_hosts:
{% for XTRAHOST in DOCKER.containers['so-steno'].extra_hosts %}
- {{ XTRAHOST }}
{% endfor %}
{% endif %}
{% if DOCKER.containers['so-steno'].extra_env %}
- environment:
{% for XTRAENV in DOCKER.containers['so-steno'].extra_env %}
- {{ XTRAENV }}
{% endfor %}
{% endif %}
- watch:
- file: stenoconf
- require:
- file: stenoconf
delete_so-steno_so-status.disabled:
file.uncomment:
- name: /opt/so/conf/so-status/so-status.conf
- regex: ^so-steno$
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,11 +0,0 @@
{
"Threads": [
{ "PacketsDirectory": "/nsm/pcap", "IndexDirectory": "/nsm/pcapindex", "MaxDirectoryFiles": {{ PCAPMERGED.config.maxdirectoryfiles }}, "DiskFreePercentage": {{ PCAPMERGED.config.diskfreepercentage }} }
]
, "StenotypePath": "/usr/bin/stenotype"
, "Interface": "{{ pillar.sensor.interface }}"
, "Port": 1234
, "Host": "127.0.0.1"
, "Flags": ["-v", "--blocks={{ PCAPMERGED.config.blocks }}", "--preallocate_file_mb={{ PCAPMERGED.config.preallocate_file_mb }}", "--aiops={{ PCAPMERGED.config.aiops }}", "--uid=stenographer", "--gid=stenographer"{{ STENO_BPF_COMPILED }}]
, "CertPath": "/etc/stenographer/certs"
}

View File

@@ -1,41 +0,0 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'pcap/config.map.jinja' import PCAPMERGED %}
include:
{% if PCAPMERGED.enabled and GLOBALS.role != 'so-import'%}
- pcap.enabled
{% elif GLOBALS.role == 'so-import' %}
- pcap.config
- pcap.disabled
{% else %}
- pcap.disabled
{% endif %}
# This directory needs to exist regardless of whether STENO is enabled or not, in order for
# Sensoroni to be able to look at old steno PCAP data
# if stenographer has never run as the pcap engine no 941 user is created, so we use socore as a placeholder.
# /nsm/pcap is empty until stenographer is used as pcap engine
{% set pcap_id = 941 %}
{% set user_list = salt['user.list_users']() %}
{% if GLOBALS.pcap_engine == "SURICATA" and 'stenographer' not in user_list %}
{% set pcap_id = 939 %}
{% endif %}
pcapdir:
file.directory:
- name: /nsm/pcap
- user: {{ pcap_id }}
- group: {{ pcap_id }}
- makedirs: True
pcapoutdir:
file.directory:
- name: /nsm/pcapout
- user: 939
- group: 939
- makedirs: True

View File

@@ -1,35 +0,0 @@
pcap:
enabled:
description: Enables or disables the Stenographer packet recording process. This process may already be disabled if Suricata is being used as the packet capture process.
helpLink: stenographer.html
config:
maxdirectoryfiles:
description: By default, Stenographer limits the number of files in the pcap directory to 30000 to avoid limitations with the ext3 filesystem. However, if you're using the ext4 or xfs filesystems, then it is safe to increase this value. So if you have a large amount of storage and find that you only have 3 weeks worth of PCAP on disk while still having plenty of free space, then you may want to increase this default setting.
helpLink: stenographer.html
diskfreepercentage:
description: Stenographer will purge old PCAP on a regular basis to keep the disk free percentage at this level. If you have a distributed deployment with dedicated Sensor nodes, then the default value of 10 should be reasonable since Stenographer should be the main consumer of disk space in the /nsm partition. However, if you have systems that run both Stenographer and Elasticsearch at the same time (like eval and standalone installations), then youll want to make sure that this value is no lower than 21 so that you avoid Elasticsearch hitting its watermark setting at 80% disk usage. If you have an older standalone installation, then you may need to manually change this value to 21.
helpLink: stenographer.html
blocks:
description: The number of 1MB packet blocks used by Stenographer and AF_PACKET to store packets in memory, per thread. You shouldn't need to change this.
advanced: True
helpLink: stenographer.html
preallocate_file_mb:
description: File size to pre-allocate for individual Stenographer PCAP files. You shouldn't need to change this.
advanced: True
helpLink: stenographer.html
aiops:
description: The max number of async writes to allow for Stenographer at once.
advanced: True
helpLink: stenographer.html
pin_to_cpu:
description: Enable CPU pinning for Stenographer PCAP.
advanced: True
helpLink: stenographer.html
cpus_to_pin_to:
description: CPU to pin Stenographer PCAP to. Currently only a single CPU is supported.
advanced: True
helpLink: stenographer.html
disks:
description: List of disks to use for Stenographer PCAP. This is currently not used.
advanced: True
helpLink: stenographer.html

View File

@@ -1,21 +0,0 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls.split('.')[0] in allowed_states %}
append_so-steno_so-status.conf:
file.append:
- name: /opt/so/conf/so-status/so-status.conf
- text: so-steno
- unless: grep -q so-steno /opt/so/conf/so-status/so-status.conf
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}

View File

@@ -1,18 +0,0 @@
#!/bin/bash
#
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
if [ $# -lt 2 ]; then
echo "Usage: $0 <steno-query> Output-Filename"
exit 1
fi
docker exec -t so-sensoroni scripts/stenoquery.sh "$1" -w /nsm/pcapout/$2.pcap
echo ""
echo "If successful, the output was written to: /nsm/pcapout/$2.pcap"

View File

@@ -1,12 +0,0 @@
#!/bin/bash
#
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
/usr/sbin/so-restart steno $1

View File

@@ -1,12 +0,0 @@
#!/bin/bash
#
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
/usr/sbin/so-start steno $1

View File

@@ -1,12 +0,0 @@
#!/bin/bash
#
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
# https://securityonion.net/license; you may not use this file except in compliance with the
# Elastic License 2.0.
. /usr/sbin/so-common
/usr/sbin/so-stop steno $1

View File

@@ -29,7 +29,11 @@ sool9_{{host}}:
hypervisor_host: {{host ~ "_" ~ role}}
preflight_cmds:
- |
tee -a /etc/hosts <<< "{{ MANAGERIP }} {{ MANAGERHOSTNAME }}"
{%- set hostnames = [MANAGERHOSTNAME] %}
{%- if not (URL_BASE | ipaddr) and URL_BASE != MANAGERHOSTNAME %}
{%- do hostnames.append(URL_BASE) %}
{%- endif %}
tee -a /etc/hosts <<< "{{ MANAGERIP }} {{ hostnames | join(' ') }}"
- |
timeout 600 bash -c 'trap "echo \"Preflight Check: Failed to establish repo connectivity\"; exit 1" TERM; \
while ! dnf makecache --repoid=securityonion >/dev/null 2>&1; do echo "Preflight Check: Waiting for repo connectivity..."; \

View File

@@ -14,6 +14,7 @@
{% if 'vrt' in salt['pillar.get']('features', []) %}
{% set HYPERVISORS = salt['pillar.get']('hypervisor:nodes', {} ) %}
{% from 'salt/map.jinja' import SALTVERSION %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% if HYPERVISORS %}
cloud_providers:
@@ -34,6 +35,7 @@ cloud_profiles:
MANAGERHOSTNAME: {{ grains.host }}
MANAGERIP: {{ pillar.host.mainip }}
SALTVERSION: {{ SALTVERSION }}
URL_BASE: {{ GLOBALS.url_base }}
- template: jinja
- makedirs: True
{% else %}

View File

@@ -805,11 +805,6 @@ def process_vm_creation(hypervisor_path: str, vm_config: dict) -> None:
mark_invalid_hardware(hypervisor_path, vm_name, vm_config,
{'nsm_size': 'Invalid nsm_size: must be positive integer'})
return
if size > 10000: # 10TB reasonable maximum
log.error("VM: %s - nsm_size %dGB exceeds reasonable maximum (10000GB)", vm_name, size)
mark_invalid_hardware(hypervisor_path, vm_name, vm_config,
{'nsm_size': f'Invalid nsm_size: {size}GB exceeds maximum (10000GB)'})
return
log.debug("VM: %s - nsm_size validated: %dGB", vm_name, size)
except (ValueError, TypeError) as e:
log.error("VM: %s - nsm_size must be a valid integer, got: %s", vm_name, vm_config.get('nsm_size'))

View File

@@ -22,18 +22,6 @@ include:
{% endif %}
{% if INSTALLEDSALTVERSION|string != SALTVERSION|string %}
{# this is added in 2.4.120 to remove salt repo files pointing to saltproject.io to accomodate the move to broadcom and new bootstrap-salt script #}
{% if salt['pkg.version_cmp'](GLOBALS.so_version, '2.4.120') == -1 %}
{% set saltrepofile = '/etc/yum.repos.d/salt.repo' %}
{% if grains.os_family == 'Debian' %}
{% set saltrepofile = '/etc/apt/sources.list.d/salt.list' %}
{% endif %}
remove_saltproject_io_repo_minion:
file.absent:
- name: {{ saltrepofile }}
{% endif %}
unhold_salt_packages:
pkg.unheld:
- pkgs:

View File

@@ -8,9 +8,6 @@
include:
{% if GLOBALS.is_sensor or GLOBALS.role == 'so-import' %}
- pcap.ca
{% endif %}
- sensoroni.config
- sensoroni.sostatus
@@ -19,10 +16,6 @@ so-sensoroni:
- image: {{ GLOBALS.registry_host }}:5000/{{ GLOBALS.image_repo }}/so-soc:{{ GLOBALS.so_version }}
- network_mode: host
- binds:
{% if GLOBALS.is_sensor or GLOBALS.role == 'so-import' %}
- /opt/so/conf/steno/certs:/etc/stenographer/certs:rw
{% endif %}
- /nsm/pcap:/nsm/pcap:rw
- /nsm/import:/nsm/import:rw
- /nsm/pcapout:/nsm/pcapout:rw
- /opt/so/conf/sensoroni/sensoroni.json:/opt/sensoroni/sensoroni.json:ro

View File

@@ -14,7 +14,7 @@ An API key or User Credentials is necessary for utilizing Elasticsearch.
In SOC, navigate to `Administration`, toggle `Show all configurable settings, including advanced settings.`, and navigate to `sensoroni` -> `analyzers` -> `elasticsearch`.
![image](https://github.com/Security-Onion-Solutions/securityonion/blob/2.4/dev/assets/images/screenshots/analyzers/elasticsearch.png?raw=true)
![image](https://github.com/Security-Onion-Solutions/securityonion/blob/3/dev/assets/images/screenshots/analyzers/elasticsearch.png?raw=true)
The following configuration options are available for:

Some files were not shown because too many files have changed in this diff Show More