added services adn deleted slow checks
This commit is contained in:
parent
308b9b9f9a
commit
d6e2ccba46
25
linPE.sh
25
linPE.sh
@ -45,7 +45,6 @@ printf $Y"[+] "$RED"Environment\n"$NC >> $file
|
|||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Top and cleaned proccesses\n"$NC >> $file
|
printf $Y"[+] "$RED"Top and cleaned proccesses\n"$NC >> $file
|
||||||
top -n 1 2>/dev/null | head -n 13 >> $file
|
|
||||||
ps aux 2>/dev/null | grep -v "\[" >> $file
|
ps aux 2>/dev/null | grep -v "\[" >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
@ -53,6 +52,10 @@ printf $Y"[+] "$RED"Binary processes permissions\n"$NC >> $file
|
|||||||
ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file
|
ps aux 2>/dev/null | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' 2>/dev/null >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
|
printf $Y"[+] "$RED"Services\n"$NC >> $file
|
||||||
|
(/usr/sbin/service --status-all || /sbin/chkconfig --list || /bin/rc-status) 2>/dev/null >> $file
|
||||||
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Different processes executed during 1 min (HTB)\n"$NC >> $file
|
printf $Y"[+] "$RED"Different processes executed during 1 min (HTB)\n"$NC >> $file
|
||||||
if [ "`ps -e --format cmd`" ]; then for i in {1..121}; do ps -e --format cmd >> $file.tmp1; sleep 0.5; done; sort $file.tmp1 | uniq | grep -v "\[" | sed '/^.\{500\}./d' >> $file; rm $file.tmp1; fi
|
if [ "`ps -e --format cmd`" ]; then for i in {1..121}; do ps -e --format cmd >> $file.tmp1; sleep 0.5; done; sort $file.tmp1 | uniq | grep -v "\[" | sed '/^.\{500\}./d' >> $file; rm $file.tmp1; fi
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
@ -96,18 +99,14 @@ printf $Y"[+] "$RED"Networks and neightbours\n"$NC >> $file
|
|||||||
cat /etc/networks 2>/dev/null >> $file
|
cat /etc/networks 2>/dev/null >> $file
|
||||||
(ifconfig || ip a) 2>/dev/null >> $file
|
(ifconfig || ip a) 2>/dev/null >> $file
|
||||||
iptables -L 2>/dev/null >> $file
|
iptables -L 2>/dev/null >> $file
|
||||||
(arp -e || arp -a || ip n) 2>/dev/null >> $file
|
ip n 2>/dev/null >> $file
|
||||||
route 2>/dev/null >> $file
|
route -n 2>/dev/null >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Ports\n"$NC >> $file
|
printf $Y"[+] "$RED"Ports\n"$NC >> $file
|
||||||
(netstat -punta || ss -t; ss -u) 2>/dev/null >> $file
|
(netstat -punta || ss -t; ss -u) 2>/dev/null >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Files in use by network services\n"$NC >> $file
|
|
||||||
lsof -i 2>/dev/null >> $file
|
|
||||||
echo "" >> $file
|
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Can I sniff with tcpdump?\n"$NC >> $file
|
printf $Y"[+] "$RED"Can I sniff with tcpdump?\n"$NC >> $file
|
||||||
timeout 1 tcpdump >> $file 2>&1
|
timeout 1 tcpdump >> $file 2>&1
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
@ -201,19 +200,19 @@ printf $Y"[+] "$RED"*_history, profile, bashrc, httpd.conf\n"$NC >> $file
|
|||||||
find / -type f \( -name "*_history" -o -name "profile" -o -name "*bashrc" -o -name "httpd.conf" \) -exec ls -l {} \; 2>/dev/null >> $file
|
find / -type f \( -name "*_history" -o -name "profile" -o -name "*bashrc" -o -name "httpd.conf" \) -exec ls -l {} \; 2>/dev/null >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"All hidden files (not in /sys/)\n"$NC >> $file
|
printf $Y"[+] "$RED"All hidden files (not in /sys/) (limit 100)\n"$NC >> $file
|
||||||
find / -type f -iname ".*" -ls 2>/dev/null | grep -v "/sys/" >> $file
|
find / -type f -iname ".*" -ls 2>/dev/null | grep -v "/sys/" | head -n 100 >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"What inside /tmp, /var/tmp, /var/backups\n"$NC >> $file
|
printf $Y"[+] "$RED"What inside /tmp, /var/tmp, /var/backups\n"$NC >> $file
|
||||||
ls -a /tmp /var/tmp /var/backups 2>/dev/null >> $file
|
ls -a /tmp /var/tmp /var/backups 2>/dev/null >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Writable Files (not in \$HOME or /proc)\n"$NC >> $file
|
printf $Y"[+] "$RED"Interesting writable Files\n"$NC >> $file
|
||||||
USER=`whoami`
|
USER=`whoami`
|
||||||
HOME=/home/$USER
|
HOME=/home/$USER
|
||||||
find / '(' -type f -or -type d ')' '(' '(' -user $USER ')' -or '(' -perm -o=w ')' ')' 2>/dev/null | grep -v '/proc/' | grep -v $HOME | sort | uniq >> $file
|
find / '(' -type f -or -type d ')' '(' '(' -user $USER ')' -or '(' -perm -o=w ')' ')' 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'| sort | uniq >> $file
|
||||||
for g in `groups`; do find / \( -type f -or -type d \) -group $g -perm -g=w 2>/dev/null | grep -v '/proc/' | grep -v $HOME; done >> $file
|
for g in `groups`; do find / \( -type f -or -type d \) -group $g -perm -g=w 2>/dev/null | grep -v '/proc/' | grep -v $HOME | grep -v '/sys/fs'; done >> $file
|
||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Web files?(output limited)\n"$NC >> $file
|
printf $Y"[+] "$RED"Web files?(output limited)\n"$NC >> $file
|
||||||
@ -236,4 +235,4 @@ grep -lRi "password\|passw" /home /var/www /var/log 2>/dev/null | sort | uniq >>
|
|||||||
echo "" >> $file
|
echo "" >> $file
|
||||||
|
|
||||||
printf $Y"[+] "$RED"Sudo -l (you need to puts the password and the result appear in console)\n"$NC >> $file
|
printf $Y"[+] "$RED"Sudo -l (you need to puts the password and the result appear in console)\n"$NC >> $file
|
||||||
sudo -l
|
sudo -l
|
||||||
|
Loading…
Reference in New Issue
Block a user