Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HAMISPA - MISP Threat Intelligence Summit 0x05

Tiago
October 21, 2019

HAMISPA - MISP Threat Intelligence Summit 0x05

Deploying a high resiliency, high availability MISP cluster in AWS.

hack.lu 2019, Luxembourg

Tiago

October 21, 2019
Tweet

More Decks by Tiago

Other Decks in Technology

Transcript

  1. $ whoami - Tiago Faria - Work @ 3CORESec -

    Maintainer of MISP-Cloud github.com/MISP/misp-cloud
  2. $ cat about.txt - Not really about AWS - Present

    scenarios for HA of MISP - Experiments that worked and failed - Notes for deployment
  3. $ cat not-about.txt - Step-by-step guide for deployment - Step-by-step

    guide to install MISP - A course on Amazon Web Services - Evidence that this is the best deployment that can be done
  4. $ cat why.txt Hopefully useful for anyone looking to increase

    resiliency and availability of their MISP deployments. A public reference to high availability in MISP deployments.
  5. $ cat about-hamispa.txt | more A MISP cluster in a

    high availability, resilient environment, that leverages AWS services for performance, security and cost.
  6. --MORE-- - HA & DR for Database - Cluster for

    MISP codebase - Shared file-system between cluster nodes - Load-balancing between cluster nodes - Auto-scaling for availability and performance - Use encryption for both in-transit and at-rest - Leverage WAF and DoS protection
  7. - AWS Virtual Private Cloud (AWS VPC) - VPC with

    2 private subnets and 2 public subnets (different availability zones) - DHCP options configured accordingly - IGW for public subnet - NAT gateway from private subnets $ cat aws-vpc.txt
  8. - AWS Relational Database Service (AWS RDS) - Configure, manage

    and scale databases - Automation for hardware provisioning, setup, patching and backups - Supports several engines (including MySQL) - DR via auto-updating DNS endpoint - Read replica (more on this later) $ cat aws-rds.txt
  9. - AWS Elastic File System (AWS EFS) - Fully-managed NFS

    file system - Amazon maintains mount helper for most distros - Easy to mount via TLS - No upfront requirements for provisioning - Will hold MISP codebase (/var/www/MISP) $ cat aws-efs.txt
  10. - AWS Elastic Compute Cloud (AWS EC2) - Compute capacity

    (think VMs) in AWS - Friendly GNU/Linux ecosystem - These instances will be our cluster nodes - Part of our Auto-Scaling Group (ASG) - Holds AWS SES configuration, PHP, Apache and MISP in AWS EFS mount point (/var/www/MISP) - Will be the source for the AMI that will be used on auto-scaling by other cluster nodes $ cat aws-ec2.txt
  11. - AWS Elastic Load Balancing (AWS ELB) - Entry point

    for access to our EC2 instances - Distributes traffic across multiple targets - Keeps an eye on instance health - Interacts with our auto-scaling group - Source for our CDN? $ cat aws-elb.txt
  12. - AWS Elastic Compute Cloud (AWS EC2) - Bastion-host lives

    in the public subnet - SSH key and Security Group for single IP - MFA for login - Turned on/off as needed $ cat aws-bastion.txt
  13. - AWS Web Application Firewall (AWS WAF) - Support for

    SQL Injection; XSS; Custom rules - Integrated with both ELB and Cloudfront (CDN) - One-click deployment $ cat aws-waf.txt
  14. - AWS Shield - Managed Distributed Denial of Service protection

    - Inline/Always-on detection and mitigation - Turned on by default (AWS Shield Standard) - AWS Shield Advanced supported for both ALB and Cloudfront $ cat aws-shield.txt
  15. - AWS Route53 - HA Managed DNS Provider - Several

    routing policies: Geo DNS, Geo-Proximity, Round Robin - Health Check: DNS Failover $ cat aws-r53.txt
  16. - AWS Key Management System (AWS KMS) - Create and

    manage cryptographic keys - Manage encryption in several AWS services - HSM for FIPS 140-2 validation $ cat aws-kms.txt
  17. - Create VPC & prepare the firewall (SGs) - Create

    EFS share - Create instance in RDS - Create OS and mount EFS; Configure; Tweak it - Create an AMI that will be used for future nodes - Install MISP in EFS - DB Connect to RDS - Create ASG $ cat INSTALL.txt
  18. - Configure ALB - Configure Health Checks and Conditions -

    Configure DNS - Issue certificate based on DNS - Enabled WAF for ALB - Publish it to AWS Cloudfront (CDN)? - Enjoy! --MORE--
  19. - Health check for Apache failure - Recommended: use simple

    .html file (ping.html) - Health check type: Elastic Load Balancer - ELB Health Check fails: - New instance is spawned based on AMI - Failed instance is terminated $ cat chaos-apache.txt
  20. - CPU Percentage failure - Health check type: EC2 Instance

    - EC2/Cloudwatch Failure for stressed CPU: - New instance is spawned based on AMI - Failed instance is terminated $ cat chaos-cpu.txt
  21. - Instance termination failure - Health check type: Elastic Load

    Balancer - EC2/Cloudwatch Failure required instances: - New instance is spawned based on AMI $ cat chaos-termination.txt
  22. - More effective proxying (move to NGINX?) - New ASG

    for AWS RDS Read-replica for programmatic access - AWS Elasticache (Redis) - DNS Failover for different ALB $ cat hamispa-ideas.txt