icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading PSTree for Splunk
SHA256 checksum (pstree-for-splunk_200.tgz) 3f563dc16dc6c097387738f33d347ddca2c19133f90a33d27c8565056dd41be9 SHA256 checksum (pstree-for-splunk_102.tgz) 053be2bd075303dceaafacd2d6d6bdcf5c93956780ad5828820eb381879f8d65 SHA256 checksum (pstree-for-splunk_101.tgz) 557d0d3bdf98c7190414f7a62f652b4ebb0f96e50e0ba02c23388275213c1006
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

PSTree for Splunk

This app has been archived. Learn more about app archiving.
This app is NOT supported by Splunk. Please read about what that means for you here.
Overview
Details
This apps main function is to enable a custom Splunk search command to reconstruct a pstree from Sysmon process creation events (EventCode 1). Information from memory forensics, such as Volatility's pstree, can be very helpful to detect malicious processes. By ingesting Sysmon events in Splunk and using this command you can quickly get similar information without performing memory forensics.

Prerequisites

  • Ingest Process Creation Events with Parent Process information in Splunk

Usage

The pstree command requires two arguments, child and parent. The command is intended for sysmon EventCode=1 events but can be used for anything. The command returns a row for each root value with a multivalue field, "tree", containing the root value and all childern values.

The pstree command now uses an iterative algorithm to create process tree. The legacy recursive algorithm can be used by specifying method="r".

Note: Fields passed as arguments to the pstree command must be referenced before calling pstree. The simplest way to ensure this is to include "| fields " prior to piping to pstree. Thanks to github user spitzd* for discovering.

Simple Sysmon Usage

index=sysmon EventCode=1 host=victim_machine
| fields *
| pstree child=Image parent=ParentImage
| table tree

Pretty Sysmon Usage

index=sysmon EventCode=1 host=victim_machine
| rex field=ParentImage "\x5c(?<ParentName>[^\x5c]+)$"
| rex field=Image "\x5c(?<ProcessName>[^\x5c]+)$"
| eval parent = ParentName." (".ParentProcessId.")"
| eval child = ProcessName." (".ProcessId.")"
| eval detail=strftime(_time,"%Y-%m-%d %H:%M:%S")." ".CommandLine
| pstree child=child parent=parent detail=detail spaces=50
| table tree

Searching for tree with specific process

index=sysmon EventCode=1 host=victim_machine
| fields *
| pstree child=Image parent=ParentImage
| search tree=*<process name>*
| table tree

Use legacy recursive method (version 2.X+ only)

index=sysmon EventCode=1 host=victim_machine
| fields *
| pstree child=Image parent=ParentImage method="r"
| table tree

To report problems, please go to issues section on Github

https://github.com/murchisd/splunk_pstree_app/issues

Built by Donald Murchison

Release Notes

Version 2.0.0
March 3, 2023

PSTree now uses an iterative algorithm instead of recursive. This was implemented to address pstree.py - recursion depth exceeded while calling a python object. Line 85. error that many users were receiving.

Due to limited testing ability of the iterative method, the legacy recursive algorithm is still accessible by specifying method="r" in when calling pstree.

Version 1.0.2
Sept. 11, 2021
  • Removed default stanza in authorize.conf
  • Added Icons
Version 1.0.1
Aug. 28, 2021

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk LLC in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.