Linux persistence idea - using group passwords

A rarely used feature on Linux and UNIX systems is the ability to add a password to a group. The concept is similar to how users are handled. An encrypted hash is stored in the second field of the gshadow(5) file. Anyone with the password can execute the newgrp(1) command to temporarily change their GID without having to be a member of the group. The goal of this post is to show how this feature can be leveraged to create persistence on a server in a semi stealthy way.

January 9, 2019 · 4 min · rich