A JXA script for enumerating running processes, printed out in a json, parent-child tree.
It is sort of a port of Jaron Bradley's TrueTree (Swift tool over to JXA for use in an Apfell Agent, Mythic for Mythic C2 by Cody Thomas
I recently implemented the Responsible pid functionality, so processes can now show the rpid as their real parent, rather than every process always having a ppid of 1 (launchd).
- In Mythic, use
jsimport jxa_tree.js
and uploadjxa_tree.js
- Use
jsimport_call{"command":"printTree('<TREE TYPE>')"}
1. Get the getRpid(pid)
function to work
Thank you to my colleagues in Appsec for helping me figure out how to get around the struct issue! JXA has a problem with structs.