-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnume
196 lines (174 loc) · 5.46 KB
/
Anume
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#!/bin/bash
#--------------------------------------------------------------------------#
# Anume Tool Made By Adkali [ v1.1 ]
# You can modify this tool as you wish
# Make it easy for yourself while making enumeration ( THM, HTB, etc.)
# Have Fun While You Can
#--------------------------------------------------------------------------#
# --- > Just Define The Script Colors To Make It Easy For Me ... //
Red="\e[31m"
Yellow="\e[105m"
GR="\e[92m"
Magenta="\e[95m"
EndColor="\e[0m"
bold=$(tput bold)
# --- > Intro Before The Code Starts ... //
sleep 0.5
echo -e "\n{+}${bold}Run inside a compromised machine."
sleep 0.5
echo -e "${Yellow}{+}${bold}Choose from a different kinds of options.${EndColor}"
sleep 0.5
echo -e "{+}${bold}${GR}Use This Tool Wisely, And Only For Education Purpose Only.${EndColor}"
sleep 0.5
# -- > CODE STARTS NOW
echo '''
| _____ |A
| |\ ___| | D
| | | | | K
| | |___| | A
\ | |____\| L
\|_________I
'''
options=("Detect Passwords/Usernames/Files/Anything Suspicious"
"Find Setuid Files"
"Show PATH variable"
"Detect Sudo Version"
"Find Sys Information"
"Look for Private-Keys"
"Running Proc's"
"Network & route"
"Exit")
# Function to display menu
ListToChoose(){
echo -e "\nPlease choose an option:"
for i in ${!options[@]}; do
echo "$((i+1)) ${options[i]}"
done
}
# LOOP, LOOP, LOOP, LOOP
while true; do
ListToChoose
read -p "Qeury the number please: " Number
# User input validation
if ! [[ $Number =~ ^[0-9]+$ ]]; then
echo -e "Wrong input!\nOnly numbers.."
continue
fi
if (( Number < 1 || Number > ${#options[@]} )); then
echo -e "Invalid number!\nPlease choose a number from the list."
continue
fi
case $Number in
1)
echo -e "\n${Yellow}Suspicious files in the /etc directory?${EndColor}\n"
sleep 2
find /etc -writable -type f 2>/dev/null & find /etc -writable -type d 2>/dev/null
sleep 2
echo -e "\n${Yellow}Readable files in the /etc directory?${EndColor}\n"
sleep 2
find /etc -readable -type f 2>/dev/null
sleep 2
echo -e "\n${Yellow}Searching for writable files in the root directory...${EndColor}\n"
sleep 2
find / -type f -writable 2>/dev/null
sleep 2
echo -e "\n${Yellow}Setuid files in the root directory...${EndColor}\n"
sleep 2
find / -perm -4000 2>/dev/null
sleep 2
echo -e "\n${Yellow}Any passwords OR usernames files in the home directory?${EndColor}\n"
sleep 2
grep -rnw '/home' -e 'password' -e 'Password'
sleep 2
grep -rnw '/home' -e 'username' -e 'Username'
sleep 2
echo -e "\n${Yellow}Sensitive files in the /var/mail directory?${EndColor}\n"
sleep 2
ls -lha /var/mail
sleep 2
echo -e "\n${Yellow}Passwords in the user's history files?${EndColor}\n"
sleep 2
echo -e "\n${Yellow}Reading 'bash_history' if it exists...${EndColor}\n"
cat ~/.bash_history 2>/dev/null
sleep 2
echo -e "\n${Yellow}Reading 'zsh_history' if it exists...${EndColor}\n"
cat ~/.zsh_history 2>/dev/null
;;
2)
echo -e "\n${Yellow}Searching for setuid files in the root directory...${EndColor}\n"
sleep 2
find / -perm -user root -exec ls -ldb {} \; 2>/dev/null
sleep 2
echo -e "\n${Yellow}Searching for setuid files using another command...${EndColor}\n"
sleep 2
find / -perm -4000 2>/dev/null
;;
3)
echo $PATH
;;
4)
echo -e "\n${Yellow}Checking sudo version...${EndColor}\n"
sleep 2
sudo -V | grep "Sudo ver"
sleep 2
echo -e "\n${Yellow}Are You Authorized To Run Something As Root User/NO PASSWD?${EndColor}\n"
sleep 2
sudo -l
;;
5)
echo -e "\n${Yellow}Displaying system information...${EndColor}\n"
sleep 2
lsb_release -a
sleep 2
uname -a
sleep 2
echo -e "\n${Yellow}Searching inside env...${EndColor}\n"
env | grep -i path
sleep 1
env | grep -i python
sleep 1
env | grep -i ^H
sleep 1
env | grep -i PATH$
sleep 1
env | grep -E 'PATH|Path|path'
sleep 1
env | grep -in path
sleep 1
env | grep -in path | nl -v 0
sleep 1
env | grep --color=auto -i path
sleep 1
env | grep -io path=*
sleep 1
env | grep -oE 'path=[^ ]+'
;;
6)
echo -e "\n${Yellow}Searching for private keys...${EndColor}\n"
sleep 2
find / -name "id_rsa*" -o -name "id_dsa*" 2>/dev/null
;;
7)
echo -e "\n${Yellow}Showing Running Proccess...${EndColor}\n"
sleep 2.5
ps -aux
sleep 2.5
echo -e "\n${Yellow}Anything Running By Root User? Checking...${EndColor}\n"
sleep 2.5
ps -ef | grep root
sleep 2.5
echo -e "\n${Yellow}Any Cronjobs?${EndColor}\n"
sleep 2.5
ls -la /etc/cron.*
;;
8)
echo -e "\n${Yellow}Displaying network & routing table...${EndColor}\n"
sleep 2
route -n
sleep 2
;;
9)
exit
;;
esac
done