@mrgcastle greg castle - storage.googleapis.com · who am i grr developer, google ir team os x...

34
Greg Castle @mrgcastle

Upload: phamkhanh

Post on 05-Apr-2018

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Greg Castle@mrgcastle

Page 2: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Who am I

GRR Developer, Google IR teamOS X SecurityFormer lives: pentesting, IR, security audits etc.

Page 3: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Live forensics

Page 4: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

GET /beacon HTTP/1.1Host: evil.com

from Joe’s machine

Page 5: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc
Page 6: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Joe is on vacation with 3G internet

GET /beacon HTTP/1.1Host: evil.com

Page 7: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

New APT Report

Page 8: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc
Page 9: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

New malware report BEAR EAGLE SHARK

LASER is out: check all the things

Page 10: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

New malware report BEAR EAGLE SHARK

LASER is out: check all the things

50+ IOCs for Win/Mac and “all the things” is the machines of a highly mobile global

organisation with 50k+ employees

Page 11: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

GRR: GRR Rapid ResponseOpen source live forensicsAgent -> Internet -> ServerDisk Forensics = SleuthkitMemory Forensics = RekallScalableStable, low-impact clientFull-time devs

Page 12: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Why build?

Customize for our threats/detection/defense50 people analyzing 50 machinesMove as fast or faster than the attackerSupport Mac/Win/Linux

Page 13: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc
Page 14: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc
Page 15: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Clients

Stable, robust, low impactMonitoredLimited10min poll

Page 16: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Smart Server, basic client

Time travel backwardsFaster build/fix/deployLess updatingSimpler backwards compatibilityLeak less intent

Page 17: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Server

Frontends pass messagesWorkers do the real workEverything is asynchronousQueue work on the server

Page 18: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Datastore

Abstracted: easy to switchMySQL (x2) | MongoDB | SQLite (sharded)Versioned Data -> axis of time

Page 19: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Demo

Page 20: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc
Page 21: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Authorization, Auditing

2-party authorization for machine accessDB loggingAudit eventsApproval emails with justifications

Page 22: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Fast, reliable, remote.

Advanced live forensics at scale.

Page 23: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Filesystem/Registry artifacts (Sleuthkit)Memory artifacts (Rekall)From difficult-to-specify locations

Be really really good at collecting

Page 24: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

SANS: “a combination of description, location, and

interpretation”

Page 25: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

I prefer“that stuff I want”

Page 26: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

As seen in the wildHardDrive\Documents and Settings\USERNAME\Local Settings\Application Data\Google\Chrome\User Data\Default\History

HKU\S-1-5-21-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox\InstallLocation

/Users/<user>/Library/Mail Downloads/

/home/user/.local/share/Trash/

Page 27: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

What do I do with these?HardDrive\Documents and Settings\USERNAME\Local Settings\Application Data\Google\Chrome\User Data\Default\History

HKU\S-1-5-21-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox\InstallLocation

/Users/<user>/Library/Mail Downloads/

/home/user/.local/share/Trash/

Page 28: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Common language for interpolation%%users.localappdata%%\Google\Chrome\User Data\*\History

HKEY_USERS\%%users.sid%%\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox\InstallLocation

%%users.homedir%%/Library/Mail Downloads/

%%users.homedir%%/.local/share/Trash/

Page 29: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Artifactname: ApplicationEventLogdoc: Windows Application Event log.collectors:- collector_type: FILE args: {path_list: ['%%environ_systemroot%%\System32\winevt\Logs\AppEvent.evt']}conditions: [os_major_version >= 6]labels: [Logs]supported_os: [Windows]urls: ['http://www.forensicswiki.org/wiki/Windows_Event_Log_(EVT)']

Page 30: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Artifact repository: get it here

~100 artifacts: github.com/ForensicArtifacts/artifactsIndependent and reusable by any toolUsed and maintained by usReview, bug reports, patches very welcome

Page 31: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Exporting data for analysis

Heavy data analysis outside GRRHTTP RPC APIsExport plugin system: CSV <elasticsearch or your plugin of choice here>

Page 32: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

What’s coming

Event triggered collectionC++ clientMore powerful artifact collection Client m’t: building, reporting, labelling ++

Page 33: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

Great, how do I try it?

● Get a 64bit ubuntu machine● Run the quickstart script from github.

com/google/grr● Open a browser● Download and install the client on a machine

Page 34: @mrgcastle Greg Castle - storage.googleapis.com · Who am I GRR Developer, Google IR team OS X Security Former lives: pentesting, IR, security audits etc

GRR (and friends) links

github.com/google/grrgithub.com/ForensicArtifacts/artifactsrekall-forensic.complaso.kiddaland.net/github.com/google/timesketchgithub.com/libyal/libyal/wiki/Overview