Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ......

34
© 2014 The MITRE Corporation. ALL RIGHTS RESERVED. Michael Kemmerer Cybersecurity Engineer, The MITRE Corporation Approved for Public Release; Distribution Unlimited. Case Number 14-2948 Discovering Threats by Monitoring Behaviors on Endpoints

Transcript of Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ......

Page 1: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

M i c h a e l K e m m e r e r C y b e r s e c u r i t y E n g i n e e r , T h e M I T R E C o r p o r a t i o n

Approved for Public Release; Distribution Unlimited. Case Number 14-2948

Discovering Threats by Monitoring Behaviors on Endpoints

Page 2: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 2 |

Introduction – Michael Kemmerer

§ Work –  Senior Cybersecurity Engineer at The MITRE Corporation –  EIC - network and endpoint sensor integration and analytic platform development

§ Splunk – Deployed 3 distributed Splunk instances – Developed numerous custom Splunk apps – Co-authored technical guidance on deploying Splunk for a US Government Agency

§ Education – M.S. in Engineering Management, Cybersecurity focus from UMBC –  B.S. in Electrical Engineering from Lehigh University.

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 3: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

| 3 |

T h e P r o b l e m

Adversaries on Endpoints

Page 4: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 4 |

The Problem– Adversaries Blend In

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Adversaries, post-exploit, can look very similar to normal users1

Advanced adversaries are on the network an average of 243 days before being detected3

Adversaries hide or masquerade their tools to blend in to the operating environment

Photo Credits to Habib M’henni

Commonly used tools often look for the exploit or compliance and aren’t very effective at finding the operating adversary2

1 - Chan et al. Effect of Malicious Synchronization. National University of Singapore. http://www.comp.nus.edu.sg/~chanmc/papers/herd2.pdf 2 - Salem & Stolfo. Masquerade Attack Detection Using a Search-Behavior Modeling Approach. Columbia University. http://academiccommons.columbia.edu/download/fedora_content/download/ac:127675/CONTENT/cucs-027-09.pdf

3 - Mandiant, Threat Landscape, https://www.mandiant.com/threat-landscape/

Page 5: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 5 |

The Problem– Perimeter-Centric Defenses

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Adversary  

2.  Ini/al  access,  C2   Owned  

Worksta/on   Servers,  Worksta/ons  

Domain  Controller  

File  Server  

An/-­‐malware   Intrusion  Detec/on  System  (IDS)  Firewall  

An/-­‐malware  

Network  Monitoring  

The adversary uses legitimate means of communication through the infrastructure for command and control

Page 6: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 6 |

Technique Matrix

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Persistence   Privilege  Escala/on   Creden/al  Access   Host  Enumera/on   Defense  Evasion   Lateral  Movement   Command  and  Control   Exfiltra/on  

New  service   Exploita/on  of  vulnerability   Creden/al  dumping   Process  enumera/on   SoNware  packing   RDP   Common  protocol,  

follows  standard   Normal  C&C  channel  

Modify  exis/ng  service   Service  file  permissions  weakness   User  interac/on   Service  enumera/on   Masquerading   Windows  admin  shares  

(C$,  ADMIN$)  Common  protocol,  non-­‐

standard   Alternate  data  channel  

DLL  Proxying   Service  registry  permissions  weakness   Network  sniffing   Local  network  config   DLL  Injec/on   Windows  shared  

webroot  

Commonly  used  protocol  on  non-­‐standard  port  

Exfiltra/on  over  other  network  medium  

Hypervisor  Rookit   DLL  path  hijacking   Stored  file   Local  network  connec/ons   DLL  loading   Remote  vulnerability   Communica/ons  

encrypted  Exfiltra/on  over  physical  medium  

Winlogon  Helper  DLL   Path  intercep/on       Window  enumera/on   Standard  protocols   Logon  scripts   Communica/ons  are  obfuscated   Encrypted  separately  

Path  Intercep/on   Modifica/on  of  shortcuts       Account  enumera/on   Obfuscated  payload   Applica/on  

deployment  soNware  Distributed  

communica/ons   Compressed  separately  

Registry  run  keys  /  Startup  folder  addi/on  

Edi/ng  of  default  handlers       Group  enumera/on   Indicator  removal   Taint  shared  content   Mul/ple  protocols  

combined   Data  staged  

Modifica/on  of  shortcuts   Scheduled  task       Owner/user  

enumera/on   Indicator  blocking  Access  to  remote  services  with  valid  

creden/als       Automated  or  scripted  

data  exfiltra/on  

MBR  /  BIOS  rootkit   Legi/mate  Creden/als       Opera/ng  system  enumera/on       Pass  the  hash       Size  limits  

Edi/ng  of  default  handlers           Security  soNware  

enumera/on               Scheduled  transfer  

Scheduled  task           File  system  enumera/on                  

Source: ATT&CK™ Technique Matrix: The MITRE Corporation.

Page 7: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

| 7 |

T h e E x p e r i m e n t

Detecting the Adversary

Page 8: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 8 |

Our Experiment @ MITRE

MITRE is exploring methods to detect the cyber-adversary operating within the

enterprise network. Our experiment demonstrates that novel

end-point sensing can be used to detect the adversary operating on enterprise infrastructure.

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 9: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 9 |

Summary of the Experiment

§ Develops sensors and analytics that can detect advanced cyber-adversaries that aren’t detected by traditional tools

§ Conducts Cyber-Games to test our results

§  Is an experiment testing a sensing methodology that may lead to advances in cyber-incident detection

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 10: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 10 |

The experiment focuses on finding the adversary post exploit

Our Objective

Recon

Weaponize

Deliver

Exploit

Control

Execute

Maintain

Cyber Kill Chain: Intelligence-Driven Computer Network Defense by Eric Hutchins, Michael Cloppert and Dr. Rohan Amin - Lockheed Martin

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 11: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 11 |

We Have a Living Lab

Our entire site participates Corporate-owned computers

Environment of homogenous Windows desktops

Several users doing everything! (email, writing documents, coding, web surfing, etc.)

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 12: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

| 12 |

Endpoint Sensing

Aw a r e n e s s o f H o s t A c t i v i t y

Page 13: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 13 |

End-Point Awareness

Adversaries engage in similar behaviors as they execute their mission. Hyper-sensing of the desktop provides visibility into user behaviors We use a combination of COTS and custom sensors to monitor the desktop

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 14: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 14 |

Examples of Sensors

Host-based sensors §  Anti-Virus: McAfee, Symantec §  Process monitoring: Sysinternals Sysmon, whitelisting tools §  Network monitoring: tshark §  Multi-faceted: Event tracing for Windows, CarbonBlack, HIPS

Network sensors § Signature-based: IDS/IPS § Always-on: Netflows, PCAP

On-demand functions § Powershell Scripts

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 15: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 15 |

Process Monitoring Tool

Provides details on processes

Process chains provide context around system activity.

Outlook.exe PID:5938

Acrobat.exe PID:6035

cmd.exe PID:6036

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Outlook.exe PID:5938

Acrobat.exe PID:6032

Chrome.exe PID:6034

Explorer.exe PID:345

cmd.exe PID:4922

Page 16: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 16 |

Host-Based Network Sensor

§  Process initiating connection §  PID, PPID

Pivot Point Between Host and Network Data

Metadata on Network Connections

§  IP Addresses §  Ports §  Protocol information §  Message contents

Profile process behavior identify covert channels

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 17: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 17 |

Analytics – Advancing the State of the Art

Analytics based on publicly available tools, techniques, and procedures (TTP)

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 18: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 18 |

Analytics – Sharing Means Caring

Tested, shareable analytics that are effective at finding adversary behavior are the output of the project.

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 19: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 19 |

Cyber Games – Testing the Capabilities

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Testing our sensing capabilities and analytics using a collection of TTPs

Multiple games run throughout the year

Cyber Games documents include analytic successes and failures for internal review

Page 20: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 20 |

What questions do we want

to ask?

Sensor Development

(maybe)

Analytic Development

Red Team Testing

Blue Team

What did we miss?

Analytic Development Cycle

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 21: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 21 |

Multiple Users on a

Workstation?

Sensor Used: McAfee Agent

Development

Operation Conducted

Analysis

Worked… One User on Multiple

Systems

Cyber Games Drive the Cycle and Analytic Improvement

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 22: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

| 22 |

What Can I Do Right Now?

B y m a k i n g s m a l l c h a n g e s t o y o u r c o n f i g u r a t i o n , y o u c a n b e g i n s e e i n g m o r e d e t a i l s

Page 23: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 23 |

Monitoring for Credential Theft

Credential dumping § Monitor c:\windows\system32\lsass.exe on 1 or 2 endpoints § Don’t block. Just see what programs are “touching” it § Observe over time § Begin to whitelist known programs (best if done by hash and/or signature information) § Continue to add programs to the whitelist or filter in Splunk

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 24: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 24 |

Monitoring for Credential Theft – Continued

Offline techniques § Monitor reading of the following registry locations:

–  hklm\sam –  hklm\security –  hklm\system

§ Saving of these locations can allow for offline retrieval of cached credentials (via secretsdump)

Reference: https://securusglobal.com/community/2013/12/20/dumping-windows-credentials/

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 25: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 25 |

Monitoring for Persistence

Files and Directories §  fschange (deprecated)

–  Tasks –  Start menu startup directory –  .ini files

Registry §  HKLM\System\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\StartupPrograms §  HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AppSetup §  Dozens more… Other Techniques §  Registry shell spawning §  Extension hiding §  Active-X components

Reference: http://bytes.com/topic/windows/insights/860759-windows-autorun-faqs-list-autostart-locations © 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 26: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 26 |

Monitoring for Persistence – Continued

Periodic and scripted scans § Sysinternals’ autorunsc.exe

– Run periodically and search for changes using Splunk § McAfee Asset Baseline Monitor (ABM)

– Monitor registry locations noted previously

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Page 27: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 27 |

Key TTPs To Be Aware Of

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Remote Desktop Custom Loader SSH Port Masquerade

SSH Forwarding

Domain Jumping

Process Renaming

Task Scheduling

Malicious Script Deployment Service Overwrite RDP + Graphical

Admin Tools

“Net use” Lateral Move Persistence Credential

Dumping Custom

Backdoor

Page 28: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 28 |

Lessons Learned

We continue to develop both analytics and new sensing abilities to better detect adversary behavior

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Our experiments validate that end-point sensing can be used to detect the cyber adversary

Some information types are starting to emerge as highly valuable

Page 29: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

| 29 |

M i c h a e l K e m m e r e r m k e m m e r e r @ m i t r e . o r g

Questions & Answers

Page 30: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED. 30

Security office hours: 11:00 AM – 2:00 PM @Room 103 Everyday

Geek out, share ideas with Enterprise Security developers Red Team / Blue Team - Challenge your skills and learn new tricks Mon-Wed: 3:00 PM – 6:00 PM @Splunk Community Lounge Thurs: 11:00 AM – 2:00 PM

Learn, share and hack

Birds of a feather- Collaborate and brainstorm with security ninjas Thurs: 12:00 PM – 1:00 PM @Meal Room

Page 31: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

| 31 |

Backup Slides

Page 32: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 32 |

Cyber Games – Red Team

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Sensor  Collec/on  Servers  

Red  Team  

Worksta/on  Worksta/on  

Server  Target  

TTP Emulation Analytic Outcome Focused

Page 33: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 33 |

Cyber Games – Blue Team

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Sensor  Collec/on  Servers  

Blue  Team  

Red  Team  

Worksta/on  Worksta/on  

Server  Target  

Verify Detection Develop Analytic, Sensor Ideas

Page 34: Discovering Threats by Monitoring Behaviors on Endpoints · National University of Singapore. ... command and control | 6 | ... Symantec ! Process monitoring: Sysinternals Sysmon,

| 34 |

Cyber Games – White Team

© 2014 The MITRE Corporation. ALL RIGHTS RESERVED.

Sensor  Collec/on  Servers  

Red  Team  

Worksta/on  Worksta/on  

Server  Target  

White  Team  

Blue  Team  

Develop Operation Plans Protect Environment