from Hacker News

Endangered Technique: Using Environment Variables to Find Escaped Processes

by tardismechanic on 9/2/22, 5:45 AM with 1 comments

  • by eesmith on 9/2/22, 6:58 AM

    What about changing the process title?

    Eg, https://github.com/dvarrazzo/py-setproctitle .

    > The setproctitle module allows a process to change its title (as displayed by system tools such as ps, top or MacOS Activity Monitor).

    > Changing the title is mostly useful in multi-process systems, for example when a master process is forked: changing the children's title allows to identify the task each process is busy with. ...

    > Note that on Windows there is no way to change the process string: what the module does is to create a Named Object whose value can be read using a tool such as Process Explorer