All Projects → Ullaakut → Nmap

Ullaakut / Nmap

Licence: mit
Idiomatic nmap library for go developers

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Nmap

Gorsair
Gorsair hacks its way into remote docker containers that expose their APIs
Stars: ✭ 678 (+73.4%)
Mutual labels:  pentesting, penetration-testing, infosec, nmap, netsec
Cameradar
Cameradar hacks its way into RTSP videosurveillance cameras
Stars: ✭ 2,775 (+609.72%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec, netsec
Dirsearch
Web path scanner
Stars: ✭ 7,246 (+1753.2%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Passphrase Wordlist
Passphrase wordlist and hashcat rules for offline cracking of long, complex passwords
Stars: ✭ 556 (+42.2%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Resources
A Storehouse of resources related to Bug Bounty Hunting collected from different sources. Latest guides, tools, methodology, platforms tips, and tricks curated by us.
Stars: ✭ 62 (-84.14%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Habu
Hacking Toolkit
Stars: ✭ 635 (+62.4%)
Mutual labels:  network-analysis, hacking, pentesting, penetration-testing
Active Directory Exploitation Cheat Sheet
A cheat sheet that contains common enumeration and attack methods for Windows Active Directory.
Stars: ✭ 870 (+122.51%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Hawkeye
Hawkeye filesystem analysis tool
Stars: ✭ 202 (-48.34%)
Mutual labels:  hacking, pentesting, infosec, netsec
Webmap
A Python tool used to automate the execution of the following tools : Nmap , Nikto and Dirsearch but also to automate the report generation during a Web Penetration Testing
Stars: ✭ 188 (-51.92%)
Mutual labels:  hacking, pentesting, penetration-testing, nmap
Awesome Shodan Queries
🔍 A collection of interesting, funny, and depressing search queries to plug into shodan.io 👩‍💻
Stars: ✭ 2,758 (+605.37%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Crithit
Takes a single wordlist item and tests it one by one over a large collection of websites before moving onto the next. Create signatures to cross-check vulnerabilities over multiple hosts.
Stars: ✭ 182 (-53.45%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Infosec reference
An Information Security Reference That Doesn't Suck; https://rmusser.net/git/admin-2/Infosec_Reference for non-MS Git hosted version.
Stars: ✭ 4,162 (+964.45%)
Mutual labels:  hacking, pentesting, penetration-testing, infosec
Faraday
Faraday introduces a new concept - IPE (Integrated Penetration-Test Environment) a multiuser Penetration test IDE. Designed for distributing, indexing, and analyzing the data generated during a security audit.
Stars: ✭ 3,198 (+717.9%)
Mutual labels:  pentesting, penetration-testing, infosec, nmap
A Red Teamer Diaries
RedTeam/Pentest notes and experiments tested on several infrastructures related to professional engagements.
Stars: ✭ 382 (-2.3%)
Mutual labels:  hacking, pentesting, penetration-testing, nmap
Hellraiser
Vulnerability scanner using Nmap for scanning and correlating found CPEs with CVEs.
Stars: ✭ 413 (+5.63%)
Mutual labels:  network-analysis, hacking, nmap
Easy hack
Hack the World using Termux
Stars: ✭ 549 (+40.41%)
Mutual labels:  network-analysis, penetration-testing, nmap
maalik
Feature-rich Post Exploitation Framework with Network Pivoting capabilities.
Stars: ✭ 75 (-80.82%)
Mutual labels:  penetration-testing, infosec, netsec
Wireshark Cheatsheet
Wireshark Cheat Sheet
Stars: ✭ 131 (-66.5%)
Mutual labels:  network-analysis, penetration-testing, infosec
Cloudbrute
Awesome cloud enumerator
Stars: ✭ 268 (-31.46%)
Mutual labels:  hacking, pentesting, infosec
Crips
IP Tools To quickly get information about IP Address's, Web Pages and DNS records.
Stars: ✭ 272 (-30.43%)
Mutual labels:  hacking, pentesting, nmap

nmap

PkgGoDev github.com/Ullaakut/nmap/v2

This library aims at providing idiomatic nmap bindings for go developers, in order to make it easier to write security audit tools using golang.

What is nmap

Nmap (Network Mapper) is a free and open-source network scanner created by Gordon Lyon. Nmap is used to discover hosts and services on a computer network by sending packets and analyzing the responses.

Nmap provides a number of features for probing computer networks, including host discovery and service and operating system detection. These features are extensible by scripts that provide more advanced service detection, vulnerability detection, and other features. Nmap can adapt to network conditions including latency and congestion during a scan.

Why use go for penetration testing

Most pentest tools are currently written using Python and not Go, because it is easy to quickly write scripts, lots of libraries are available, and it's a simple language to use. However, for writing robust and reliable applications, Go is the better tool. It is statically compiled, has a static type system, much better performance, it is also a very simple language to use and goroutines are awesome... But I might be slighly biased, so feel free to disagree.

Supported features

  • [x] All of nmap's native options.
  • [x] Additional idiomatic go filters for filtering hosts and ports.
  • [x] Cancellable contexts support.
  • [x] Helpful enums for nmap commands. (time templates, os families, port states, etc.)
  • [x] Complete documentation of each option, mostly insipred from nmap's documentation.

TODO

  • [ ] Add asynchronous scan, send scan progress percentage and time estimation through channel

Simple example

package main

import (
    "context"
    "fmt"
    "log"
    "time"

    "github.com/Ullaakut/nmap/v2"
)

func main() {
    ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
    defer cancel()

    // Equivalent to `/usr/local/bin/nmap -p 80,443,843 google.com facebook.com youtube.com`,
    // with a 5 minute timeout.
    scanner, err := nmap.NewScanner(
        nmap.WithTargets("google.com", "facebook.com", "youtube.com"),
        nmap.WithPorts("80,443,843"),
        nmap.WithContext(ctx),
    )
    if err != nil {
        log.Fatalf("unable to create nmap scanner: %v", err)
    }

    result, warnings, err := scanner.Run()
    if err != nil {
        log.Fatalf("unable to run nmap scan: %v", err)
    }

    if warnings != nil {
        log.Printf("Warnings: \n %v", warnings)
    }

    // Use the results to print an example output
    for _, host := range result.Hosts {
        if len(host.Ports) == 0 || len(host.Addresses) == 0 {
            continue
        }

        fmt.Printf("Host %q:\n", host.Addresses[0])

        for _, port := range host.Ports {
            fmt.Printf("\tPort %d/%s %s %s\n", port.ID, port.Protocol, port.State, port.Service.Name)
        }
    }

    fmt.Printf("Nmap done: %d hosts up scanned in %3f seconds\n", len(result.Hosts), result.Stats.Finished.Elapsed)
}

The program above outputs:

Host "172.217.16.46":
    Port 80/tcp open http
    Port 443/tcp open https
    Port 843/tcp filtered unknown
Host "31.13.81.36":
    Port 80/tcp open http
    Port 443/tcp open https
    Port 843/tcp open unknown
Host "216.58.215.110":
    Port 80/tcp open http
    Port 443/tcp open https
    Port 843/tcp filtered unknown
Nmap done: 3 hosts up scanned in 1.29 seconds

Advanced example

Cameradar already uses this library at its core to communicate with nmap, discover RTSP streams and access them remotely.

More examples:

External resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].