-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpost.sh
56 lines (48 loc) · 1.05 KB
/
post.sh
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
#!/bin/bash
root() {
if (( $EUID == 0 )); then
root=$true
shadow
else
root=$false
fi
}
network_info() {
hostname -f
ifconfig
netstat -r
}
general_info() {
echo 'Finding SUID:'
find / -perm /4000 2>/dev/null
cat /home/*/.*
cat /etc/passwd | awk -F ":" '{print $1, $2}'
cat /etc/crontab
cat /etc/group
if (( $EUID == 0 )); then
cat /etc/shadow | awk -F ":" '{print $1, $2}'
fi
}
discovery() {
cd /
find . -type f -iname '.*history*' 2>/dev/null
find . -type f -iname '.*ssh*' 2>/dev/null
find . -type f -iname '.*authorized' 2>/dev/null
find . -type f -iname '.*gpgps' 2>/dev/null
find . -type f -iname '.*mysql*' 2>/dev/null
find . -type f -iname '.*db' 2>/dev/null
find . -type f -iname '.*rsa*' 2>/dev/null
find . -type f -iname '*master' 2>/dev/null
find . -type f -iname "*password*" 2>/dev/null
find . -type f -iname "*git*" 2>/dev/null
ls -lh /media
ls -lh /home
ls -lh /home/$USER
}
shadow() {
cat /etc/shadow | awk -F ":" '{print $1, $2}'
}
root
network_info
password_info
discovery