0% found this document useful (0 votes)
18 views6 pages

Comprehensive Guide to Port Scanning

The document provides a comprehensive guide on port scanning techniques using various tools such as Nmap and Hping3. It includes command examples for scanning IP ranges, checking open ports, and utilizing scripts for vulnerability assessments. Additionally, it covers DNS zone transfer techniques and managing scan outputs.

Uploaded by

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

Comprehensive Guide to Port Scanning

The document provides a comprehensive guide on port scanning techniques using various tools such as Nmap and Hping3. It includes command examples for scanning IP ranges, checking open ports, and utilizing scripts for vulnerability assessments. Additionally, it covers DNS zone transfer techniques and managing scan outputs.

Uploaded by

sonexa8694
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Port Scanning Huda Sunday 16/4/2023

$ifconfig
For example [Link] my pc
Ping [Link]
Ping [Link]
$nc –v –z –n –w 1 [Link] 80
$nc –v –z –n –w 1 [Link] 20-90
$nc –v –z –n –w 1 [Link] 1-65535
$nc –v –z –u –n –w 1 [Link] 1-65535
$nc –v –z –u –n –w 1 [Link] 139
$nc –v –z –u –n –w 1 [Link] 53
$hping3-h
$sudo hping3 -1 [Link]
$sudo hping3 –A [Link] 80
$sudo hping3 –A [Link] -p 80
Nmap
$nmap –h
$ls/usr/share/nmap/
$ls/usr/share/nmap/nmap-services
$ls/usr/share/nmap/scripts/
Cd Desktop /
$nmap-sn [Link]/24

1
Port Scanning Huda Sunday 16/4/2023
$nmap -sn [Link] [Link] [Link] [Link]/24
$nmap -sn [Link]/24
Open file ,write the following save it as [Link]
[Link]/24
[Link]
[Link]
[Link]
[Link]
$vi [Link]
$nmap –sn –iL [Link]
$nmap –sL –iL [Link]
$nmap –sL –iL [Link] -n
$nmap –sL –iL [Link] –R
$nmap –sn –iL [Link] –vv
$nmap [Link]-20
$sudo nmap [Link] –vv
$nmap [Link] -sS –vv
$nmap [Link] -sX –vv
$nmap [Link] -s –vv

$nmap –sn [Link]-100 -- exclude [Link]-80


$nmap –sT –n –v [Link] -F
$nmap –sT –n –v [Link] -- top-ports 50
$nmap –sT –n –v [Link] -- top-ports 50 - - open

2
Port Scanning Huda Sunday 16/4/2023
$nmap –sT –n –v [Link] –p 1-1000
$nmap –sT –n –v [Link] –p 1-65535
$nmap –sT –n –v [Link] –p-
$nmap –sT –n –v [Link] –p 1-25,80,443-445,8080 - - open
$sudo nmap –sU [Link] - - top –ports 10 - - open
$sudo nmap –sU –sS [Link]
$sudo nmap –sU –sS [Link] – top-ports 10
$sudo nmap –sS [Link] –sV –vv
$sudo nmap –sS [Link] –sV –O –vv
$sudo nmap –sS [Link] –sV –O - - tracerout –vv
$sudo nmap –sS [Link] –sV –O - - tracerout –vv
$sudo nmap –sS [Link] – sV –O - - tracerout –vv –p-
$sudo nmap –sS [Link] – sV –O - - tracerout –vv –p- -r
$ls/usr/share/nmap/scripts/
$ls/usr/share/nmap/scripts/n
$ls/usr/share/nmap/scripts/[Link]
$more /usr/share/nmap/scripts/[Link]| grep exploit
$more /usr/share/nmap/scripts/[Link]| grep vuln
$nmap - - script-help=[Link]
$nmap - - script-help=[Link]
$sudo nmap –sS [Link] –sV –O - - tracerout –vv –sC
$sudo nmap –sS [Link] –sV –O - - tracerout –vv - - script=default
$sudo nmap –sS [Link] –sV –O - - tracerout –vv - - script=smb*
$sudo nmap –sS [Link] –sV –O - - tracerout –vv - - script=default –script-trace

3
Port Scanning Huda Sunday 16/4/2023
$sudo nmap –sS [Link] –sV –O - - tracerout –vv - - script=default -- script-
args=
$sudo nmap –sS [Link] –A
$sudo nmap –sS [Link] –A –vv
$nmap [Link] - - script=[Link]
$echo “ “ > /usr/share/nmap/scripts/[Link]
$sudo vi usr/share/nmap/scripts/[Link]

From google nmap vulners github [Link]


$git clone [Link]
$ls – L
$cd nmap-vulners/
$ls-l
$rm –rf *.png
$ls
$rm [Link]
$ls –l
$rm LICENSE
$ls-l
$sudo cp */usr/share/nmap/scripts/
$ more /usr/share/nmap/scripts/[Link]
$sudo nmap - - script-update
$sudo nmap –sS [Link] –A –vv
$nmap [Link] –port-ratio =0.2 –vv –n
$nmap [Link] –port-ratio =0.03 –vv –n - - open
4
Port Scanning Huda Sunday 16/4/2023
$sudo nmap –sS [Link] -A –vv –oN
$sudo nmap –sS [Link] -A –vv –oN [Link]
$ls-l
$sudo nmap –sS [Link] -A –vv –oX [Link]
$ls-l
$nmap –sn [Link]/24
$nmap –sn [Link]/24 –oG [Link]
$more [Link]
$grep Up [Link]
$grep [Link]| awk -F “ “ ‘{print $2}’
$grep [Link]| awk -F “ “ ‘{print $2}’ > [Link]
$nmap –p 80 [Link] /24 –oG [Link] -- open
$cat [Link]

$grep open [Link]| awk -F “ “ ‘{print $2}’ > [Link]


$cat [Link]
$ls-l
$rm metasploitable.
$sudo nmap –sS [Link] –A –vv –oA metasploitable
$ls-l

$ls/usr/share/nmap/scripts/dns*

$nmap - - script=dns-zone-transfer –p 53 [Link]

5
Port Scanning Huda Sunday 16/4/2023
$host –t ns [Link]
$nmap - - script=dns-zone-transfer –p 53 [Link]
$host –t ns [Link]
$nmap - - script=dns-zone-transfer –p 53 [Link]

You might also like