Integrate threat intelligence with security events for enhanced detection and response.
Correlate security events with threat intelligence to identify attacks and attribute threats.
- Threat Intelligence Management: Store and manage threat indicators
- Event Correlation: Correlate security events with threat intel
- IP Reputation: Check IP addresses against threat feeds
- Indicator Checking: Validate indicators against threat intelligence
- Attack Attribution: Identify associated threat actors
- Malware Tracking: Track malware families and campaigns
git clone https://github.com/hallucinaut/threatintel.git
cd threatintel
go build -o threatintel ./cmd/threatintel
sudo mv threatintel /usr/local/bin/go install github.com/hallucinaut/threatintel/cmd/threatintel@latest# Add threat indicator
threatintel add ip 192.168.1.100
threatintel add domain malicious.com
threatintel add hash abc123def456# Check if indicator is malicious
threatintel check 192.168.1.100# Check IP reputation
threatintel reputation 10.0.0.1# Correlate events with threat intel
threatintel correlatepackage main
import (
"fmt"
"github.com/hallucinaut/threatintel/pkg/intel"
"github.com/hallucinaut/threatintel/pkg/correlate"
)
func main() {
// Create threat intel platform
platform := intel.NewIntelligencePlatform()
// Add indicator
indicator := intel.ThreatIndicator{
ID: "ind-001",
Value: "192.168.1.100",
Type: intel.TypeIP,
ThreatType: "malware_c2",
Severity: "HIGH",
AssociatedAttacker: "APT29",
}
platform.AddIndicator(indicator)
// Check if malicious
isThreat := platform.IsThreat("192.168.1.100", intel.TypeIP)
fmt.Printf("Is Threat: %v\n", isThreat)
// Check reputation
platform.UpdateReputation("10.0.0.1", 0.2, "malicious")
rep := platform.GetReputation("10.0.0.1")
fmt.Printf("Reputation: %s\n", rep.Status)
// Correlate events
correlator := correlate.NewCorrelator()
events := []correlate.Event{
{
ID: "evt-001",
Data: map[string]interface{}{"ip": "192.168.1.100", "severity": "HIGH"},
},
}
correlations := correlator.Correlate(events)
fmt.Printf("Correlations: %d\n", len(correlations))
}| Type | Example | Use Case |
|---|---|---|
| IP | 192.168.1.100 | Network threat detection |
| Domain | malicious.com | DNS-based threats |
| URL | http://evil.com | Web-based attacks |
| Hash | abc123... | File malware detection |
| spam@evil.com | Phishing detection | |
| File | malware.exe | File-based threats |
| Certificate | cert123 | Certificate-based threats |
| CIDR | 10.0.0.0/24 | Network ranges |
- Score calculation (0-100%)
- Status tracking (malicious, suspicious, clean)
- Activity history
- Source attribution
- Malicious IP detection
- Malicious domain check
- File hash validation
- URL reputation
- Email reputation
- IP reputation correlation
- Domain intelligence matching
- Hash comparison
- Attack pattern detection
- Threat actor attribution
- Associated attacker identification
- Campaign tracking
- TTP mapping
- Attribution analysis
- Malicious IP Activity - Correlate with known bad IPs
- Suspicious Domain - Check domain reputation
- Malware Hash - Match against malware databases
- Phishing Email - Detect phishing attempts
- C2 Communication - Identify command and control
Create custom correlation rules:
- Define conditions based on event fields
- Set thresholds for triggering
- Specify actions and notifications
- Configure priorities
# Run all tests
go test ./...
# Run with coverage
go test -cover ./...
# Run specific test
go test -v ./pkg/correlate -run TestCorrelateEventsChecking indicator: 192.168.1.100
β οΈ Indicator 192.168.1.100 is MALICIOUS
Threat Type: malware_c2
Severity: HIGH
Associated Attacker: APT29
Malware Family: Cobalt Strike
=== Threat Intelligence Correlation Report ===
Total Correlations: 1
Correlated Events:
[1] HIGH - Risk Score: 75%
Attack Pattern: Malicious IP Activity
Indicators: 2 found
Recommendation: Investigate within 24 hours
- Threat Hunting: Correlate events with threat intel
- Incident Response: Identify attack sources
- Security Monitoring: Real-time threat detection
- Threat Attribution: Identify threat actors
- Security Operations: Enhance SOC capabilities
- Integrate multiple threat intel feeds
- Regularly update indicators
- Correlate with internal logs
- Automate response actions
- Maintain indicator history
- Share threat intelligence
- Monitor indicator expiration
threatintel/
βββ cmd/
β βββ threatintel/
β βββ main.go # CLI entry point
βββ pkg/
β βββ intel/
β β βββ intel.go # Threat intel management
β β βββ intel_test.go # Unit tests
β βββ correlate/
β βββ correlate.go # Event correlation
β βββ correlate_test.go # Unit tests
βββ README.md
MIT License
- Threat intelligence community
- Security researchers
- Open source threat feeds
Built with GPU by hallucinaut