49
Cops and Robbers: Simulating the Adversary for Detection Validation Tim Frazier @ Splunk @timfrazier1 Kyle Champlin @ Splunk @dishwishy

Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

Cops and Robbers: Simulating the Adversary for Detection Validation

Tim Frazier @ Splunk @timfrazier1

Kyle Champlin @ Splunk@dishwishy

Page 2: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

© 2 0 1 9 S P L U N K I N C .

@dishwishy @timfrazier1

1. Why should we do this?

• Not too Philosophical, I promise

2. How can we do this?

• Our Tooling Overview: Diagram + Details

3. What does this look like IRL? • Simulated Scenario Demo

4. When can I get started?

• Hint: Now is good

Talk Agenda:

AdvSim for Detection Validation

Page 3: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

© 2 0 1 9 S P L U N K I N C .

@dishwishy @timfrazier1

1. Why should we do this?

• Not too Philosophical, I promise

2. How can we do this?

• Our Tooling Overview: Diagram + Details

3. What does this look like IRL? • Simulated Scenario Demo

4. When can I get started?

• Hint: Now is good

Talk Agenda:

AdvSim for Detection Validation

Page 4: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Simulate the Adversary?

*But First:Simulate == Emulate?

Page 5: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Simulate the Adversary?The Robbers and the Goal

Organized Crime

Insider Threat

Nation State

Data and Assets

Page 6: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Simulate the Adversary?We add controls to frustrate our adversary

Organized Crime

Insider Threat

Nation State

Data and Assets

Identity and Access Mgmt.

Log Collection/

Analysis

Human Analysts

Endpoint Protection

Physical Controls

IntrusionPrevention

SIEM

Perimeter Defense

Network Monitoring

Machine Learning

Page 7: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Simulate the Adversary?But they often still succeed

Identity and Access Mgmt.

Log Collection/

Analysis

Human Analysts

Endpoint Protection

Physical Controls

IntrusionPrevention

SIEM

Network Monitoring

Machine Learning

Organized Crime

Insider Threat

Nation State

Data and Assets

Perimeter Defense

Page 8: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Perimeter Defense

Why Simulate the Adversary?Toward a Threat Centric Approach

Identity and Access Mgmt.

Log Collection/

Analysis

Human Analysts

Endpoint Protection

Physical Controls

IntrusionPrevention

SIEM

Network Monitoring

Machine Learning

Organized Crime

Insider Threat

Nation State

Data and Assets

Page 9: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Simulate the Adversary?Toward a Threat Centric Approach

Identity and Access Mgmt.

Endpoint Protection

Perimeter Defense

Identity and Access Mgmt.

Log Collection/

Analysis

Human Analysts

Endpoint Protection

Physical Controls

IntrusionPrevention

SIEM

Network Monitoring

Machine Learning

Organized Crime

Insider Threat

Nation State

Data and Assets

This talk is about automating the process of simulating and reliably identifying the techniques commonly used by our adversaries.

Page 10: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Not Just Pen Test and Red Team?TL;DR: For the same reason we automate anything!

Automated Adversary SimulationPros• Consistent and repeatable• Test after changes (regression)• Easy to measure and metricize• Easy to share• Relatively low cost• Can get a wide distribution across

known techniquesCons• Difficult to simulate a sentient

human adversary

Pen Test / Red TeamPros

▶ Best simulation of a real attacker

• Will combine techniques in difficult to predict ways

▶ High-end testers can bring new techniques, or clever variations

Cons

▶ Pen testers are only human, they can and do get stuck in ruts

▶ Only as good as your next change request

▶ Relatively high cost

Page 11: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Why Not Just Pen Test and Red Team?TL;DR: For the same reason we automate anything!

Automated Adversary SimulationPros• Consistent and repeatable• Test after changes (regression)• Easy to measure and metricize• Easy to share• Relatively low cost• Can get a wide distribution across

known techniquesCons• Difficult to simulate a sentient

human adversary

Pen Test / Red TeamPros

▶ Best simulation of a real attacker

• Will combine techniques in difficult to predict ways

▶ High-end testers can bring new techniques, or clever variations

Cons

▶ Pen testers are only human, they can and do get stuck in ruts

▶ Only as good as your next change request

▶ Relatively high cost

Page 12: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

1. Confirm efficacy of controls and detections

2. Regression testing: what worked yesterday…still works today

3. Don’t miss a detection for a technique/tactic that is widely known to the community

4. Identify detection blind-spots

5. Confirm vendor claims. “We detect that”… “Ok show me!”

So…Why?

Page 13: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

© 2 0 1 9 S P L U N K I N C .

@dishwishy @timfrazier1

1. Why should we do this?

• Not too Philosophical, I promise

2. How can we do this?

• Our Tooling Overview: Diagram + Details

3. What does this look like IRL? • Simulated Scenario Demo

4. When can I get started?

• Hint: Now is good

Talk Agenda:

AdvSim for Detection Validation

Page 14: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

A Closer Look at MITRE ATT&CK

Page 15: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

A Closer Look at MITRE ATT&CK

Page 16: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Technique T1060

Page 17: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

ATT&CK Navigator

Page 18: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

A Closer Look at Atomic Red Team

https://www.redcanary.com/atomic-red-team

Mike Haag

Page 19: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

A Closer Look at Atomic Red Team

https://www.redcanary.com/atomic-red-team

Mike Haag

Page 20: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

A Closer Look at Atomic Red Team

https://www.redcanary.com/atomic-red-team

Page 21: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

A Closer Look at Atomic Red Team

https://www.redcanary.com/atomic-red-team

Page 22: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

How We Simulate the Adversary Using Splunk, Phantom, MITRE ATT&CKTM, and Atomic Red Team

We use Splunk… But you don’t have to!

Page 23: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

“Adversary Simulation” Project Authors

Dave HerraldKyle ChamplinTim Frazier

Page 24: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

AdvSim Project Key Components

• See our talks from Splunk .Conf 2018 and 2019 for more details on the project

https://conf.splunk.com/watch/conf-online.html?search=cops#/

▶ Splunk ATT&CK Sim App:

• MITRE ATT&CK Navigator

• Simulation Runner Dashboard

▶ Phantom Content:

• Atomic Red Team app

• Windows Remote Management app

• Actually issues commands on endpoint

• Modular Simulation Playbook

▶ Windows Target System

• Win 10 w/Sysmon, WinRM, Splunk Universal Forwarder (Part of Detection Lab)

• Olaf Hartong’s Sysmon config w/ minor tweaks:

• https://github.com/olafhartong/sysmon-configs/blob/master/sysmonconfig-v10.xml

Diagram coming on next slide

Dave Herrald Kyle ChamplinTim Frazier

Page 25: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

AdvSim Project Approach

Splunk Phantom

Adversary Simulation PlaybookExecutes Atomic Red Team detection tests & Scythe Campaigns against Windows Hosts

Win Hosts

Splunk UF

Splunk Security Analytics

Atomic Red Team AppCollects and Formats ART tests in Phantom

ES CONTENT

UPDATE

ATT&CK Sim Splunk App

Simulation Runner

ATT&CK Navigator

THREAT

HUNTING

APP FROM

OLAF

HARTONG

Dave Herrald Kyle ChamplinTim FrazierOrange Boxes = Our Content

Page 26: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

• ATT&CK Navigator directly in Splunk

• Use ATT&CK layers to provide:• MITRE provided threat group

overlays• Splunk provided detection rules

mapped to techniques via Splunk Security Essentials

• Gaps in currently active detections• Visual feedback on successful vs.

unsuccessful detections of techniques

• Auto Refreshes in real-time

• Taking weekly/monthly screenshots to track detection progress

Splunk ATT&CK Navigator AppInterface for selecting techniques and tactics and visualizing results

Page 27: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

• Execution of test selected from ATT&CK Navigator app

• Select a target host/asset, initiate the test, and see the results

• Generic searches for corresponding events on this same dashboard

• “Validation” button updates ATT&CK layer

• Bottom Line: This allows Blue Teamer to run the whole workflow

Splunk Simulation Runner DashboardInterface for Kicking Off tests and validating their results

Page 28: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

* This all works in the free community edition of Phantom

Page 29: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

1. Format and Post a start event directly into Splunk

Page 30: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

2. Check the OS for the test we are running

Page 31: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

3. In the Windows Path, format and write an event to the Windows Event Log through WinRM

Page 32: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

4. Check if we want to use ”Invoke-AtomicTest” or WinRM to run the Atomic Red Team test directly

Page 33: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

5. If using “Invoke”, format the command and call it

Page 34: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

6. If ART test, format it, then run in PowerShell or cmd.exe as appropriate

Page 35: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

7. Check for an execution error and post the error message back to Splunk

Page 36: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

8. Format our “END” event and write it to the Windows Host, as well as post it to Splunk

Page 37: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Phantom Modular Simulation Playbook

Available at: https://github.com/timfrazier1/AdvSimPlaybooks

Page 38: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

• Not everything is malicious

• Not every detection should spawn an alert or investigation

• Investigations can be started from multiple detections on a single asset/identity

Detection vs. AlertingA very brief thought on detection methodology

Page 39: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

© 2 0 1 9 S P L U N K I N C .

@dishwishy @timfrazier1

1. Why should we do this?

• Not too Philosophical, I promise

2. How can we do this?

• Our Tooling Overview: Diagram + Details

3. What does this look like IRL? • Simulated Scenario Demo

4. When can I get started?

• Hint: Now is good

Talk Agenda:

AdvSim for Detection Validation

Page 40: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Demo

Page 41: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Demo

Page 42: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Page 43: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

© 2 0 1 9 S P L U N K I N C .

@dishwishy @timfrazier1

1. Why should we do this?

• Not too Philosophical, I promise

2. How can we do this?

• Our Tooling Overview: Diagram + Details

3. What does this look like IRL? • Simulated Scenario Demo

4. When can I get started?

• Hint: Now is good

Talk Agenda:

AdvSim for Detection Validation

Page 44: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

• Overview, Intro video, Install Guide and…

Get Started Today!https://github.com/timfrazier1/AdversarySimulation

Page 45: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

• Terraform install option for easy spin up:

Up and Running in a matter of hours…https://github.com/timfrazier1/AdversarySimulation

Page 46: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

• Terraform install option for easy spin up:

Up and Running in a matter of hours…https://github.com/timfrazier1/AdversarySimulation

Page 47: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Now it’s your turn…

Splunk

Simulation Runner

Phantom

Adversary Simulation PlaybookExecutes Atomic Red Team detection tests

Windows OSX Linux

Splunk UF Splunk UF Splunk UF

ATT&CK Navigator

Splunk Security Analytics

Atomic Red Team AppImplements ATR in Phantom

ES CONTENT

UPDATE

▶ Give it a shot! We welcome feedback…

▶ Future Improvement Options:

• Automation settings for repeating tests on a specified frequency

• Building more detection content

• Including Splunk Attack Range project as another option for the testing environment

Thanks to our Beta Testers:• Andrew Schwartz from TrustedSec• Jonny Johnson (@jsecurity101) from SpecterOps• David Broggy from Trustwave

Thanks to Chris Long (@centurion) for Detection Lab: https://github.com/clong/DetectionLab

Thanks to Olaf Hartong (@olafhartong) for Sysmon configuration and Threat Hunting App: https://github.com/olafhartong/ThreatHunting

Thanks to MITRE and Red Canary for their awesome work

Page 48: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

© 2 0 1 9 S P L U N K I N C .

@dishwishy @timfrazier1

1. Why should we do this?

• Not too Philosophical, I promise

2. How can we do this?

• Our Tooling Overview: Diagram + Details

3. What does this look like IRL? • Simulated Scenario Demo

4. When can I get started?

• Hint: Now is good

Talk Agenda:

AdvSim for Detection Validation

Page 49: Cops and Robbers: Simulating the Adversary for Detection ... · Toward a Threat Centric Approach Identity and Access Mgmt. Endpoint Protection Perimeter Defense Log Collection/ Analysis

@dishwishy @timfrazier1

Questions?Tim Frazier | @timfrazier1

Kyle Champlin | @dishwishy