Scripts
All these scripts are hand written by me and can be found on my github: https://github.com/F1shh-sec/BlueTeamTools/tree/main/scripts
Change All Users Passwords:
#!/bin/bash
newPassword=$1
mapfile -t usersArray < <(awk -F":" '((($7=="/bin/bash")||($7=="/bin/sh"))&&($1!="root")){print $1}' /etc/passwd)
# shellcheck disable=SC2068
for elm in ${usersArray[@]};
do
echo "Changed Password for $elm to $newPassword"
skill -kill -u $elm
killall -u $elm
echo -e $newPassword'\n'$newPassword'\n' | passwd $elm;
doneDisable all Users With Shell Access:
#!/bin/bash
currentuser=$(whoami)
mapfile -t usersArray < <(awk -v curuser="$currentuser" -F":" '((($7=="/bin/bash")||($7=="/bin/sh"))&&(($1!="root")&&($1!=curuser))){print $1}' /etc/passwd)
echo "Found Users: " "${usersArray[@]}"
# shellcheck disable=SC2068
for elm in ${usersArray[@]};
do
echo "Disabling: " "$elm"
usermod -s /sbin/nologon $elm
killall -u $elm
skill -kill -u $elm
doneGet the name:pid of all active TCP/UDP connections:
Get all users with shell access:
Gets a whole lot of info:
Last updated