I'm trying to figure out if I can decomission an old server. I need the information about automated processes running there. So far I tried the following:
auditctl -a exit,always -F arch=b64 -S execve -k any-commands
At log analysis stage, I discovered two pieces of context missing:
- How did those programs get executed? What process was their parent and what was its argv?
- Where did the stdin/stdout go? Ideally I'd love to see the shell command reconstructed, but I know I'm probably asking for too much, so at least having pipe descriptor ID would do (so that I can try to re-construct it with my own scripts).
How can I approach such a problem?