Network Anomaly Agent (secubox-network-anomaly): - 5 detection modules: bandwidth, connection flood, port scan, DNS, protocol - EMA-based baseline comparison - LocalAI integration for threat assessment - network-anomalyctl CLI LocalRecall Memory System (secubox-localrecall): - Persistent memory for AI agents - Categories: threats, decisions, patterns, configs, conversations - EMA-based importance scoring - LocalAI integration for summarization - localrecallctl CLI with 13 commands AI Insights Dashboard (luci-app-ai-insights): - Unified view across all AI agents - Security posture scoring (0-100) - Agent status grid with alert counts - Aggregated alerts from all agents - Run All Agents and AI Analysis actions LuCI Dashboards: - luci-app-network-anomaly with real-time stats - luci-app-localrecall with memory management Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
60 lines
1.5 KiB
Makefile
60 lines
1.5 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=secubox-network-anomaly
|
|
PKG_VERSION:=1.0.0
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_MAINTAINER:=SecuBox Team
|
|
PKG_LICENSE:=GPL-2.0-or-later
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/secubox-network-anomaly
|
|
SECTION:=secubox
|
|
CATEGORY:=SecuBox
|
|
TITLE:=Network Anomaly Detection Agent
|
|
DEPENDS:=+jsonfilter +curl
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Package/secubox-network-anomaly/description
|
|
AI-powered network anomaly detection for SecuBox.
|
|
Detects bandwidth spikes, connection floods, port scans,
|
|
DNS anomalies, and protocol anomalies using statistical
|
|
analysis and optional LocalAI integration.
|
|
endef
|
|
|
|
define Package/secubox-network-anomaly/conffiles
|
|
/etc/config/network-anomaly
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/secubox-network-anomaly/install
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) ./files/etc/config/network-anomaly $(1)/etc/config/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/etc/init.d/network-anomaly $(1)/etc/init.d/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) ./files/usr/bin/network-anomalyctl $(1)/usr/bin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/network-anomaly
|
|
$(INSTALL_DATA) ./files/usr/lib/network-anomaly/detector.sh $(1)/usr/lib/network-anomaly/
|
|
endef
|
|
|
|
define Package/secubox-network-anomaly/postinst
|
|
#!/bin/sh
|
|
[ -n "$${IPKG_INSTROOT}" ] || {
|
|
mkdir -p /var/lib/network-anomaly
|
|
/etc/init.d/network-anomaly enable 2>/dev/null
|
|
}
|
|
exit 0
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,secubox-network-anomaly))
|