Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sudo -l to check elevated privilege #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion LinEnum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ fi
user_info()
{
echo -e "\e[00;33m### USER/GROUP ##########################################\e[00m"

#Can the current user execute anything with elevated privilege
privilege=`sudo -l`
if [ "$privilege" ]; then
echo -e "\e[00;31m[-] Sudo Privilege Escalation:\e[00m\n$privilege"
echo -e "\n"
fi
#current user details
currusr=`id 2>/dev/null`
if [ "$currusr" ]; then
Expand Down Expand Up @@ -564,6 +569,22 @@ if [ ! "$udpservs" ] && [ "$udpservsip" ]; then
echo -e "\e[00;31m[-] Listening UDP:\e[00m\n$udpservsip"
echo -e "\n"
fi
#Firewall config check
iptables=`/sbin/iptables -L 2>/dev/null`
iptables_nat=`/sbin/iptables -L -t nat 2>/dev/null`
iptables_man=`/sbin/iptables -L -t mangle 2>/dev/null`
if [ "$iptables" ]; then
echo -e "\e[00;31m[-] Firewall Config:\e[00m\n$iptables"
echo -e "\n"
fi
if [ "$iptables_nat" ]; then
echo -e "\e[00;31m[-] Firewall Config(NAT):\e[00m\n$iptables_nat"
echo -e "\n"
fi
if [ "$iptables_man" ]; then
echo -e "\e[00;31m[-] Firewall Config(mangle):\e[00m\n$iptables_man"
echo -e "\n"
fi
}

services_info()
Expand Down