Tuesday 14 July 2020

NMAP Tutorial - Ethical Hacking - 5






nmap 192.168.127.135 -p 22 ##single ssh port


nmap 192.168.127.135 -p 1-25 ## port range from 1 to 25


nmap 192.168.127.0/24 or 1-254 ##scanning full subnet or range of subnets


nmap -iL uphosts.txt ##using the uphosts.txt file


nmpa -sL 192.168.127.0/24 ##it just scan only all IP address list


nmap -sn 192.168.127.0/24 ###ping scan


Output to file

nmap -sn 192.168.127.0/24 -oN test ##normal output file


nmap -sn 192.168.127.0/24 -oG test ##graphable file


Nmap -sU 192.168.127.135 - 53 ##scanning UDP port


Different SCAN Techniques


nmap -sS 192.168.127.135 -p 21 – 25 ##sysn scan


nmap -sT 192.168.127.135 -p 21 – 25 ##connect scan


sudo nmap -sA 192.168.127.135 -p 21-25 ##Ack scan


-sN; -sF; -sX (TCP NULL, FIN, and Xmas scans)


-sI zombie scan


Version Detection


nmap -sV 192.168.127.135 ###version detection


sudo nmap -O 192.168.127.135 ###OS version detection


sudo nmap -A 192.168.127.135 ### Aggressive scan OS and version detection




Output File formats


nmap -A 192.168.127.135 -oX output.xml ##output to xml file


xsltproc output.xml -o output.html


Saturday 11 July 2020

Ethicak Hacking - How Tos (Hashcat)


below command will help you to seperate the hash from the /etc/shadow file 

  • sudo head -n 1 /etc/shadow | awk -F":" {'print $2'} > hash.lst
Options: -n  --> number of line to pick from top in shadow file 
                -F --> will seperator to devide in to columns ($2 is column number)

then using the hash cat to crack the password 

     sudo hashcat -m 1800 -O -a 0 -o carck.txt hash.lst master.txt


Friday 10 July 2020

Ethical Hacking - Basic Networking









Macchanger -r → random mac address
-A → random vendor
-a → set random vendor mac of the same kind
-p    –> back to permanent mac
-m → set manually



Ping -c    number of times to ping
-f flooding the destination
-s 1000      →  ping with jumbo packets
-b ping broadcast address
 ARP -e displays the ARP table into columns
-a displays the ARP table
-d delete ARP entry
IP
Ip address display IP address
IP-s neigh flush all    flush all ARP table
Ip add/del <ip address> <interface> delete or add IP address
Ip link set <interface> up/down bring interface up and down
IP route add/del add delete route







Common Ports and Protocols

Well Known Ports: 0 through 1023.
Registered Ports: 1024 through 49151.
Dynamic/Private : 49152 through 65535.