استفاده از لاگهای میکروتیک برای تشخیص نفوذ
RouterOS سیستم لاگگیری قدرتمندی دارد. با پیکربندی صحیح آن، میتوانید تلاشهای نفوذ، دسترسیهای غیرمجاز و فعالیتهای مشکوک را — همه از لاگهای خود روتر — شناسایی کنید.
تنظیم Remote Syslog
همه لاگها را به یک سرور syslog مرکزی ارسال کنید:
TEXT
/system logging action
add name=remote-syslog target=remote remote=192.168.88.200 remote-port=514 bsd-syslog=yes syslog-facility=local0
/system logging
add topics=info action=remote-syslog
add topics=warning action=remote-syslog
add topics=error action=remote-syslog
add topics=critical action=remote-syslogفعال کردن لاگگیری قوانین فایروال
log=yes و log-prefix را به قوانین فایروال بحرانی اضافه کنید:
TEXT
/ip firewall filter
add chain=input action=drop log=yes log-prefix="INPUT-DROP:"
add chain=input src-address-list=ssh_blacklist protocol=tcp dst-port=22 action=drop log=yes log-prefix="SSH-BLACKLIST:"تجزیه و تحلیل لاگ: چه چیزی باید جستجو کرد
تلاشهای ناموفق ورود:TEXT
/log print where message~"login failure"TEXT
/log print where message~"INPUT-DROP"TEXT
/log print where topics~"system"شناسایی تغییرات پیکربندی غیرمجاز
یک اسکریپت بسازید که کاربران، اسکریپتها یا scheduler جدید را بررسی کند:
TEXT
/system script
add name=sec-audit source={
:local userCount [/user print count-only]
:local scriptCount [/system script print count-only]
:local schedCount [/system scheduler print count-only]
/log info message="SEC-AUDIT: users=$userCount scripts=$scriptCount schedulers=$schedCount"
}
/system scheduler add name=sec-audit interval=15m on-event=sec-auditهشدارهای ایمیل برای رویدادهای بحرانی
TEXT
/system logging action
add name=email-critical target=email email=admin@example.com
/system logging
add topics=critical action=email-critical
add topics=error action=email-criticalچکلیست تشخیص نفوذ
- [ ] سرور syslog از راه دور پیکربندی شده
- [ ] موضوعات
accountوsystemبه syslog ارسال میشوند - [ ] قوانین drop فایروال
log=yesدارند - [ ] هشدارهای ایمیل برای رویدادهای بحرانی
- [ ] بررسی منظم لاگ برنامهریزی شده
