77
@jwgoerlich Seeing Purple Hybrid security teams for the Enterprise

Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Embed Size (px)

DESCRIPTION

Given at BSides Jackson 2013

Citation preview

Page 1: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

@jwgoerlich

Seeing Purple

Hybrid security teams for the Enterprise

Page 2: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Security consultant with VioPoint

La DoSa Nostra

#misec

Twitter@b31tf4c3

Freenode (#misec / #burbsec / #ladosanostra)Beltface

Me

Page 3: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

The ONE thing

Productivity book

The ONE thing your organization does/has

Protect and build off that

Avoid the easy pentest

Page 4: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

The Client

$client0 – company in the energy sector

$client1 – company in the financial sector

Page 5: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

A Cascade of Pebbles

Talk by Josh Little – Bsides Detroit 2013

Performed Pentest at $client0

Leveraged that scenario to create a program at $client1

Page 6: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

My idea of hacking is taking the tactics, techniques, and procedures, that different threats are using today …

Page 7: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Using them against our organizations, when they have a mature program, to understand how our controls stand up when exercised by a sophisticated thinking adversary.

-- Rapheal Mudge, Armitage and Cobalt Strike, Bsides Detroit 2013 Podcast

Page 8: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013
Page 9: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Detect Prevent Correct

Page 10: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Detect, Prevent, Correct

Detect – catch attackers in action (SIEM)

Prevent – Stop attackers (Vulnerability Management)

Correct – raise the costs by disrupting or distracting the attackers (eg. honey pots)

Page 11: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Blue Team - Detect

SIEM – Security Incident and Event Monitoring

Pool log sources and analyze logs and flows

Page 12: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Blue Team - Prevent

VM program

Gives visibility into system preparednessHelps with patching scheduleIdentifies most critical hosts

Page 13: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Blue Team - Correct

Page 14: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013
Page 15: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Red Team - Assessment

Pentesting

Required as part of auditsWe break it, you fix itHigher risk

How do you know remediation is working if its never been tested?

Page 16: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Red Team - ExerciseSelect a specific stage in the attack path

Assume all prior controls have failed

Test preventative, detective, corrective

Test both the controls and the response

Minimal risk

Page 17: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Example

Stage 4 – Persistence

Popping the Penguin – SecTor 2013

No 1337 hax needed

Page 18: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Assessment v. ExerciseExercise

Use real techniques

Use real objectives

Model a real attack

Test specific controls

Assessment

Use real techniques

Use real objectives

Exec an actual attack

Test overall posture

Page 19: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Purple Team

Page 20: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Purple Team

Take knowledge of your security (Blue)

Take knowledge of your weaknesses (Red)

Combine to find what’s most valuable to you (Purple)

Page 21: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Purple Teams

Not necessarily just the red and blue teams

requires a total picture involving all areas of the organization

Page 22: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

From this

Page 23: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

To this

Page 24: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

The Goal

Create scenarios

Identify how you would protect yourself

Test the scenario

Test your environment

Page 25: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Proactive Protection

1. Threat Modeling – Bi-weekly

2. Tabletop exercises – Monthly

3. Red Team exercises – Quarterly

4. Red Team Assessments – Yearly

Page 26: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Our Infrastructure

Page 27: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Threat modeling

Least amount of T/E

One model bi-weekly

Build portfolio of potential attacks

Page 28: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Choosing a model

SDLC threat model-Microsoft

Cyber Kill Chains of Doom ™-Lockheed Martin (r), (tm), (etc)

Attack Paths-#misec

Page 29: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

@jwgoerlich

Attack path

Page 30: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Start with why

TED TalkSimon Sinek: How great leaders inspire

action

WhyHowWhat

Page 31: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Why?

Why this model?FreeOpenI’m biased (#misec)

Why will $badguy target us (the ONE thing)$client0 – Access control systems$client1 – Sensitive financial data

Page 32: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Do what is right for you.But do something.

Page 33: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

How?

How will the attacker realize their Objective?

-Attack path $badguy took through network

Page 34: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

What?

What can we do to prevent this attack?-Document controls

What can we do to be ready?-Develop test cases

Page 35: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Attack Paths

1. External reconnaissance2. Initial breach3. Escalate privileges4. Persistence5. Internal reconnaissance6. Lateral breach7. Maintain presence8. Achieve objective

Page 36: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Initial generation

Start with step 8

Identify ONE thing

Work backwards

Page 37: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

A blank slate

Page 38: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Attack Path

Page 39: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Attack PathGoal: Obtain sensitive, proprietary information1. External Reconnaissance

– Attacker will perform OSINT on the company to identify targets

2. Initial Breach– Attacker will have a specially crafted site for user to access containing

either an infected document or a place for entry of credentials

3. Escalate Privileges– Attacker will attempt to add specially crafted user to group / recover

hashes through trust relationships/responder

4. Persistence– Attacker will attempt to maintain his or her presence by installing malware

5. Internal reconnaissance– Attacker will attempt to enumerate the internal infrastructure in an

attempt to identify more targets that will lead him or her to their goal

8. Achieve Objective– The attacker dumps the data and exfiltrates it via cloud service

Page 40: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Tabletop

Page 41: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Tabletop

Slightly more expensive than modeling.

Using more likely of two models, stake holders gather

Should be performed monthly

Page 42: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Tabletop Exercise

Started with table

Gathered $client1’s stake holders

Went over attack path used at $client0

Went over potential responses

Page 43: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

As simple as SMTP

Email was sent out to $client0

User credentials were compromised

No detection

Allowed total compromise

Page 44: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013
Page 45: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Results

There were no proactive detective capabilities

1 preventative control

Page 46: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Results

Page 47: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Corrective Actions

Security Onion installed, configured, and analyzed

VM program re-configured

Page 48: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Exercises

Page 49: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Example

Persistence-Stage 4-Tested ability to connect out and ability to detect-minimal risk to infrastructure

Page 50: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Exercises

More expensive than tabletop

Use most likely of three scenarios

Should be performed quarterly

Page 51: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client0:Stage 1 – External Recon

OSINT was used to enumerate the following information about $client0

-email addresses

-travel agency

-key players

Page 52: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Stage 1 – External Recon

In order to save time, we assumed failure at this level

Assumed email was sent and opened

Page 53: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client0:Stage 2 – Initial Breach

Email sent out, directed to fake login page

Credentials recordedto database

Credentials used to access VPN

Page 54: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Stage 2 – Initial Breach

Visited unique URL on test box

User was able to rdp into box

Having local admin, was able to create other user

Page 55: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client0:Stage 3 – Escalate Privileges

Escalation unneeded

User had sufficient privileges to achieve objective

Page 56: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Stage 3 – Escalate Privileges

Assumed failure at this point in interest of time

Multiple exploitation methods assumed to work

Remediation currently in works to create a Kerberos-only environment

Page 57: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Client0:Stage 4 - Persistence

Installed multiple Core agents

Used this to obfuscate origin

Page 58: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Client1:Stage 4 - Persistence

Showed ability to install software

In this case, we will installed zenmap

Used this to enable stage 5 testing

Page 59: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client0:Stage 5 – Internal Recon

Very little protection

Enumeration was caught by SIEM using flows

No followup

Page 60: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Stage 5 – Internal Recon

Attempted to scan internal hosts

Looking for file shares or other repositories

Showed ability to enumerate network

Page 61: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client0:Stage 8 – Achieve Objective

Goal: Persistent access to critical control systems

Access was obtained

Length of engagement: 21 days

Length of time in network: 21 days

Page 62: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Stage 8 – Achieve Objective

Goal: Ability to exfiltrate data through cloud service

Cloud services we successfully reached and test data uploaded

Page 63: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Results

Page 64: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Corrective Actions

purchased, configured, and analyze Qradar

Integrate Qualys into ticketing system

Implement Kerberos-only forest

Block access to cloud storage

Page 65: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

$client1:Corrective Actions

Page 66: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Assessments

Page 67: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Assessment

Most expensive

Create targeted scenarios to test

Avoid arp-cache poison story

Sexy

Page 68: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Building Your Program

Page 69: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Where to Start

GrrCon 2013:Scott Thomas(@secureholio): 50 Shades of Purple (teaming): Getting Penetration

Testing into a Conservative Company

Page 70: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Where to Start

Start with threat intelligence

Move to threat models

Get buy in from management

Steve Fox’s Communication planFollow @securelexicon on twitter

Page 71: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Communication

RelevantDistinctCredibleBenefit-DrivenAligned with strategy

Additional reading(http://imgur.com/a/fPLnM)

Page 72: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013
Page 73: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Do what is right for you.But do something.

Page 74: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013
Page 75: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Resources

Freenode-#misec#ladosanostra

People-J Wolfgang Goerlich (@jwgoerlich) – Business strategySteven Fox (@securelexicon) – CommunicationScott Thomas (@secureholio) – Process

Links-http://imgur.com/a/fPLnM (Pixar)

Page 76: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

Resources

Look for Attack Paths to be published out of #misec soon

Page 77: Seeing Purple: Hybrid Security Teams for the Enterprise - BSides Jackson 2013

#ladosanostra@LaDoSaNostra