# Title: Interesting Permissions Files - Root files in home dirs
# ID: IP_Root_files_home_dir
# Author: Carlos Polop
# Last Update: 22-08-2023
# Description: Searching root files in home dirs
# License: GNU GPL
# Version: 1.0
# Mitre: T1083
# Functions Used: echo_not_found, print_2title
# Global Variables: $HOMESEARCH, $SEARCH_IN_FOLDER, $sh_usrs, $USER
# Initial Functions:
# Generated Global Variables:
# Fat linpeas: 0
# Small linpeas: 1


if ! [ "$SEARCH_IN_FOLDER" ]; then
  print_2title "Searching root files in home dirs (limit 30)" "T1083"
  (find $HOMESEARCH -user root 2>/dev/null | head -n 30 | sed -${E} "s,$sh_usrs,${SED_LIGHT_CYAN},g" | sed "s,$USER,${SED_RED},g") || echo_not_found
  echo ""
fi