I'm working on a lab for a cyber-security class and need to find out when certain users are communicating with each other (through named pipes).
The users use:
And then that process takes input and writes it to the named pipes.
I know of the /dev/random file which is modified when someone types, but that can't tell me WHO it typing, right?
I'm thinking of using something like:
grep "voluntary_switches" /proc/####/sched
I'm honestly pretty stuck. The above just returns an integer. Plus I need to get the process number somehow. I'm now struggling with coming up with a script that will let me go from (A) a list of running processes to (B) outputting a username when that user is typing. And unfortunately no sudo privileges.
I need to do something along the lines of:
echo 'ps | grep "python" | ??? | grep "voluntary_switches"'
Sort of ...?
Any help would be greatly appreciated!