security onion conference - 2016

23
Uncovering Persistence With Autoruns & Security Onion #SOCAugusta @DefensiveDepth

Upload: defensivedepth

Post on 13-Jan-2017

622 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Security Onion Conference - 2016

Uncovering Persistence With Autoruns & Security Onion

#SOCAugusta@DefensiveDepth

Page 2: Security Onion Conference - 2016

Autorunslive.sysinternals.com

Boot execute. / Appinit DLLs. / Explorer addons.

Sidebar gadgets (Vista and higher)

Image hijacks.

Internet Explorer addons. / Known DLLs.

Logon startups. / WMI entries.

Winsock protocol and network providers.

Page 3: Security Onion Conference - 2016

HijacksImage hijacks at the time of log

generationELSA Query: groupby:path - Closely review any entries

Page 4: Security Onion Conference - 2016

GoalsImplementation

Real-World Use

Page 5: Security Onion Conference - 2016

“Pertinax”Latin: “Persistent, Stubborn”

Reference Architecture

Page 6: Security Onion Conference - 2016

1) Generate

1) Tab-delimited CSV option

autorunsc -ct

2) Verify Signatures

autorunsc -s

3) Logfile is named with the hostname or IP

Address of the source system

“DD-HR” is the name of the log for the system DD-

HR

Page 7: Security Onion Conference - 2016

2) Collectfor /f %%a in (host-list.txt) do ( psexec -accepteula \\%%a -c autorunsc.exe -accepteula -a * -s -m -t -h -ct * > Logs\%%a.csv)

Page 8: Security Onion Conference - 2016

3) Normalize -Removal of autoruns’ header rows

-Addition of unique identifier to each message

-Addition of src hostname to each message

-Addition of runtime to each message

-Conversion to ASCII

-Replacement of TAB delimiter with a Pipe

Page 9: Security Onion Conference - 2016

4) Import & Parse

<localfile> <location>C:\Logs\ar-normalized.log</location> <log_format>syslog</log_format></localfile>

ELSA Pattern & OSSEC Decoder

-Hostname, DD-HR

-Category, Logon

-Entry, Skype

-Profile, DD-HR\admin

-Company, Skype Technologies

-Path, C:\program files\.....\Skype.exe

- Signer / Version / Launch String / Hashes

Page 10: Security Onion Conference - 2016

5) View

Page 11: Security Onion Conference - 2016

Real-World Use(Daily)

Page 12: Security Onion Conference - 2016

Diff

200 entries x 50 hosts = 10,000 entries/day to review

Vs.

Few Hundred

Page 13: Security Onion Conference - 2016

Clients Servers

Page 14: Security Onion Conference - 2016

ELSA Queriesgithub.com/defensivedepth/Pertinax/wiki/Persistence-

Categories Stacking

Page 15: Security Onion Conference - 2016

DriversAll non-disabled drivers at the time of log

generation

ELSA Queries:

groupby:path -system32 -syswow64

groupby:company (Look for unsigned drivers)

Page 16: Security Onion Conference - 2016

LogonCommon Startup areas: Run & RunOnce

keys, Start Menu

ELSA Queries:

groupby:path, +users - Stack

groupby:company - Stack

Page 17: Security Onion Conference - 2016

Internet Explorer

IE Addons at the time of log generation

ELSA Queries:

groupby:path - Stack

Page 18: Security Onion Conference - 2016

ExplorerShell extensions, addons, etc

ELSA Queries:

groupby:path - Stack

Page 19: Security Onion Conference - 2016

TasksAll registered tasks on the system

ELSA Queries:

groupby:path - Stack

Page 20: Security Onion Conference - 2016

ServicesAll Autostart services on the system

ELSA Queries:

groupby:path - Show all results outside of the System32 Folder - Stack

groupby:company - Stack

Page 21: Security Onion Conference - 2016

Codecs

Other Autoruns’ CategoriesNetwork

Providers

Winlogon

LSA Providers

KnownDLL

Print MonitorsBoot

Execute WMI

Office Addins

Page 22: Security Onion Conference - 2016

Wrap-Up

Future Possiblities: -Virus Total Integration-OSSEC Rulesets

Page 23: Security Onion Conference - 2016

Questions?@DefensiveDepth

github.com/defensivedepth/Pertinax