building an open source ids/ips service on aws with suricata

17
1 © 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | October 20 - 22, 2021 Building an open source IDS/IPS service on AWS with Suricata Nick Coval, GTM Networking Specialist https://www.linkedin.com/in/nickcoval/ Adam Palmer, Specialist Solution Architect, Networking www.linkedin.com/in/adamlewispalm

Upload: others

Post on 20-Feb-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building an open source IDS/IPS service on AWS with Suricata

1© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved | 1© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |October 20 - 22, 2021

Building an open source IDS/IPS service on AWS with Suricata

Nick Coval, GTM Networking Specialist

https://www.linkedin.com/in/nickcoval/

Adam Palmer, Specialist Solution Architect, Networking

www.linkedin.com/in/adamlewispalm

Page 2: Building an open source IDS/IPS service on AWS with Suricata

2© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Agenda

• Suricata Inspection use cases

• Network appliance challenges

• How Gateway Load Balancer (GWLB) helps

• Top GWLB use cases and how it works

• How to deploy Suricata in-line on ECS using GWLB

• Demo

• Q&A

Page 3: Building an open source IDS/IPS service on AWS with Suricata

3© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Suricata Inspection Use Cases

Out-Of-Band Inline

Source

Destination

VPC TrafficMirroring

VPC Traffic Mirroring

NLB

Suricata

Suricata

Source

Destination

GWLB

Suricata Instances

Passive IDS Inline IPS

Deep dive in today’s sessionAWS Quick Start Guide ->

Target Group

Page 4: Building an open source IDS/IPS service on AWS with Suricata

4© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Network Appliances in the cloud

Use the same Network Appliances on AWS and on-premises

Page 5: Building an open source IDS/IPS service on AWS with Suricata

5© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Challenges solved by Gateway Load Balancer

GWLB

Source Destination

Before Gateway Load Balancer

Single point of failureLimited vertical scalePassive appliances sit idleDisruptive insertionMixed admin domains

After Gateway Load Balancer

Appliance 1(Passive)

Appliance 2(Active)

Source Destination

Fault TolerantElastic Horizontal scalingActive / Active Fleet Transparent InsertionIsolated Admin Domains

Appliance Fleet

Page 6: Building an open source IDS/IPS service on AWS with Suricata

6© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Gateway Load Balancer Customer Benefits

Reduce downtime

Eliminate single points of failure and scale horizontally in an

active/active mode

Improve Performance

Remove bottlenecks, reduce latency and increase bandwidth

Accelerate Your Cloud Migration

Leverage existing skillsets, tools, and license agreements

Meet compliance and regulatory requirements

Lower Costs

Eliminate standby appliances, consolidate

inspection VPCs and reduce operational

overhead

Page 7: Building an open source IDS/IPS service on AWS with Suricata

7© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

FirewallsIDS/IPS

Network Visibility and Analytics

Custom Linux Inspection Appliances

Gateway Load Balancer Top Use Cases

Partner Solutions DIY

Page 8: Building an open source IDS/IPS service on AWS with Suricata

8© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

How it works: GWLB Components

Appliance Fleet

L3 GatewayNext-hop

No packet rewrite

+L4 Load BalancerScaling

Flow stickiness

Health Checks

Flow rerouting

GWLB

Components

• Gateway Load Balancer Endpoint (GWLBE) - A new type of VPC endpoint

that can be a next-hop in a VPC route table

• Gateway Load Balancer (GWLB) - A new type of load balancer that

includes L3 Gateway + L4 Load Balancer capabilities

• Both components powered by AWS Hyperplane

Deployment

• Create GWLB and appliance fleet using steps similar to NLB

• Send traffic to GWLBE by updating VPC route tables

L3 Encap (GENEVE)

GWLBE VPC Endpoint

Consumer VPC

Provider VPC

0/0 → vpce-id

Source Destination

Page 9: Building an open source IDS/IPS service on AWS with Suricata

9© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Learn & Be Curioushttps://www.aboutamazon.co.uk/working-at-amazon/our-culture/our-leadership-principles

• Launch of AWS Network Firewall sparked interest in IPs/IDs rule building and capabilities• Need / Want to help customers by giving them options to build themselves• Which existing services could be harnessed for use with GWLB mechanics?

• PoC it!

Source

Page 10: Building an open source IDS/IPS service on AWS with Suricata

10© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Invent and SimplifyInfrastructure as code and pipelines

• Code compilation and Image packing - Can this process be improved?• Could it be made portable?• Desire to use DevOps processes for code release and auditing• Customizable and extensible

Builder Community

CFN

Release Me

CloudFormation

CodePipeline

Lambda

CodeBuild

CodeCommit

CodeDeploy

Page 11: Building an open source IDS/IPS service on AWS with Suricata

11© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Invent and SimplifyFrom commits to running code

Suricata

RulesFetcher

ECR Repo

ECS Service ECS Task

Suricata

RulesFetcher

ECS

ECS Task

Suricata

RulesFetcher

ECS Task

Suricata

RulesFetcher

CodeCommitCodePipelineCodeBuild

S3

Activate

Auto Scaling Group

Az (A) Az (B) Az (C)

Page 12: Building an open source IDS/IPS service on AWS with Suricata

12© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Invent and SimplifyScaling and Baseline

• Choose a suitable instance with a good network baseline and suitable RAM/CPU allocation• Use ECS Application Autoscaling and define your Target, Policy and Metric• Build custom metrics as desired

Page 13: Building an open source IDS/IPS service on AWS with Suricata

13© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Dive DeepThings we learned and built along the way

• ECR Public Repo to the rescue - public.ecr.aws/amazonlinux/amazonlinux:%

• Docker build steps went Rusty over night - https://sh.rustup.rs

• Pcap operations and failing to read the raw Suricata code• Git driven, rule deployment and engine updates• Surfacing *log outputs• Exposing GeoIP and Lua functions• Go to the Zoo

Page 14: Building an open source IDS/IPS service on AWS with Suricata

14© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Think BigBusiness networks, blogs and re:Invent

Create a public facing blog re:Invent 2021 WorkshopOpen-source security appliances with AWS Gateway Load Balancer

2.5k post reads on LinkedIn1k reads on AWS Blog Channel250 views, 43 clones and 4 forks on GitHub

120 minute, gamified workshopKeep production runningGain points for complianceGet stickers ☺

Page 15: Building an open source IDS/IPS service on AWS with Suricata

15© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Useful Links

Integrating you custom logic or appliance with Gateway Load Balancer

Building and open-source IDS IPS service for Gateway Load Balancer

AWS Samples GitHub repo link

Page 16: Building an open source IDS/IPS service on AWS with Suricata

16© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Demo

Page 17: Building an open source IDS/IPS service on AWS with Suricata

17© 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved |

Thank you!