SwiftIDS is an intrusion detection system implemented in Swift. It monitors network traffic and system logs to detect potential security threats and unauthorized access attempts.
- Real-time network traffic analysis
- System log monitoring
- Customizable rule-based detection
- Alert generation for suspicious activities
- Basic reporting functionality
- macOS 10.15+ or Linux with Swift support
- Swift 5.0 or later
- libpcap for packet capture (on macOS, this is included by default)
-
Clone the repository:
git clone https://github.com/niveusgh/SwiftIDS.git
-
Navigate to the project directory:
cd SwiftIDS
-
Build the project:
swift build
Run the program with sudo privileges to allow packet capture:
sudo .build/debug/SwiftIDS
Edit the config.json
file to customize detection rules, network interfaces, log file paths, and alert settings.
Sources/SwiftIDS/
: Contains the main Swift source filesmain.swift
: Entry point of the applicationPacketAnalyzer.swift
: Handles network packet analysisLogMonitor.swift
: Monitors system logsAlertGenerator.swift
: Generates alerts for detected threats
Tests/
: Contains unit tests for the projectPacketAnalyzerTests.swift
: Unit tests for the PacketAnalyzer component
config.json
: Configuration file for detection rules and settings
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Thea Francis (GitHub: @niveusgh)
SwiftIDS is a basic intrusion detection system intended for educational purposes. It should not be relied upon as a sole security measure in a production environment.