Professional automated audit tool for MikroTik RouterOS with security checks, web interface, and detailed reporting.
ΠΡΠΎΡΠ΅ΡΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΠΉ ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½Ρ Π΄Π»Ρ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΠ·ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ Π°ΡΠ΄ΠΈΡΠ° MikroTik RouterOS Ρ Π²Π΅Π±-ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠΎΠΌ, ΠΏΡΠΎΠ²Π΅ΡΠΊΠΎΠΉ Π±Π΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΠΈ ΠΈ Π³Π΅Π½Π΅ΡΠ°ΡΠΈΠ΅ΠΉ ΠΎΡΡΡΡΠΎΠ².
EN:
RU:
- ΠΡΠ½ΠΎΠ²Π½Π°Ρ Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡ
- Π ΡΠΊΠΎΠ²ΠΎΠ΄ΡΡΠ²ΠΎ ΠΏΠΎ Π½Π°ΡΡΡΠΎΠΉΠΊΠ΅ SSH
- ΠΠ΅Π±-ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ
RouterOS Version: 7.22 (stable) Hardware: hAP axΒ³ (C53UiG+5HPaxD2HPaxD) Python: 3.13 Last Tested: March 2026 Tests: 639 passed β Coverage: 75% π
- β CLI Π°ΡΠ΄ΠΈΡ (3 ΡΡΠΎΠ²Π½Ρ + 6 ΠΏΡΠΎΡΠΈΠ»Π΅ΠΉ)
- β ΠΠ΅Π±-ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ (dashboard, ΠΈΡΡΠΎΡΠΈΡ, ΡΡΠ°Π²Π½Π΅Π½ΠΈΠ΅)
- β ΠΡΠΎΠ²Π΅ΡΠΊΠ° Π±Π΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΠΈ (57 ΠΏΡΠΎΠ²Π΅ΡΠΎΠΊ)
- β ΠΠ΅ΡΠ΅ΠΊΡΠΎΡ ΠΊΠΎΠ½ΡΠ»ΠΈΠΊΡΠΎΠ² ΠΏΡΠ°Π²ΠΈΠ» (8 ΡΠΈΠΏΠΎΠ²)
- β IoC Π΄Π΅ΡΠ΅ΠΊΡΠΈΡ (10 ΠΈΠ½Π΄ΠΈΠΊΠ°ΡΠΎΡΠΎΠ² ΠΊΠΎΠΌΠΏΡΠΎΠΌΠ΅ΡΠ°ΡΠΈΠΈ)
- β Live CVE lookup (NIST NVD API)
- β ΠΡΠ»Π°ΠΉΠ½-ΡΠ΅ΠΆΠΈΠΌ (RSC ΠΏΠ°ΡΡΠ΅Ρ)
- β ΠΠ²ΡΠΎΠΏΠ°ΡΡΠΈΠ½Π³ (dry-run, rollback)
- β ΠΠ½Π°Π»ΠΈΠ· ΠΊΠΎΠ½ΡΠ΅ΠΉΠ½Π΅ΡΠΎΠ²
- β Wi-Fi ΠΏΡΠΎΠ²Π΅ΡΠΊΠΈ
- β ΠΡΠ΅ ΡΠΎΡΠΌΠ°ΡΡ ΠΎΡΡΡΡΠΎΠ² (HTML, JSON, TXT, Markdown)
Linux/Mac:
bash <(curl -Ls https://raw.githubusercontent.com/cubiculus/Mikrotik_audit/main/scripts/quick_install.sh)Windows:
scripts\install.bat# Clone repository
git clone https://github.com/cubiculus/Mikrotik_audit.git
cd Mikrotik_audit
# Create virtual environment
python -m venv venv
# Activate (Windows)
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install web interface (optional)
pip install -r requirements-web.txt# Run basic audit
python -m src.cli audit --router-ip 192.168.88.1 --ssh-user admin
# Run with profile (WiFi, security, network, etc.)
python -m src.cli audit --profile wifi --ssh-user admin
# Run with redaction (hide sensitive data)
python -m src.cli audit --redact --ssh-user admin
# Generate all report formats
python -m src.cli audit --all-formats --ssh-user admin
# Offline mode (analyze RSC file)
python -m src.cli audit --offline-file export.rsc# Start web server
python -m src.cli web-server --port 5000
# Open browser
# http://127.0.0.1:5000Features:
- π Dashboard with statistics
- π Audit history
- π Compare reports ("before/after")
- π₯ Export reports (HTML, JSON, TXT, MD)
- β‘ Real-time audit progress
| Scenario | Why It Matters |
|---|---|
| Before firmware updates | Document configuration and identify issues before upgrading |
| Security audits | Detect misconfigurations, vulnerabilities, IoC indicators |
| Configuration conflicts | Find unreachable rules, NAT bypasses, orphan marks |
| Handing over | Generate comprehensive documentation |
| Forum troubleshooting | Share sanitized reports for help |
| Compliance | Maintain audit trails |
| Pre-deployment | Verify configuration before production |
- 57 security checks across all RouterOS components
- CVE vulnerability detection with live NIST NVD API lookup
- IoC detection (10 indicators of compromise)
- Wi-Fi security (WPS, WEP, WPA1/TKIP detection)
- Service hardening (SSH, Winbox, API restrictions)
- Unreachable rules (shadowed by catch-all)
- NAT bypasses firewall
- Orphan routing marks
- Interface not in WAN/LAN lists
- Address list conflicts
- Missing FastTrack rules
- Duplicate rules
wifiβ Wi-Fi security checksprotocolsβ SNMP, UPnP, Proxy, RoMONsystemβ System-level checkssecurityβ Firewall and securitynetworkβ Interfaces and routingcontainersβ Container analysis
- Dashboard with real-time statistics
- Audit history with SQLite storage
- Compare reports ("before/after")
- Export to all formats
- Real-time progress via SSE
- Analyze RSC files without router connection
/export hide-sensitivesupport- Same analyzers as online mode
- Dry-run mode (preview changes)
- Confirmation for each change
- Automatic rollback capability
- Backup before changes
- HTML β Interactive with charts
- JSON β Machine-readable
- TXT β Plain text
- Markdown β Forum-friendly
Mikrotik_audit/
βββ src/
β βββ auditor.py # Main audit orchestrator
β βββ security_analyzer.py # Security checks (57 rules)
β βββ conflict_analyzer.py # Conflict detection (8 types)
β βββ ioc_analyzer.py # IoC detection (10 indicators)
β βββ patcher.py # Auto-patching with rollback
β βββ rsc_parser.py # Offline RSC parser
β βββ cve_database.py # CVE database + NVD API
β βββ commands.py # Audit commands + profiles
β βββ cli.py # CLI interface
β βββ web/ # Web interface
β β βββ app.py # Flask server
β β βββ database.py # SQLite models
β β βββ templates/ # HTML templates
β βββ lab/ # Lab tools
β βββ config_generator.py # Test config generator
βββ tests/ # 639 tests
βββ docs/ # Documentation
βββ scripts/ # Install/run scripts
βββ audit-reports/ # Generated reports (git-ignored)
βββ requirements*.txt # Dependencies
| Parameter | Description | Required | Default |
|---|---|---|---|
--router-ip |
Router IP address or hostname | Yes* | - |
--ssh-port |
SSH port | No | 22 |
--ssh-user |
SSH username | Yes | - |
--ssh-key-file |
Path to SSH private key | No** | - |
--ssh-key-passphrase |
Passphrase for SSH key | No | - |
--audit-level |
Audit level (Basic/Standard/Comprehensive) | No | Standard |
--profile |
Audit profile (wifi/security/network/etc.) | No | - |
--output-dir |
Output directory for reports | No | ./audit-reports |
--skip-security |
Skip security analysis | No | False |
--max-workers |
Maximum parallel workers | No | 0 (auto) |
--redact |
Redact sensitive data | No | False |
--all-formats |
Generate all report formats | No | False |
--connect-timeout |
SSH connection timeout (seconds) | No | 30 |
--command-timeout |
Command timeout (seconds) | No | 120 |
--no-backup |
Skip system backup | No | False |
--no-cve-check |
Disable CVE check | No | False |
--offline-file |
RSC file for offline analysis | No* | - |
* Either --router-ip or --offline-file must be provided
** Either MIKROTIK_PASSWORD or --ssh-key-file must be provided
| Parameter | Description | Default |
|---|---|---|
--host |
Host to bind to | 127.0.0.1 |
--port |
Port to listen on | 5000 |
--debug |
Enable debug mode | False |
MIKROTIK_PASSWORD=your_password
MIKROTIK_SSH_KEY_FILE=~/.ssh/id_rsa
MIKROTIK_SSH_KEY_PASSPHRASE=key_passphrase
MIKROTIK_CONNECT_TIMEOUT=30
MIKROTIK_COMMAND_TIMEOUT=120
NVD_API_KEY=your_nist_api_key # Optional, for higher rate limits# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/test_security_analyzer.py -v
# Run web tests
pytest tests/web/ -vTest Statistics:
- Total tests: 639
- Passed: 639 β
- Coverage: 75%
MIT License - see LICENSE for details.
Made with β€οΈ for the MikroTik community


