In computer networking, port knocking is a method where externally open a port on firewall by attempting connection on prespecified closed ports. for example 1337 68 61 78
If we sequentially attempting connection on the above closed ports, then we shall get another port open by the firewall for us.
We can do that by following ways:
knockd 10.6.0.2 1337 68 61 78
or
knockd 10.6.0.2 1337 68 61 78
or
for x in 1337 68 61 78; do nmap -Pn --max-tries 0 -p $x 10.6.0.2; done
Once it is done then start nmap scan again to see the newly found port.
nmap -p- 10.6.0.2 -vv
Now we shall get a new port lets say 2021.
Now connect on that port using nc
nc 10.6.0.2 2021
ls
flag.txt
cat flag.txt
Avi
Comments
Post a Comment