Skip to content
/ threat Public

This Python script monitors threat intelligence feeds by fetching data from multiple sources, processing the threat indicators, saving them to an SQLite database, and sending email alerts for critical threats. It supports JSON feeds out of the box and can be extended for RSS/XML feeds.

Notifications You must be signed in to change notification settings

knithin/threat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Required Changes to Make the Script Work Feed URLs and Types: Replace the placeholder feed URLs (https://example.com/threat-feed1.json, etc.) in the CONFIG["feeds"] dictionary with actual threat intelligence feed URLs. Ensure the feed type (json or rss) is accurate for each feed.

SMTP Configuration: Update the CONFIG["smtp"] dictionary with valid SMTP server credentials: server: Your SMTP server address (e.g., smtp.gmail.com). port: SMTP port (e.g., 587 for TLS). username: Your email address. password: Email password or app-specific password. recipient: Email address to receive alerts.

Threat Feed Data Structure: Confirm the JSON structure of your feeds aligns with the parsing logic in process_feed(). Adjust the keys ("indicator", "severity", etc.) if necessary to match the feed format.

Dependencies: Install required Python libraries: pip install requests For RSS/XML feeds, you might need feedparser: pip install feedparser

Database Initialization: Ensure the script has permission to create and write to threats.db in the working directory.

RSS/XML Parsing (Optional): If working with RSS/XML feeds, implement parsing using feedparser or xml.etree.ElementTree in the process_feed() function.

Testing: Test with live feeds and adjust error handling (try/except blocks) for edge cases, such as timeouts, malformed data, or empty feeds.

About

This Python script monitors threat intelligence feeds by fetching data from multiple sources, processing the threat indicators, saving them to an SQLite database, and sending email alerts for critical threats. It supports JSON feeds out of the box and can be extended for RSS/XML feeds.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages