0% found this document useful (0 votes)
116 views3 pages

Cat /etc/passwd - Grep - E " Root - Msfadmin"

The document describes configuration of Metasploit and Kali Linux systems on a network. It shows IP addresses of Metasploit (192.168.142.130) and Kali (192.168.142.131). On Metasploit, iptables rules are configured to allow specific ports and drop all other traffic. Kali then scans Metasploit on the network using nmap. SSL and a certificate authority are enabled on the Metasploit Apache web server.

Uploaded by

shino910j
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views3 pages

Cat /etc/passwd - Grep - E " Root - Msfadmin"

The document describes configuration of Metasploit and Kali Linux systems on a network. It shows IP addresses of Metasploit (192.168.142.130) and Kali (192.168.142.131). On Metasploit, iptables rules are configured to allow specific ports and drop all other traffic. Kali then scans Metasploit on the network using nmap. SSL and a certificate authority are enabled on the Metasploit Apache web server.

Uploaded by

shino910j
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Metasploit (IP: 192.168.142.

130)
Kali (IP: 192.168.142.131)

Metasploit
cat /etc/passwd | grep -E "^root|^msfadmin"
root:x:0:0:root:/root:/bin/bash
msfadmin:x:1000:1000:msfadmin,,,:/home/msfadmin:/bin/bash

============================================================
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 21 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 23 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 53 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 111 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 139 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 445 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 512 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 513 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 514 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 1099 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 1524 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 2049 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 2121 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 3306 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 5432 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 5900 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 5901 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 6000 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 6667 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 8009 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -p tcp --dport 8180 -j ACCEPT
sudo iptables -t filter -A INPUT -i eth0 -j DROP

sudo iptables-save

sudo iptables -t filter -F


--------------------------------------------------------------------------------------------------
Kali
nmap 192.168.142.130
Metasploit
sudo a2enmod ssl
Module ssl installed; run /etc/init.d/apache2 force-reload to enable.

sudo openssl req -x509 -nodes -days 360 -newkey rsa:2048 -keyout /etc/ssl/private/ca.key -out /etc/ssl/certs/ca.crt

Country Name (2 letter code) [AU]:TW


State or Province Name (full name) [Some-State]:Taiwan
Locality Name (eg, city) []:Taipei
Organization Name (eg, company) [Internet Widgits Pty Ltd]:None
Organizational Unit Name (eg, section) []:None
Common Name (eg, YOUR name) []:
Email Address []:None

msfadmin@metasploitable:~$ cd /etc/apache2/sites-available
msfadmin@metasploitable:/etc/apache2/sites-available$ sudo chmod 777 default
msfadmin@metasploitable:/etc/apache2/sites-available$ sudo cat default >> /tmp/default
msfadmin@metasploitable:/etc/apache2/sites-available$ sudo cat /tmp/default >> default
msfadmin@metasploitable:/etc/apache2/sites-available$ sudo nano default

RFP-V2.0.pdf

You might also like