triaging suspicious artifacts
play

Triaging Suspicious Artifacts Securit y Risk Advisors, Inc. - PowerPoint PPT Presentation

Triaging Suspicious Artifacts Securit y Risk Advisors, Inc. Proprietary and Client Confidential About Us Jonas, GREM Security Risk Advisors (sra.io) Service lines: DFIR, CTA, A&E Clay (ttheveii0x), GREM Security Risk Advisors (sra.io)


  1. Triaging Suspicious Artifacts Securit y Risk Advisors, Inc. Proprietary and Client Confidential

  2. About Us Jonas, GREM Security Risk Advisors (sra.io) Service lines: DFIR, CTA, A&E Clay (ttheveii0x), GREM Security Risk Advisors (sra.io) Service/Project Lead: CTI, CTA, SOC Training Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  3. Topics • Overview o Why Do This o General Approach o Actionable Outputs • File Formats • Tools • Demos • Resources Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  4. Overview Securit y Risk Advisors, Inc. Proprietary and Client Confidential

  5. Overview • Why Do This o Enable SOC analysts o Assessment o Is the artifact malicious? o What’s the threat? o IOCs o Identify techniques of the attack o Improve defense/alert capabilities o Gain intelligence into current threats Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  6. Overview • Does this scale? o Focus on a few artifacts, not all artifacts o Opportunity to maintain/sharpen existing skills o Training opportunity Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  7. Overview • General Approach o OPSEC! Don’t tip off the attackers o Examine the artifact for anomalies o Locate embedded code o Extract/document suspicious code or objects Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  8. Overview • Actionable Outputs o Indicators Of Compromise • Email headers • Domain(s)/URLs • File hashes • Threat hunts (tactics and techniques) o LSASS (non system accounts) o WMI (new event consumer) o DLL injection (CreateRemoteThread) Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  9. File Formats Securit y Risk Advisors, Inc. Proprietary and Client Confidential

  10. File Formats – OLE2 Object Linking & Embedding • Structured storage • Compound File Binary (file-system like structure) • File extensions .doc, .xls • Still used today Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  11. File Formats - OOXML Open Office XML • Multiple files • Macros stored in OLE2 file included in the ZIP • File extensions .docm, .xlsm Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  12. File Formats - PDF PDF • Collection of elements o Header o Object o Stream o Object o Object o Stream o Xref o Trailer Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  13. Tools Securit y Risk Advisors, Inc. Proprietary and Client Confidential

  14. Tools – oledump & olevba Oledump.py • Analyze OLE streams, detect macros, plugin-in support • Only supports Office 97-2003 file formats (doc,xls,ppt,..etc) olevba • Part of oletools package • Detect VBA macros in OLE and OpenXML structures, extract source code. • Detects security related patterns, extract IOCs, detects common obfuscation techniques Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  15. Tools – mraptor • Detect malicious macros using generic heuristics • Can work in bulk mode against multiple files • Detects keywords based on the following criteria: • A: Auto-execution trigger • W: Write to the file system or memory • X: Execute a file or any payload outside the VBA context Suspicious = A + (W OR X) Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  16. Tools – vipermonkey • VBA Emulation engine written in python, relies on oletools Go from • Emulates vba, dll calls, activeX this -> objects, file writes • Great for analyzing highly complex or obfuscated VBA payloads speed/automation tips: To this! -> • Run using PyPy instead of default Python interpreter. • Run using – s to strip out useless statements; if it fails, rerun without. Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  17. Tools – peepdf, pdf-parser, pdfid peepdf • Pdf analysis toolbox • View elements, metadata, use filters • analyze javascript and shellcode via PyV8 and Pylibemu pdf-parser.py • Identify PDF elements • search, filter, and display objects Pdfid.py • Quickly triage a pdf and view occurrences and obfuscation of important pdf references Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  18. Tools – CyberChef • All around great webapp for analysis • Can be used to further decode obfuscated payloads, extract IOCs • can create “recipes” for repeat decoding that can be shared with other analysts! • Runs client-side in your browser or can be downloaded and used offline as well. Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  19. Demos Securit y Risk Advisors, Inc. Proprietary and Client Confidential

  20. Demo - olevba Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  21. Demo - peepdf Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  22. Demo - vipermonkey Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  23. Resources File Formats https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oleds/71120485-e1b9-4a46-ae5d-f7851e8fbaff https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b https://support.microsoft.com/en-us/office/open-xml-formats-and-file-name-extensions-5200d93c-3449-4380-8e11- 31ef14555b18 Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  24. Resources Tools https://remnux.org/ http://www.decalage.info/en/python/oletools https://blog.didierstevens.com/programs/pdf-tools/ https://gitlab.com/kalilinux/packages/peepdf Securit y Risk Advisors Intl, LLC. Propriet ary and Client Confidenti al

  25. Thank you! Securit y Risk Advisors, Inc. Proprietary and Client Confidential

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend