print(""+Fore.WHITE+"CAUTION: "+Fore.YELLOW+"For the tool to work correctly, use the RouterOS configuration from using the"+Fore.WHITE+" export verbose"+Fore.YELLOW+" command\n")
discovery_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}Discovery protocols are enabled on all interfaces{Style.RESET_ALL}")
dns_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Consider closing this port from the internet to avoid unwanted traffic{Style.RESET_ALL}")
dns_found=True
ifdns_found:
print(f"{Fore.CYAN}"+"-"*30+Style.RESET_ALL)
print(f"{Fore.CYAN}[+] DNS Settings:{Style.RESET_ALL}")
upnp_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}UPnP is enabled{Style.RESET_ALL}")
upnp_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}Potential unauthorized port forwarding and security risks{Style.RESET_ALL}")
ddns_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}Dynamic DNS is enabled{Style.RESET_ALL}")
ddns_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}Exposure to dynamic IP changes and potential unauthorized access{Style.RESET_ALL}")
ssh_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Enable strong crypto (strong-crypto=yes) for enhanced security. This will use stronger encryption, HMAC algorithms, larger DH primes, and disallow weaker ones{Style.RESET_ALL}")
socks_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}SOCKS proxy is enabled{Style.RESET_ALL}")
socks_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}Potential unauthorized access and misuse of network resources{Style.RESET_ALL}")
socks_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Disable SOCKS proxy or ensure it is properly secured. SOCKS can be used maliciously if RouterOS is compromised{Style.RESET_ALL}")
vrrp_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}VRRP interface '{interface_name}' has no authentication{Style.RESET_ALL}")
vrrp_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}Potential unauthorized access and manipulation of VRRP settings{Style.RESET_ALL}")
vrrp_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Configure authentication for VRRP interfaces to prevent unauthorized access{Style.RESET_ALL}")
romon_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}ROMON is enabled{Style.RESET_ALL}")
romon_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}ROMON can be a jump point to other MikroTik devices and should be monitored carefully{Style.RESET_ALL}")
romon_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Monitor ROMON activities and ensure proper security measures are in place{Style.RESET_ALL}")
mac_server_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}MAC Telnet server is active on all interfaces{Style.RESET_ALL}")
mac_server_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}This reduces the security of the Winbox interface. Filter access{Style.RESET_ALL}")
mac_server_found=True
ifmac_server_found:
print(f"{Fore.CYAN}"+"-"*30+Style.RESET_ALL)
print(f"{Fore.CYAN}[+] MAC Server Settings:{Style.RESET_ALL}")
mac_winbox_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}MAC Winbox Server is accessible on all interfaces{Style.RESET_ALL}")
mac_winbox_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}This reduces the security of the Winbox interface. Filter access{Style.RESET_ALL}")
mac_winbox_found=True
ifmac_winbox_found:
print(f"{Fore.CYAN}"+"-"*30+Style.RESET_ALL)
print(f"{Fore.CYAN}[+] MAC Winbox Server Settings:{Style.RESET_ALL}")
snmp_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Change the community name to something more secure{Style.RESET_ALL}")
snmp_found=True
ifprivate_match:
snmp_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}SNMP community 'private' is in use{Style.RESET_ALL}")
snmp_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Change the community name to something more secure{Style.RESET_ALL}")
ospf_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}OSPF interface '{match}' is not set to passive{Style.RESET_ALL}")
ifmissing_auth:
ospf_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}OSPF interface '{match}' has no authentication{Style.RESET_ALL}")
ospf_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}Potential unauthorized access and network disruption{Style.RESET_ALL}")
ospf_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Configure authentication and passive mode for OSPF interfaces to enhance security{Style.RESET_ALL}")
poe_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}PoE is set to auto-on{Style.RESET_ALL}")
poe_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}There is a risk of damaging connected devices by unexpectedly supplying power to the port{Style.RESET_ALL}")
poe_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.YELLOW}Review and set PoE settings appropriately{Style.RESET_ALL}")
poe_found=True
ifpoe_forced_on_match:
poe_info.append(f"{Style.BRIGHT+Fore.RED}[!] Warning: {Style.BRIGHT+Fore.YELLOW}PoE is set to forced-on{Style.RESET_ALL}")
poe_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Impact: {Style.BRIGHT+Fore.YELLOW}There is a significant risk of damaging connected devices by unexpectedly supplying power to the port{Style.RESET_ALL}")
poe_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] Recommendation: {Style.BRIGHT+Fore.YELLOW}Review and set PoE settings appropriately{Style.RESET_ALL}")
smb_info.append(f"{Style.BRIGHT+Fore.WHITE}[*] Recommendation: {Style.BRIGHT+Fore.GREEN}Are you sure you want SMB? If you don't need it, turn it off. Be careful{Style.RESET_ALL}")
services_info.append(f"{Style.BRIGHT+Fore.RED}[*] {service} is enabled{Style.RESET_ALL} - {Style.BRIGHT+Fore.GREEN}Consider disabling for security reasons{Style.RESET_ALL}")
else:
services_info.append(f"{Style.BRIGHT+Fore.YELLOW}[*] {service} is enabled{Style.RESET_ALL}")
else:
services_info.append(f"{Style.BRIGHT+Fore.GREEN}[*] {service} is disabled{Style.RESET_ALL}")
else:
services_info.append(f"{Style.BRIGHT+Fore.RED}[!] {service} configuration not found{Style.RESET_ALL}")
print(f"{Style.BRIGHT+Fore.GREEN}[!] Recommendation:{Style.RESET_ALL}{Style.BRIGHT+Fore.GREEN}Restrict access to RMI only from trusted subnets{Style.RESET_ALL}")