mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-11 11:42:50 +01:00
Compare commits
8 Commits
idstools-r
...
TOoSmOotH-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc945dad00 | ||
|
|
ddcd74ffd2 | ||
|
|
f5688175b6 | ||
|
|
ba49765312 | ||
|
|
80411ab6cf | ||
|
|
411f28a049 | ||
|
|
2dd49f6d9b | ||
|
|
c4a70b540e |
@@ -1113,7 +1113,7 @@ suricata_idstools_removal_pre() {
|
|||||||
install -d -o 939 -g 939 -m 755 /opt/so/conf/soc/fingerprints
|
install -d -o 939 -g 939 -m 755 /opt/so/conf/soc/fingerprints
|
||||||
install -o 939 -g 939 -m 644 /dev/null /opt/so/conf/soc/fingerprints/suricataengine.syncBlock
|
install -o 939 -g 939 -m 644 /dev/null /opt/so/conf/soc/fingerprints/suricataengine.syncBlock
|
||||||
cat > /opt/so/conf/soc/fingerprints/suricataengine.syncBlock << EOF
|
cat > /opt/so/conf/soc/fingerprints/suricataengine.syncBlock << EOF
|
||||||
Suricata ruleset sync is blocked until this file is removed. **CRITICAL** Make sure that you have manually added any custom Suricata rulesets via SOC config before removing this file - review the documentation for more details: https://docs.securityonion.net/en/2.4/nids.html#sync-block
|
Suricata ruleset sync is blocked until this file is removed. Make sure that you have manually added any custom Suricata rulesets via SOC config - review the documentation for more details: securityonion.net/docs
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Remove possible symlink & create salt local rules dir
|
# Remove possible symlink & create salt local rules dir
|
||||||
@@ -1131,7 +1131,6 @@ if [[ -f /opt/so/conf/soc/so-detections-backup.py ]]; then
|
|||||||
# Verify backup by comparing counts
|
# Verify backup by comparing counts
|
||||||
echo "Verifying detection overrides backup..."
|
echo "Verifying detection overrides backup..."
|
||||||
es_override_count=$(/sbin/so-elasticsearch-query 'so-detection/_count' \
|
es_override_count=$(/sbin/so-elasticsearch-query 'so-detection/_count' \
|
||||||
--retry 5 --retry-delay 10 --retry-all-errors \
|
|
||||||
-d '{"query": {"bool": {"must": [{"exists": {"field": "so_detection.overrides"}}]}}}' | jq -r '.count') || {
|
-d '{"query": {"bool": {"must": [{"exists": {"field": "so_detection.overrides"}}]}}}' | jq -r '.count') || {
|
||||||
echo " Error: Failed to query Elasticsearch for override count"
|
echo " Error: Failed to query Elasticsearch for override count"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -2652,12 +2652,6 @@ soc:
|
|||||||
thresholdColorRatioMed: 0.75
|
thresholdColorRatioMed: 0.75
|
||||||
thresholdColorRatioMax: 1
|
thresholdColorRatioMax: 1
|
||||||
availableModels:
|
availableModels:
|
||||||
- id: sonnet-4
|
|
||||||
displayName: Claude Sonnet 4
|
|
||||||
contextLimitSmall: 200000
|
|
||||||
contextLimitLarge: 1000000
|
|
||||||
lowBalanceColorAlert: 500000
|
|
||||||
enabled: true
|
|
||||||
- id: sonnet-4.5
|
- id: sonnet-4.5
|
||||||
displayName: Claude Sonnet 4.5
|
displayName: Claude Sonnet 4.5
|
||||||
contextLimitSmall: 200000
|
contextLimitSmall: 200000
|
||||||
|
|||||||
@@ -608,18 +608,6 @@ soc:
|
|||||||
label: Delete Unreferenced (Deletes rules that are no longer referenced by ruleset source)
|
label: Delete Unreferenced (Deletes rules that are no longer referenced by ruleset source)
|
||||||
forcedType: bool
|
forcedType: bool
|
||||||
required: False
|
required: False
|
||||||
- field: proxyURL
|
|
||||||
label: HTTP/HTTPS proxy URL for downloading the ruleset.
|
|
||||||
required: False
|
|
||||||
- field: proxyUsername
|
|
||||||
label: Proxy authentication username.
|
|
||||||
required: False
|
|
||||||
- field: proxyPassword
|
|
||||||
label: Proxy authentication password.
|
|
||||||
required: False
|
|
||||||
- field: proxyCACert
|
|
||||||
label: Path to CA certificate file for MITM proxy verification.
|
|
||||||
required: False
|
|
||||||
airgap: *serulesetSources
|
airgap: *serulesetSources
|
||||||
navigator:
|
navigator:
|
||||||
intervalMinutes:
|
intervalMinutes:
|
||||||
|
|||||||
@@ -17,23 +17,14 @@ query() {
|
|||||||
|
|
||||||
STATS=$(query "ruleset-stats")
|
STATS=$(query "ruleset-stats")
|
||||||
RELOAD=$(query "ruleset-reload-time")
|
RELOAD=$(query "ruleset-reload-time")
|
||||||
[ -z "$RELOAD" ] && RELOAD='{}'
|
|
||||||
|
|
||||||
# Outputs valid JSON on success, empty on failure
|
if echo "$STATS" | jq -e '.return == "OK"' > /dev/null 2>&1; then
|
||||||
OUTPUT=$(jq -n \
|
LOADED=$(echo "$STATS" | jq -r '.message[0].rules_loaded')
|
||||||
--argjson stats "$STATS" \
|
FAILED=$(echo "$STATS" | jq -r '.message[0].rules_failed')
|
||||||
--argjson reload "$RELOAD" \
|
LAST_RELOAD=$(echo "$RELOAD" | jq -r '.message[0].last_reload')
|
||||||
'if $stats.return == "OK" and ($stats.message[0].rules_loaded | type) == "number" and ($stats.message[0].rules_failed | type) == "number" then
|
|
||||||
{
|
|
||||||
rules_loaded: $stats.message[0].rules_loaded,
|
|
||||||
rules_failed: $stats.message[0].rules_failed,
|
|
||||||
last_reload: ($reload.message[0].last_reload // ""),
|
|
||||||
return: "OK"
|
|
||||||
}
|
|
||||||
else empty end' 2>/dev/null)
|
|
||||||
|
|
||||||
if [ -n "$OUTPUT" ]; then
|
jq -n --argjson loaded "$LOADED" --argjson failed "$FAILED" --arg reload "$LAST_RELOAD" \
|
||||||
echo "$OUTPUT" > "$OUTFILE"
|
'{rules_loaded: $loaded, rules_failed: $failed, last_reload: $reload, return: "OK"}' > "$OUTFILE"
|
||||||
else
|
else
|
||||||
echo '{"return":"FAIL"}' > "$OUTFILE"
|
echo '{"return":"FAIL"}' > "$OUTFILE"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,15 +18,11 @@ if [[ ! "`pidof -x $(basename $0) -o %PPID`" ]]; then
|
|||||||
if [ -f "$STATSFILE" ] && [ $(($(date +%s) - $(stat -c %Y "$STATSFILE"))) -lt 90 ] && jq -e '.return == "OK" and .rules_loaded != null and .rules_failed != null' "$STATSFILE" > /dev/null 2>&1; then
|
if [ -f "$STATSFILE" ] && [ $(($(date +%s) - $(stat -c %Y "$STATSFILE"))) -lt 90 ] && jq -e '.return == "OK" and .rules_loaded != null and .rules_failed != null' "$STATSFILE" > /dev/null 2>&1; then
|
||||||
LOADED=$(jq -r '.rules_loaded' "$STATSFILE")
|
LOADED=$(jq -r '.rules_loaded' "$STATSFILE")
|
||||||
FAILED=$(jq -r '.rules_failed' "$STATSFILE")
|
FAILED=$(jq -r '.rules_failed' "$STATSFILE")
|
||||||
RELOAD_TIME=$(jq -r 'if .last_reload then .last_reload else "" end' "$STATSFILE")
|
RELOAD_TIME=$(jq -r '.last_reload // ""' "$STATSFILE")
|
||||||
|
|
||||||
if [ -n "$RELOAD_TIME" ]; then
|
echo "surirules loaded=${LOADED}i,failed=${FAILED}i,reload_time=\"${RELOAD_TIME}\",status=\"ok\""
|
||||||
echo "surirules loaded=${LOADED}i,failed=${FAILED}i,reload_time=\"${RELOAD_TIME}\",status=\"ok\""
|
|
||||||
else
|
|
||||||
echo "surirules loaded=${LOADED}i,failed=${FAILED}i,status=\"ok\""
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "surirules loaded=0i,failed=0i,status=\"unknown\""
|
echo "surirules loaded=0i,failed=0i,reload_time=\"\",status=\"unknown\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user