• Stars
    star
    149
  • Rank 242,905 (Top 5 %)
  • Language
    Lua
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Shodan HQ nmap plugin - passively scan targets

Introduction

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

Installation

Simple place the shodan-hq.nse script into your nmap scripts folder. e.g:

cp shodan-hq.nse /usr/local/share/nmap/scripts/

Usage

Invoke the script like so:

nmap --script shodan-hq.nse <target> --script-args 'apikey=<yourShodanAPIKey'

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 = ""

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 <target>

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

nmap --script shodan-hq.nse --script-args 'apikey=<yourShodanAPIKey>,target=<hackme>'

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 <target> -sn -Pn -n --script-args 'outfile=potato.csv'

Example output

Here we do a passive scan of a whole /24 range, giving -sV type output in under 20 seconds:

asciicast

Help

nmap --script-help shodan-hq.nse

Contact

Say Hi via Twitter: @glennzw or email: [email protected]

More Repositories

1

DevOops

Python script to monitor services, dispatch SMS on fail, and attempt restart.
Python
122
star
2

exphil

Data exfiltration PoC scripts
Python
24
star
3

phishPaste

Utility to copy templates, pages, and sending profiles between different Gophish accounts
Go
16
star
4

WordKnock

Add tracking hidden image to Word documents
Shell
13
star
5

koekiemonster

Load cookies from FireFox, to be used by Requests etc.
Python
9
star
6

maltegogo

Maltego library in Go
Go
9
star
7

kyouar

A tiny endpoint to create a QR code from a supplied URL
Go
8
star
8

WigleAPI

Small Python wrapper for Wigle's new API.
Python
6
star
9

GeneralAPI

A general purpose API allowing RESTful access to various databases.
Python
5
star
10

fishcrypt

Database encryption utility
HTML
5
star
11

VeriPol

Simple message signing and key distribution tool.
Python
4
star
12

xkcdSub

Create a proxy to substitute text in webpages according to XKCD 1288 and 1625
Python
4
star
13

maltaSync

Proxy to intercept Maltego transform requests and fire them upward asynchronously
Python
4
star
14

BreachCount

Checks if passwords in a form have been involved in data breaches
JavaScript
4
star
15

WhoCalledAPI

Small wrapper to check spaminess of phone numbers.
Python
3
star
16

GoBridge

An SMTP to GMail API service
Python
3
star
17

GeoDoc

Small webpage to coerce user into revealing their GPS location.
JavaScript
3
star
18

Malty

Malty: Combine two Maltego .mtz files into one.
Python
3
star
19

Maltego-Libraries

Maltego libraries
Python
3
star
20

ruthere

Tiny endpoint to query the response code of a supplied URL, returned as the dimensions of an image.
Go
2
star
21

SPCTF

Quick write up of the SensePost 2020 CTF
1
star
22

whois-api

Simple Python whois API
Python
1
star
23

PlayWithMe

Output a list of your steam friends and who has what games. Helps you decide what to play at a LAN party.
Python
1
star
24

AddTelegramBotToGophish

Instructions on adding a Telegram bot to dispatch gophish events
1
star
25

evil

Evil.py handle wireless networking from Python
Python
1
star