Skip to content

An automated tool for mapping and correlating cybersecurity frameworks including MITRE ATT&CK, CAPEC, D3FEND, and STRIDE threat modeling categories.

License

Notifications You must be signed in to change notification settings

ellipse2v/cybersecurityFrameworkMapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Cybersecurity Framework Mapping Tool

An automated tool for mapping and correlating cybersecurity frameworks including MITRE ATT&CK, CAPEC, D3FEND, and STRIDE threat modeling categories.

Python 3.8+ License Maintenance

🎯 Features

  • Official STRIDE-CAPEC Mappings: 400+ validated attack patterns across 6 threat categories
  • Real-time Data Fetching: Automatic updates from official MITRE repositories
  • Cross-Framework Correlation: Links between ATT&CK techniques, CAPEC patterns, and STRIDE categories
  • Interactive HTML Reports: Modern, responsive dashboards with statistics
  • Automated Scheduling: Daily updates via cron jobs
  • Comprehensive Monitoring: Health checks, error tracking, and coverage analysis

πŸ“Š Data Sources

Framework Source Update Frequency
MITRE ATT&CK Official STIX Repository Daily
CAPEC MITRE CTI Repository Daily
CAPEC-ATT&CK Mapping Official CSV Mapping Daily
D3FEND Official API When available
STRIDE-CAPEC Mappings Community Research Static (validated)

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • Internet connection for data fetching
  • Unix-like system (Linux/macOS) for automation scripts

Installation

  1. Clone or download the scripts:

    # Download the main files
    wget https://your-repo/cybersecurity_data_updater.py
    wget https://your-repo/automation_config.sh
  2. Run the automated setup:

    chmod +x automation_config.sh
    ./automation_config.sh
  3. Validate the installation:

    python3 validate_setup.py
  4. Run your first update:

    ./run_update.sh

Manual Installation

If you prefer manual setup:

# Install Python dependencies
pip install requests stix2 python-dateutil lxml beautifulsoup4 pandas

# Run the main script
python3 cybersecurity_data_updater.py

# View the report
python3 deploy_web.py

πŸ“‹ Usage

Basic Commands

Command Description
./run_update.sh Manual data update
python3 deploy_web.py Start web server to view reports
./monitor.sh Check system status and statistics
python3 validate_setup.py Validate installation and dependencies

Advanced Usage

Custom Output Directory

from cybersecurity_data_updater import CybersecurityDataUpdater

updater = CybersecurityDataUpdater(output_dir="custom_data")
mapping_data = updater.generate_consolidated_mapping()

API Integration

import json

# Load the consolidated mapping
with open('cybersec_data/consolidated_mapping.json', 'r') as f:
    data = json.load(f)

# Access STRIDE mappings
spoofing_patterns = data['stride_mapping']['Spoofing']['capec_patterns']
print(f"Found {len(spoofing_patterns)} spoofing patterns")

🎯 STRIDE Categories Coverage

Category CAPEC Patterns Description
Spoofing 89 patterns Identity falsification, phishing, content spoofing
Tampering 45 patterns Data manipulation, code injection, file system attacks
Repudiation 6 patterns Log manipulation, evidence elimination
Information Disclosure 25 patterns Data interception, credential harvesting
Denial of Service 35 patterns Resource exhaustion, network flooding
Elevation of Privilege 16 patterns Authentication bypass, privilege escalation

πŸ“Š Output Files

Generated Data Files

cybersec_data/
β”œβ”€β”€ consolidated_mapping.json      # Complete framework mapping
β”œβ”€β”€ cybersec_report.html          # Interactive HTML report
β”œβ”€β”€ attack_enterprise_raw.json    # Raw ATT&CK Enterprise data
β”œβ”€β”€ attack_mobile_raw.json        # Raw ATT&CK Mobile data
β”œβ”€β”€ attack_ics_raw.json           # Raw ATT&CK ICS data
β”œβ”€β”€ capec_raw.json                # Raw CAPEC data
└── d3fend_raw.json               # Raw D3FEND data (when available)

JSON Schema

{
  "metadata": {
    "generated_at": "2025-08-20T12:15:00Z",
    "version": "2.1",
    "data_sources": {
      "attack_techniques_count": 1106,
      "capec_patterns_count": 615,
      "capec_attack_mappings_count": 177,
      "stride_categories": 6
    }
  },
  "stride_mapping": {
    "Spoofing": {
      "description": "Identity falsification attacks",
      "capec_patterns": [...],
      "attack_techniques": [...]
    }
  },
  "framework_stats": {
    "total_capec_mapped": 216,
    "total_attack_mapped": 450,
    "coverage_by_category": {...}
  }
}

βš™οΈ Configuration

Automation Setup

The tool automatically configures:

  • Cron Job: Daily updates at 6:00 AM
  • Logging: Comprehensive logs in cybersec_update.log
  • Error Handling: Retry mechanisms with exponential backoff
  • Health Monitoring: Network connectivity and dependency checks

Customization Options

Modify Update Schedule

# Edit cron job (example: every 6 hours)
crontab -e
# Change to: 0 */6 * * * cd /path/to/script && python3 cybersecurity_data_updater.py

Custom STRIDE Mappings

# In cybersecurity_data_updater.py, modify:
self.stride_capec_mappings = {
    'Spoofing': {
        'capec_ids': ['CAPEC-148', 'CAPEC-151', ...],  # Add/remove IDs
        'description': 'Custom description'
    }
}

πŸ” Monitoring & Troubleshooting

Health Check Dashboard

Run ./monitor.sh to see:

πŸ“Š Cybersecurity Update Monitoring
==================================
πŸ• Last update: 2025-08-18T10:30:00Z (0 days, 2 hours ago)

πŸ“ˆ Current Statistics:
  STRIDE-CAPEC Mappings: 216
  STRIDE-ATT&CK Mappings: 450
  Total ATT&CK Techniques: 800
  Total CAPEC Patterns: 600

🎯 Coverage by STRIDE Category:
  Spoofing            : 89 CAPEC + 120 ATT&CK
  Tampering           : 45 CAPEC +  95 ATT&CK
  ...

⏰ Cron job status: βœ… Cron job configured
🌐 Connectivity check: βœ… All sources accessible

Common Issues

Network Connectivity

# Test connectivity to MITRE repositories
curl -I https://github.com/mitre-attack/attack-stix-data
curl -I https://github.com/mitre/cti

Missing Dependencies

# Reinstall dependencies
pip install -r requirements.txt

# Or install individually
pip install requests stix2 python-dateutil lxml beautifulsoup4 pandas

Permission Issues

# Fix script permissions
chmod +x *.sh *.py

# Fix cron job access
sudo crontab -e  # If running as system service

Log Analysis

Check logs for detailed error information:

# View recent logs
tail -f cybersec_update.log

# Search for errors
grep "ERROR" cybersec_update.log

# Count warnings
grep -c "WARNING" cybersec_update.log

πŸ”§ Development

Project Structure

.
β”œβ”€β”€ cybersecurity_data_updater.py  # Main application
β”œβ”€β”€ automation_config.sh          # Setup automation
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ run_update.sh                 # Manual execution script
β”œβ”€β”€ deploy_web.py                 # Web server for reports
β”œβ”€β”€ monitor.sh                    # System monitoring
β”œβ”€β”€ validate_setup.py             # Installation validator
β”œβ”€β”€ cybersec_data/                # Generated data directory
β”œβ”€β”€ logs/                         # Log files
└── README.md                     # This file

Adding New Frameworks

To integrate additional cybersecurity frameworks:

  1. Add data source URL:

    self.sources['new_framework'] = 'https://api.example.com/data.json'
  2. Create parser method:

    def parse_new_framework_data(self, data):
        # Implementation here
        pass
  3. Update mapping logic:

    def create_stride_mapping_with_real_data(self, techniques, patterns, new_data):
        # Include new framework in mappings

Testing

# Validate setup
python3 validate_setup.py

# Test with limited data (faster)
python3 -c "
from cybersecurity_data_updater import CybersecurityDataUpdater
updater = CybersecurityDataUpdater()
print('Setup OK')
"

# Run full update
./run_update.sh

πŸ“š References

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Contribution Guidelines

  • Follow PEP 8 for Python code style
  • Add comprehensive logging for new features
  • Update documentation and README
  • Test with validate_setup.py before submitting
  • Ensure compatibility with existing automation

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • MITRE Corporation for providing open cybersecurity frameworks
  • Brett Crawley for comprehensive STRIDE-CAPEC mapping research
  • OSTERING.com for community-driven threat modeling resources
  • Cybersecurity community for continuous framework development

πŸ“ž Support

  • Issues: Report bugs and request features via GitHub Issues
  • Documentation: Check this README and inline code comments
  • Community: Join cybersecurity forums for discussions
  • Updates: Watch the repository for latest enhancements

Last Updated: August 20, 2025 | Version: 2.1 | Maintainer: ellipse2v

About

An automated tool for mapping and correlating cybersecurity frameworks including MITRE ATT&CK, CAPEC, D3FEND, and STRIDE threat modeling categories.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published