Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open...

50
Incident Response for Targeted attacks Jose Ramon Palanco

Transcript of Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open...

Page 1: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Incident Response for Targeted attacks

Jose Ramon Palanco

Page 2: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

about:

Jose Ramon PalancoFrom SpainSecurity Researcher+10 years experience

Page 3: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SOC: What does SOC stand for?

A security operations center (SOC) is a centralized unit that deals with security issues on an organizational and technical level. A SOC within a building or facility is a central location from where staff supervises the site, using data processing technology.

Page 4: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SOC

Page 5: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SOC Organization

● SOC Manager● Intelligence Team Leader● Operations Team Leader● Tier 3 / Security Engineer● Tier 2● Tier 1

Page 6: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SOC Incident types

● Denial of Service● Unauthorized access● Vulnerability identification● Hacker activity● Data loss● Malicious software activity

Page 7: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SOC Tools

● Endpoint Security (Antivirus/DLP/..)● Network Security (IDS/IPS/Firewalls/..)● Malware Sandbox● SIEM● Ticketing system

Page 8: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SOC Methodolody

DataFlow: logs > events > alerts > incidents

WorkFlow: incident > ticket > analysis/scale

Page 9: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SIEM

● Security Information and Event Manager● Sometimes SIM or SEM● SIEM is not just Log Management

Page 10: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SIEM

● Relevant log collection● Aggregation● Normalization● Retention Analysis (correlation &

prioritization)● Presentation (Reporting & Visualization)● Workflow

Page 11: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SIEM: logs

Aug 18 20:22:31 server sshd[1891]: error: PAM: authentication error for root from localhost via 127.0.0.1

Page 12: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SIEM: logs

Date: Aug 18 20:22:31Server: server Service/Process: sshd[1891]: Error: PAM Authentication error for root from localhost Details: via 127.0.0.1

Page 13: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

SIEM: Event Correlation Rules

● Repetition Rules● Combination Rules● Missing Recurrence Rules

Page 14: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight

ArcSight Enterprise Security Manager (ESM)ArcSight ExpressArcSight Logger

Page 15: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight

Page 16: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight: CEF

The Common Event Format (CEF) is an open log management standard.

It supports over 275 products across more than 35 solution categories.

Page 17: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight: CEF

CEF:0|Trend Micro Inc.|OSSEC HIDS|v2.5.1|5302|\ User missed the password to change UID to root.|9|dvc=ubuntusvr \ cs2=ubuntusvr->/var/log/auth.log cs2Label=Location src= suser=root \ msg=May 11 21:16:05 ubuntusvr su[24120]: - /dev/pts/1 xavier:root

Page 18: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight: Smart Connectors

SmartConnectors provides source-optimized collection for leading security commercial products:● Operating Systems, Apps, ..● Antivirus, DLP, ..● Firewalls, IPS, IDS, ..● ...

Page 19: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight: Logger

● Collect logs● Unify the data into CEF● Search through millions of events● Store years' worth of logs and events● Automate analysis, alerting, reporting,

intelligence of logs and events for IT security, IT operations, IT GRC and log analytics

Page 20: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight: Manager (ESM)

● A cost-effective solution for all your regulatory compliance needs

● Automated log collection and archiving● Fraud detection● Real-time threat detection● Forensic analysis capabilities for

cybersecurity

Page 21: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Arcsight ESM Console

Page 22: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Alienvault OSSIM

● Open Source SIEM (GPL)● Version 5.0 released on April 20, 2015● Based on third party Open Source projects

Page 23: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Alienvault OSSIM

Page 24: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Alienvault OSSIM Components

● PRADS: passive identification of hosts● OpenVAS: vulnerability scanner● Snort/Suricata: IDS/IPS● Tcptrack: session data information● Nagios: monitoring● OSSEC: HIDS● FProbe, NFSen/NFDump: NetFlow Analysis

Page 25: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Reversing

Is the study of a malware by dissecting its different components and studying its behavior on the host computer's operating system.

Page 26: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Reversing: Static Analysis

● Strings● Yara rules● IAT/imphash● IDA Pro● UPX, Bytehist, Density Scout, PackerID● Signsrch, pescanner, ExeScan, pev,

Peframe, pedump

Page 27: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Reversing: IDA Pro

Page 28: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Reversing: Dynamic Analysis

● OllyDBG● WinDBG● Cuckoo Sandbox

Page 29: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Reversing: OllyDBG

Page 30: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

IoC

Indicator of compromise (IOC) are artifacts observed on a network or in an operating system that with high confidence indicates a computer intrusion (ip, hash, ip, host, ..)

Standards: openioc, stix, snort, yara

Page 31: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

OpenIOC

Page 33: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Snort

● Snort is a free and open source IDS● Considered the de facto standard● Modes:

○ Sniffer○ Packet logger○ Network intrusion detection

Page 34: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Snort rule

Page 35: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Suricata

Suricata is a snort compatible IDS.Main features:● Multi-threading ● Lua scripting● GPU (Graphics card) acceleration● HTTP log module● Fast IP matching

Page 36: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Yara

“YARA is to files what Snort is to network traffic.” -- Victor Manuel Alvarez, Yara Developer

Page 37: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Yara

With YARA you can create rules of malware families based on textual or binary patterns.

Each rule, consists of a set of strings and a boolean expression which determine its logic.

Page 38: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Yara rule

Page 39: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

ELK

● Elasticsearch for deep search and data analytics

● Logstash for centralized logging, log enrichment and parsing

● Kibana for powerful and beautiful data visualizations

Page 40: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

ELK

Page 41: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Cuckoo Sandbox

● Native functions and Windows API calls traces

● Copies/created/deleted files from the filesystem

● Dump of the memory of the selected process● Full memory dump of the analysis machine● Screenshots ● Network dump

Page 42: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Cuckoo sandbox

Page 43: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

El Jefe

EL JEFE is a Free situational awareness tool for securing organizations by making locating and responding to advanced threats by looking at what processes are started on your machine, and gathering that data for your entire Enterprise in a database.

Page 44: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

El Jefe

Page 45: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

GRR

● GRR is an Incident Response Framework focused on Remote Live Forensics.

● The disk and file system analysis capabilities are provided by the sleuthkit and pytsk projects.

● The memory analysis and acquisition capabilities are provided by the rekall project.

Page 46: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

GRR

Page 47: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Virustotal

VirusTotal is a website, originally developed by Hispasec, that provides free checking of files for viruses. It uses up to 54 different antivirus products and scan engines to check for viruses that the user's own antivirus solution may have missed, or to verify against any false positives.

Page 48: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

Dinoflux

● IoC in different formats○ snort○ suricata○ arcsight

● Cyber Intelligence Database○ hash○ ip/host○ history

Page 49: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

APT

An advanced persistent threat (APT) is a set of stealthy and continuous computer hacking processes, often orchestrated by human(s) targeting a specific entity. APT usually targets organizations and/or nations for business or political motives.

Page 50: Incident Response for Targeted attacks 9/Talks/ROOTCON 9 - Incident... · Alienvault OSSIM Open Source SIEM (GPL) Version 5.0 released on April 20, 2015 Based on third party Open

HAVEX: A targeted attack

1. Received suspicious file2. Executed inside cuckoo with SCADA tools3. Report reveals OPC communications4. Perform Dynamic/Static analysis5. Report