Passively scan targets using Nmap via Shodan – Penetration Testing

shodan-hq-nse is an nmap nse script to query the Shodan API and passively get information about hosts.

Installation

git clone http://ift.tt/2te7Z03
cd shodan-hq-nse
cp shodan-hq.nse /usr/local/share/nmap/scripts/

Usage

You can set your Shodan API key in the shodan-hq.nse file itself to save you having to type it in every time:

— Set your Shodan API key here to avoid typing it in every time:
local apiKey = “”

nmap –script shodan-hq.nse –script-args ‘apikey=<yourShodanAPIKey'

Warning:

nmap will still scan the target host normally. If you only want to look up the target in Shodan you need to include the -sn -Pn -n flags. e.g:

nmap –script shodan-hq.nse -sn -Pn -n

You could instead specify a single target with the target script argument. e.g:

nmap –script shodan-hq.nse –script-args ‘apikey=,target=’

Saving to file

The results can be written to file with the outfile script argument. e.g:

nmap –script shodan-hq.nse -sn -Pn -n -sn -Pn -n –script-args ‘outfile=potato.csv’

Demo

Source: Github

The post Passively scan targets using Nmap via Shodan appeared first on Penetration Testing.

Anúncios

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s