Tasks
Sub Domains Enumerations
wget cisco.com
cat index.html | grep "href=" | cut -d "/" -f 3 | grep ".cisco.com" | cut -d '"' -f 1 | sort | uniq > result1.txt
for line in $(cat result1.txt); do host $line | grep "has address" | cut -d " " -f 4 >> result2.txt; done
Apache Log File Forensics
cat access.log | cut -d " " -f 1 | sort | uniq -c | sort -n | tail -n 1
7620 45.132.207.154
cat access.log | grep "45.132.207.154" | cut -d '"' -f 2 | sort | uniq -c | sort -n | tail -n 1
7266 POST /wp-login.php HTTP/1.1
cat access.log | grep "45.132.207.154" | grep "POST /wp-login.php HTTP/1.1" | cut -d '"' -f 2,3 | sort | uniq -c | sort -n
1 POST /wp-login.php HTTP/1.1 200 3854
7265 POST /wp-login.php HTTP/1.1 401 0
Add User to Sudo Group
useradd -m -s /bin/bash testuser
cat /etc/passwd | tail
passwd testuser
cat /etc/shadow | grep testuser
usermod -aG sudo testuser
cat /etc/group | grep sudo
su - testuser
userdel -r testuser
Install Apache Server
apt-get update
apt-get install apache2
service apache2 start
netstat -antp | grep 80
systemctl enable apache2
ls -l /etc/rc5.d/ | grep apache2
chmod 777 /var/www/html/
apt-get purge apache2
Last updated