known_IP() function tests your network’s ability to detect and block connections to known malicious IP addresses. It downloads threat intelligence from multiple reputable sources and attempts socket connections to validate your security controls.
Data Sources
This module uses three curated threat intelligence feeds:- EmergingThreats Known -
http://opendbl.net/lists/etknown.list - Cisco Talos Intelligence -
http://opendbl.net/lists/talos.list - Mirai Botnet IPs -
https://mirai.security.gives/data/ip_list.txt
These feeds are updated regularly and contain IP addresses associated with malware command & control servers, botnets, and other malicious activities.
How It Works
1
Download Threat Feeds
Downloads the latest malicious IP lists from EmergingThreats, Cisco Talos, and Mirai sources.
2
Random Sampling
Randomly selects 5 IPs from each feed (15 total samples) and validates them using IP address pattern matching.
3
Port Scanning
Tests socket connections to each IP on common service ports (80, 22, 443) with a 5-second timeout.
4
Results Logging
Logs all connection attempts with timestamps to
IP_Results.txt, marking each as SUCCESSFUL or FAILED.5
Cleanup
Removes temporary downloaded feed files after testing completes.
Output Format
Results are saved to IP_Results.txt with the following format:What to Monitor
Firewall Blocks
Your firewall should block all connection attempts to these IPs. Check firewall logs for denied connections.
IDS/IPS Alerts
Intrusion detection systems should generate alerts when connections are attempted to known malicious IPs.
Network Logs
Review network traffic logs to ensure outbound connections to malicious IPs are logged and prevented.
SIEM Events
Security information and event management systems should correlate these IPs with threat intelligence feeds.
Testing Workflow
The test generates 45 total connection attempts (15 IPs × 3 ports). Each attempt has a 5-second timeout, so the test takes approximately 3-4 minutes to complete.