MikroTik

⌘K
  1. Home
  2. Docs
  3. MikroTik
  4. Firewall
  5. Audit MikroTik Dengan SARA RouterOS Security Inspector

Audit MikroTik Dengan SARA RouterOS Security Inspector

SARA (RouterOS Security Inspector) adalah solusi audit otomatis yang dirancang khusus untuk menganalisis konfigurasi MikroTik RouterOS dan mendeteksi potensi misconfiguration, weak settings, serta known vulnerabilities (CVE) dengan database NVD (National Vulnerability Database). Hal ini penting karena MikroTik RouterOS memiliki attack surface yang cukup luas jika tidak dikonfigurasi dengan benar.

Dokumentasi ini mencontohkan cara penggunaannya SARA (RouterOS Security Inspector) untuk mengaudit perangkat MikroTik Anda.

Cara Install SARA dengan pipx di CachyOS

Karena saya sehari-hari menggunakan CachyOS, jadi sekalian saya akan mencontohkan cara menginstal SARA di CachyOS, distribusi berbasis Arch. Silakan sesuaikan dengan distro Linux yang Anda gunakan.

Install pipx dan Git

sudo pacman -Syu
sudo pacman -S python-pipx git

Inisialisasi pipx

# Pastikan direktori bin pipx terdaftar di PATH
pipx ensurepath

Catatan: Setelah ensurepath, Anda mungkin perlu restart terminal atau jalankan source ~/.bashrc agar perubahan PATH aktif.

Install SARA via pipx

# Install langsung dari repository GitHub
pipx install git+https://github.com/caster0x00/Sara.git

Apa yang terjadi di balik layar:

  • pipx otomatis membuat virtual environment terisolasi di ~/.local/pipx/venvs/sara
  • Menginstall SARA beserta semua dependency-nya di dalam venv tersebut
  • Membuat symlink executable sara di ~/.local/bin/sara
  • Executable otomatis tersedia di $PATH

Verifikasi Instalasi

# Cek lokasi executable
which sara
# Output: /home/user/.local/bin/sara

# Cek versi dan bantuan
sara -h

Manajemen SARA dengan pipx

OperasiPerintah
Jalankan SARAsara <command> (langsung, tanpa aktifasi venv)
Update SARApipx upgrade sara
Cek versi terinstallpipx list
Reinstall jika bermasalahpipx reinstall sara
Uninstall SARApipx uninstall sara
Lihat path venvpipx list --include-injected

Contoh Penggunaan SARA 

Semua perintah berjalan langsung tanpa perlu mengaktifkan virtual environment karena saya pakai pipx

Audit konfigurasi system (Live Device via SSH)

Audit profil system pada perangkat MikroTik dengan IP 192.168.88.1 menggunakan user admin:

sara audit 192.168.88.1 admin system

SARA akan meminta password secara interaktif (aman, tidak ditampilkan di terminal).

Penjelasan parameter:

  • 192.168.88.1 — IP address perangkat target
  • admin — username SSH di RouterOS
  • system — profil audit yang digunakan

Contoh Output (contoh mikrotik yang belum di optimasi keamanannya — security hardening):

       _____                 
      / ___/____ __________ _
      \__ \/ __ `/ ___/ __ `/
     ___/ / /_/ / /  / /_/ / 
    /____/\__,_/_/   \__,_/                              

    Sara: MikroTik RouterOS Security Inspector
    Developer: Mahama Bazarov (Caster)
    Contact: [email protected]
    Version: 1.3.0
    Documentation & Usage: https://github.com/caster0x00/Sara

[+] Sara Audit Mode
    [*] Target Device: 192.168.88.1
    [*] Transport: SSH (port 22)
[?] SSH password for [email protected]: 
    [✓] SSH connection established: [email protected]
    [*] Detected RouterOS: 7.23.2

[+] Default Usernames
    [!] Default username detected: 'admin'
    [*] Change it to a unique value to reduce attack surface

[+] Remote Management (RMI/MGMT)
    [✓] SSH enabled. Use strong passwords or SSH keys for authentication
    [!] HTTPS is enabled
    [*] Ensure HTTPS uses strong ciphers and valid certificates
    [!] WINBOX is enabled
    [!] Winbox enabled. Winbox 'Keep Password' may store credentials in plaintext. If the PC is compromised, saved passwords may be extracted!
    [!] API is enabled
    [*] RouterOS API is a brute-force target; restrict access
    [!] API-SSL is enabled
    [*] RouterOS API is a brute-force target; restrict access
    [✓] No high-risk RMI services detected

[+] RMI/MGMT Access Restrictions
    [!] SSH                                 22  TCP has no IP restriction
    [!] WWW-SSL                            443  TCP has no IP restriction
    [!] REVERSE-PROXY                      443  TCP has no IP restriction
    [!] WINBOX                            8291  TCP has no IP restriction
    [✓] API                               8728  TCP restricted to: 192.168.88.0/24
    [!] API-SSL                           8729  TCP has no IP restriction

[+] PoE Status
    [!] PoE is enabled on interface 'ether1'
        [*] Ensure connected devices support PoE to avoid hardware damage

[+] RouterBOOT Protection
    [!] RouterBOOT protection is disabled
        [*] Device can be reset or reflashed via Netinstall without authentication
        [*] Enable 'protected-routerboot' to prevent unauthorized boot changes

[+] Bandwidth Server Status
    [!] Bandwidth server is enabled
        [*] May generate unwanted test traffic
        [*] Can increase CPU load under active use

[+] Password Policy
    [!] No minimum password length is enforced
        [*] Short passwords significantly reduce brute-force resistance
        [*] Set a minimum length (e.g. 10-12 characters or more)

[+] SSH Security
    [!] Strong SSH crypto is disabled
        [*] Enable 'strong-crypto' to enforce stronger ciphers and MACs
        [*] Disables weak algorithms (MD5, null encryption, small DH groups)

[+] Connection Tracking
    [!] Connection tracking is enabled
        [*] RouterOS tracks connection states for firewall/NAT
        [*] On pure transit routers without NAT, disabling may reduce CPU load

[+] RoMON Status
    [✓] RoMON is disabled

[+] Winbox MAC Server Settings
    [✓] MAC Winbox is restricted to specific interfaces
    [✓] MAC Telnet is restricted to specific interfaces
    [!] MAC Ping is enabled
        [*] May generate unnecessary Layer 2 broadcast traffic

[+] Firewall NAT Rules
    [✓] No Destination NAT (dst-nat/netmap) rules detected

[+] Schedulers & Persistence
    [✓] No suspicious schedulers detected
[*] Disconnected from RouterOS (192.168.88.1)

Audit Multi-Profil

Untuk audit lebih komprehensif, gabungkan profil dengan koma:

sara audit 192.168.88.1 admin system,protocols,wifi

Audit dengan SSH key

Jika Anda menggunakan SSH key-based authentication:

sara audit 192.168.88.1 admin system,protocols ~/.ssh/id_rsa

Audit dengan port SSH non-standard

Jika RouterOS menggunakan port SSH selain 22 (misalnya 2222):

sara audit 192.168.88.1 admin system 2222

Audit CVE pada Perangkat Live

Periksa apakah versi RouterOS yang berjalan memiliki kerentanan yang tercatat di NVD (National Vulnerability Database):

sara cve 192.168.88.1 admin

Alur kerja modul CVE:

  1. SARA terhubung ke perangkat via SSH
  2. Mendeteksi versi RouterOS yang berjalan
  3. Download/mengupdate database CVE dari NVD (file routeros_cves.json)
  4. Membandingkan versi device dengan rentang versi yang terdampak CVE
  5. Menampilkan hasil dengan klasifikasi severity: CRIT, HIGH, MED, LOW, UNK

Contoh output:

[+] CVE Search (Live)
    [*] Target Device: 192.168.88.1
    [*] Transport: SSH (port 22)
[?] SSH password for [email protected]: 
    [✓] SSH connection established: [email protected]
[+] Search for CVEs for a specific version
[!] routeros_cves.json not found.
[*] Fetching CVEs from NVD...
[+] Saved 86 CVEs to routeros_cves.json

Target RouterOS Version: 7.23.2    Matched CVEs: 0
CRIT: 0 | HIGH: 0 | MED: 0 | LOW: 0 | UNK: 0

[*] No known CVEs found for this RouterOS version

[*] Disconnected from RouterOS (192.168.88.1)

Contoh output jika ditemukan vulnerability:

[+] CVE Search (Manual)
    [*] RouterOS Version: 7.13.1
[+] Search for CVEs for a specific version
[?] routeros_cves.json already exists.
    Overwrite it with fresh CVE data? [yes/no]: 

Target RouterOS Version: 7.13.2    Matched CVEs: 0
CRIT: 0 | HIGH: 1 | MED: 1 | LOW: 0 | UNK: 0

CVE ID            SEV    CVSS  PUBLISHED 
CVE-2025-6443     HIGH    7.2  2025-06-25
CVE-2024-54772    MED     5.4  2025-02-11

Audit CVE Manual (Tanpa Koneksi ke Device)

Jika perangkat tidak dapat diakses langsung, Anda bisa memeriksa CVE berdasarkan versi RouterOS:

sara cve version 7.13.1

Ini berguna untuk pre-assessment sebelum melakukan upgrade atau audit konfigurasi yang sudah di-export.

Checklist Verifikasi Post-Audit

Sebelum melakukan audit menggunakan aplikasi ini, pastikan untuk melihat dokumentasi tentang cara mengamankan Mikrotik (security hardening).

FAQ (Frequently Asked Questions)

Apakah SARA bisa merusak konfigurasi RouterOS saya?

Tidak. SARA beroperasi dalam mode read-only. Ia hanya mengeksekusi perintah print untuk mengambil informasi konfigurasi. Tidak ada perintah set, add, atau remove yang dijalankan.

Apakah saya perlu user admin untuk menjalankan SARA?

Tidak. User dengan privilege read-only (RO) sudah cukup karena SARA hanya membaca konfigurasi.

Apakah SARA mendukung RouterOS versi 6 dan 7?

Ya, SARA dirancang untuk bekerja dengan berbagai versi RouterOS. Namun, beberapa fitur mungkin hanya tersedia di versi tertentu.

Apakah hasil CVE dari SARA selalu akurat?

SARA membandingkan versi RouterOS dengan database NVD. Namun, NVD terkadang memiliki data yang tidak lengkap. Selalu cross-check dengan changelog resmi MikroTik.

Kesimpulan

SARA (RouterOS Security Inspector) adalah alat audit keamanan yang sangat berguna bagi setiap Network Engineer atau Security Professional yang bekerja dengan ekosistem MikroTik. Dengan fitur analisis konfigurasi otomatis lewat tiga profil audit (system, protocols, wifi) dan pengecekan CVE berbasis database NVD, SARA memudahkan Anda menemukan misconfiguration dan vulnerability/kerentanan sebelum sempat dimanfaatkan oleh pihak yang tidak bertanggung jawab

Official Link : SARA – RouterOS Security Inspector

guest

0 Comments
Oldest
Newest Most Voted