how to make my life harder and your life …...make the attacker's life harder make it easier...

22
DIRTY DEFENSE DONE DIRT CHEAP HOW TO MAKE MY LIFE HARDER AND YOUR LIFE EASIER Tim Medin @ TimMedin [email protected] @ RedSiege http:/ /redsiege.com/slides

Upload: others

Post on 13-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

DIRTY DEFENSEDONE DIRT CHEAPHOW TO MAKE MY LIFE HARDER

AND YOUR LIFE EASIER

Tim Medin@[email protected]

@RedSiegehttp://redsiege.com/slides

Page 2: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

TIM MEDIN

Principal Consultant, Founder – Red Siege

SANS Author – 560

SANS Instructor – 560, 660

sans.org/instructors/tim-medin

IANS Faculty

SANS MSISE Program Director

Pen Tester for more than a decade2

Page 3: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

SMALL (CHEAP)

CHANGES

BIG IMPACT

You don't have to spend piles of money

to make things harder for attackers

Simple changes make people like me

swear (a lot)

redsiege.com 3

Page 4: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

DIRTY CHEAP DEFENSE

Minimal impact to production

Relatively simple to implement

Make the attacker's life harder

Make it easier to detect the attacker

Not perfect (but nothing is)

redsiege.com 4

Page 5: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

DOES NOT INCLUDE

• Turn off all the computers

• Drop every other packet

• Set the building on fire

• Move to sales

Page 6: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

FOCUS ON COMMON TTPs

How is an attacker going to move

How is the attacker going to exfil

What is the attacker going to look for

Defense needs to understand offensive principles

Defense doesn't exist in a vacuum

redsiege.com 6

Page 7: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

BASIC ATTACK STRATEGY

Goal: find and exfil important data

Initial access

Persistence

Escalate

Find data

Exfilredsiege.com 7

Page 8: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

LATERAL MOVEMENT

Page 9: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

445 BLOCKS

Attackers often need to move on the network to access important data or to escalate so they can access the data

Level 1: Block inbound 445 on all end-user systems except from IT network – Easy, minimal production impact

Level 2: Block 445 to all servers that don't need (DC and file servers do) – Moderate ease, requires testing

Level 3: Alert on any of the above access – No prod impact

redsiege.com 9

Page 10: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

DISABLE LLMNR & WPAD

Your systems aren't using LLMNR

Disable: https://www.blackhillsinfosec.com/how-to-disable-llmnr-why-you-want-to/

WPAD

If you aren't using it, create a DNS entry and set it to 0.0.0.0

redsiege.com 10

Page 11: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

HONEY THINGS

Leave things around for attackers

Make them look juicy

Use common protocols and network locations

Alert on these

Protection is nice, but detection is key (and often missed)

redsiege.com 11

Page 12: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

HONEY TOKENS

You can't (and shouldn't) disable Kerberos

Attackers will grab tickets for Kerberoastable accounts

Tickets are encrypted using the service account's password hash

Service is mapped to account so DC can encrypt

redsiege.com 12

Page 13: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

CREATE HONEY TOKENS

Create a service account (with a really long password)

Create a juicy looking SPN (Bonus: Add to Domain Admins)

Alert on ANY access to this SPN

Look for Event ID 4769 and the account name matching your service account

Very easy. No production impact.

redsiege.com 13

Page 14: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

HONEY GPP

Group Policy can be used to updated passwords on systems

GPP is deprecated, but the settings often still exist

Create account (with a great password)

Populate GPP with a bogus password

Set lockout threshold to one

Alert on lockoutredsiege.com 14

Page 15: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

GPPDecption

Mike Saunders wrote a blog on the subject

redsiege.com/gpp

He also wrote a tool for it

https://github.com/hardwaterhacker/GPPDeception

Very easy, zero production impact

redsiege.com 15

Page 16: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

LOGON RESTRICTIONS

Set service accounts to only logon to specific systems

Disable interactive login

Deny access over the network

You could hand the attacker creds, but they are unusable

Moderate ease, minimal testingImages from https://ravingroo.com/267/active-directory-user-workstation-logon-restriction/

16

Page 17: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

FINDING DATA

Page 18: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

ATTACKERS ONLY PIVOT

IF THEY MUST

If an attacker has access to the data when they "land", there is no reason to pivot

Attacker lands on …

Engineering workstation and the user has access to the schematics

Accounting system and the user has access to financials

Customer service system and the user has access to credit card entry

Remember: The attacker doesn't need all the data

redsiege.com 18

Page 19: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

POWERVIEW

PowerView "is a PowerShell tool to gain network situational awareness on Windows domains." https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1

Note: This is the dev branch and it contains important updates

• Find shares with Find-InterestingDomainShareFile• Test access as a regular user and add –CheckAccess• By default it will look…• Across all systems• all shares• For files named *password*, *sensitive*, *admin*, *login*,

*secret*, unattend*.xml, *.vmdk, *creds*, *credential*, *.configredsiege.com 19

Page 20: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

HONEY SHARES

Setup a server with a juicy name and juicy shares

No one should be accessing this system

When accessed, alert and follow up

Easy setup, zero production impact

redsiege.com 20

Page 21: HOW TO MAKE MY LIFE HARDER AND YOUR LIFE …...Make the attacker's life harder Make it easier to detect the attacker Not perfect (but nothing is) redsiege.com 4 DOES NOT INCLUDE •Turn

DEFENSES CAN BE SIMPLE

Each change makes life for the attacker a little bit harder

This could stop the attacker cold (great!)

It could also make an attacker second guess their movement, which increases dwell time

redsiege.com 21