Merge pull request #471 from Jack-Vaughn/environ-check

Add module to check for sensitive environment variables via /proc/*/environ
This commit is contained in:
SirBroccoli 2025-05-26 02:33:43 +02:00 committed by GitHub
commit 322792c4ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,26 @@
# Title: Interesting Files - Interesting Environment Variables
# ID: IF_Interesting_environment_variables
# Author: Jack Vaughn
# Last Update: 25-05-2025
# Description: Searching possible sensitive environment variables inside of /proc/*/environ
# License: GNU GPL
# Version: 1.0
# Functions Used: print_2title
# Global Variables: $MACPEAS
# Initial Functions:
# Generated Global Variables:
# Fat linpeas: 0
# Small linpeas: 1
if [ -z "$MACPEAS" ]; then
print_2title "Searching possible sensitive environment variables inside of /proc/*/environ"
for f in /proc/[0-9]*/environ; do
[ -r "$f" ] || continue
tr '\0' '\n' < "$f" | \
grep -aEi "(token|password|secret|aws|azure|gcp|api|key|jwt|session|cookie|database|sql|mongo|postgres)" | \
grep -avEi '(XDG_SESSION|DBUS_SESSION|systemd\/sessions)' | \
while read -r g; do
echo "$f: $g"
done
done
fi