The sudo -l command will helpfully tell us what we can run as the superuser without a password (NOPASSWD, useful for finding potential shell escapes), as well as what environment variables may be preserved (useful if you’re going to try to exploit LD_PRELOAD or LD_LIBRARY_PATH).

WARNING

The use of sudo -l requires that the user have some level of sudo access to begin with, and will be logged!