SecureSet WarGames - Logging and Packet Capture Training

60

Transcript of SecureSet WarGames - Logging and Packet Capture Training

Page 1: SecureSet WarGames - Logging and Packet Capture Training
Page 2: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Active Defense

PCAP and Log Detection Techniques

Instructor: Greg FossDecember 08, 2015

Page 3: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

# whoami

[email protected]

@heinzarelli

Security Operations Team Lead

Sr. Security Research Engineer

OSCP, GAWN, GPEN, GCIH, CEH, Cyber APT

Page 4: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 5: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Logging and Packet Capture…

Page 6: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Why this content matters

You already have everything you need for security monitoring within your corporate infrastructure.

Logging and Packet Capture are the cornerstones to incident response and cyber investigations.

Detailed evidence that can help to show what exactly happened within an environment.

Valuable to Operations and Security alike

Page 7: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

How it fits into cybersecurity

Every single computer investigation can be aided by supporting log and packet capture data.

If you ever want to work on an incident response team or help monitor the security of an organization, you must have an understand logging, packet capture analysis and event correlation.

Page 8: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

What you should learn tonight

Introduction to Logging and Log Management

Actively Detecting Attacks Using Log Data

Introduction to Packet Capture and Net Flow

Packet Dissection and Data Exfiltration Detection

Packet Capture Challenge!

http://omg.endoftheinternet.org/

Page 9: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Why I love this industry

Page 10: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Breaking into computers for a living!

Page 11: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

It’s also fun to go hunting…

Page 12: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

TITLE

Page 13: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Logging

Page 14: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

What are ‘Logs’…

“A record of performance, events,or day-to-day activities”

Merriam Webster, 2015

Page 15: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Log Data = Log Message Meaning

Informational – Generally benign events

Debug – Software development

Warning – Dependencies may be absent

Error – Indication that something is not right

Alert – Often security related. Highlight interesting info

Logging and Log Management, 2012

Page 16: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Log Formats

Flat File

Database

CSV

Linux Syslog

Generic Syslog

Windows System, Event, Security, etc…

Page 17: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Standard Logging Locations

Linux

/var/log/

Windows

Event Viewer

Page 18: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Log Management

Store the logs in a centralized location

Replicating logs across to a log management system

Back up the logs to ensure integrity of the data and maintain compliance standards

Page 19: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Log Parsing (Normalization)

To gain value from your SIEM, data must be normalized

Varies depending on the log management solution

Regular Expressions

Data Categorization

Common Event Generation

General Classification

Page 20: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Endpoint Monitoring

User Activity

File Integrity and Hashing

Processes Details

Network Connections

Registry Modification

Document and/or Web Bug Tracking

Page 21: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Event Correlation

Leveraging actionable metadata allows you to understand the full picture.

Key when attempting to reconstruct a scenario

Page 22: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Security Information Event Management

Bringing it all together

Dashboards

Automated Alerting

Automated Response

Central Log Storage

Enterprise Correlation

Page 23: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

SIEM Tools

Commercial LogRhythm

Splunk

Open Source Logstash and

Kibana

Graylog

Page 24: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Advanced Logging

PowerShell

Command Line Logging

Extracting Logs using PowerShell PS C:\> Get-EventLog Security

Honeypot Event Correlation

TTY Log Replay

Web Bugs

Open Source Document Tracking and Event Correlation

Page 25: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

DEMO

Page 26: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 27: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

TITLE

Page 28: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Packet Capture (PCAP)

Page 29: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 30: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 31: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

OSI Model Complete record of network activity : Layers 2-7

Page 32: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Transport Layer Protocols

Transmission Control Protocol (TCP)

Stateful – HTTP, SSH, SMTP, etc.

Used to establish interactive sessions

User Datagram Protocol (UDP)

Stateless / Connectionless transmission model

Easy to spoof origin

No delivery guarantee

Can be used to exfiltrate data via DNS

Page 33: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

How To Capture Network Traffic

Local

Using tcpdump, Wireshark, NetworkMiner, Ettercap, etc.

In-Line Device

Often commercial but there are free tools as well.

Mirror off Firewalls

Split datapassed through firewalls and push to appliance.

Offensive – MiTM, Arp Poisoning, Evil Twin, etc.

Page 34: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Packet Capture Appliances

LogRhythm Network Monitor Freemium Version – https://support.logrhythm.com

FireEye PX Series

NetScout

NetWitness

Riverbed

Etc.

Page 35: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Network Tap

A network Tap can be as simple as a hub. Hubs allow you to see all data transmitted, as opposed to switches.

Raspberry Pi

Beaglebone Black

LAN Turtle

Wi-Fi Pineapple

Page 36: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Capturing Network Traffic

Simple Network

Many Options

Page 37: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Capturing Network Traffic Basic Network, Multiple VLANs

Page 38: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Offensive Network Capture

ARP Poisoning

Convince host that our MAC is the router, traffic begans to pass through our system.

Evil Twin Wi-Fi Attacks

https://www.youtube.com/watch?v=86bvUV92Ek8

We’ll talk about this more soon…

Attack Switches, Routers, Gateways, etc.

Page 39: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Sniffing Packets

Many protocols are in plain text

Easy to understand and dissect

HTTP, DNS, FTP, Telnet, SMTP, etc.

TLS is becoming more prevalent

Making traffic inspection more difficult

HTTPS, SSH, SFTP, FTPS, etc.

Malware often uses encrypted tunnels

Page 40: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Viewing Encrypted Packets SSL Interception Proxies

Source: https://logrhythm.com/blog/network-monitor-and-ssl-proxy-integration/

Page 41: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Offensive MiTM Against TLS / SSL

SSLStrip – Older but still works

https://github.com/moxie0/sslstrip

SSLSplit – Transparent TLS/SSL Interception Proxy

Terminates one session then creates its own

https://github.com/droe/sslsplit

NetRipper – Windows API Hooking

https://github.com/NytroRST/NetRipper

Page 42: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Attacking Users – A Case Study

Page 43: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Evil Twin

Page 44: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Evil Twin

source: http://www.breakthesecurity.com/2014/04/evil-twin-attack-fake-wifi-hack.html

Page 45: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 46: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 47: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 48: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 49: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

DEMO

Page 50: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

We’ve only just scratched the surface…

Page 51: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Want To Learn More and Practice?

http://www.netresec.com/?page=PcapFiles

Publicly Available PCAP Files

http://malware-traffic-analysis.net/

PCAP Files and Malware Samples

https://www.vthreat.com/

Simulate threats, data exfiltration, etc.

VirusTotal Professional

Page 52: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

PCAP Challenge

Page 53: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Page 54: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

UsingLog Datato TrackWinners

Page 55: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

References Chuvakin, Anton, and Kevin Schmidt. Logging and

Log Management: The Authoritative Guide to Dealing with Syslog, Audit Logs, Events, Alerts and Other IT 'noise' Rockland, MA: Syngress, 2012. Print.

Bejtlich, Richard. The Tao of Network Security Monitoring: Beyond Intrusion Detection. Boston: Addison-Wesley, 2005. Print.

Page 56: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

CLOSING

Careers in this area of security

The work – LogRhythm is hiring!

The rewards – Great benefits!

How to pursue

https://logrhythm.com/about/careers/

[email protected]

Page 57: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Provides aspiring security talent with a powerful & direct path into cybersecurity

“Career Promise”

www.secureset.com/academy

Next Denver session: January 2016

Page 58: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

Did you know?More than 209,000 cybersecurity jobs

in the US are unfilled.*

* www.peninsulapress.com/2015

Page 59: SecureSet WarGames - Logging and Packet Capture Training

©2015 SecureSet, LLC

wargames.secureset.com

[email protected]

Secure your future in Cyber!SecureSet Academy Starts January 2016

Page 60: SecureSet WarGames - Logging and Packet Capture Training