Cheat Sheet Hacking
  • 🌐Generic Ideas
    • File Transfer
    • Reverse Shell
    • Cracking Tricks
    • Tunneling and Port Forwarding
    • Reversing
    • OSINT
    • Phishing
  • 🐕‍🦺Port enumeration
    • Reconnaissance
    • 53 - DNS
    • 80,443 - Web
      • Identify php.ini file used
      • Exploitation
        • File Upload
        • XXS
    • 445 - SMB
    • 389, 636, 3268 - LDAP(S)
  • LINUX THINGS
    • Enumeration
    • Privilege Escalation
      • Writable $PATH
  • WINDOWS THINGS
    • Enumeration
    • Useful Commands
    • Active Directory Methodology
      • Commands to create AD environment
      • Attacks
        • Kerberos
          • User enumeration
          • ASREP-Roast
          • Kerberoasting
          • ASREP-Roast VS Kerberoasting
          • Golden Ticket
          • Resource Based Constrained Delegation
        • Secrets dump
        • Pass The Hash
        • Dump NTDS
        • Tickets
          • TGT
        • NTML Password Spray
        • LDAP Authentication
          • LDAP Pass-back
          • Rogue LDAP Server
        • SMB Relay (LLNMR, NTB-NS & WPAD)
        • NTLM Relay
        • Tools to exploit AD things
        • SCF Files
      • Kerberos
      • SAM & LSA secrets
      • Enumeration
        • BloodHound
        • PowerView
          • CheatSheet of Commands
        • Set DNS & DOMAIN
      • Resources
      • RunAs
      • Post Explotation
        • Persistence
        • Mimikatz
      • Common used tools
  • 🕳️Pivoting
    • Port Forwarding
    • Socks Forwarding
    • Routing
    • Web Fuzzing
    • Transfer files
    • Metasploit
      • Single Pivot
      • Double Pivot
    • Burp Suite
  • 🎛️Hardware
    • Physical attacks
  • 🌕Buffer Overflow
    • Introduction
    • Stack-Based
      • Introduction
        • Spiking
        • Fuzzing
        • Find Offset
        • Overwrite EIP
        • Find module
        • Find Badchars
        • Shellcode
  • 🐳Docker
    • Commands
    • Practical examples
  • 💡Useful things
    • Burp Suite
      • Proxy Activation
    • Linux Commands
    • Recreate multipart/form-data request
      • Python
      • HTML & netcat
    • TTY
    • Templates for reports (exams)
    • Tmux
    • Other cheat sheets
Powered by GitBook
On this page
  • naabu
  • nmap
  • masscan
  • Using /dev/tcp/ip/port
  1. Port enumeration

Reconnaissance

PreviousPhishingNext53 - DNS

Last updated 5 months ago

naabu

From here

naabu -host 10.10.10.10

nmap

nmap 10.10.10.10
nmap -p- 10.10.10.10
nmap -p 22,80,5000 10.10.10.10
nmap -p- --open 10.10.10.10
nmap -p- --open -v 10.10.10.10 -Pn -sS -oA nmap-output 

masscan

From here

masscan 10.10.10.10
masscan 10.10.10.10 -p0-65535
masscan 10.10.10.10 -p22,80,8000-8100
masscan 10.10.10.0/24 -p0-65535
masscan 10.10.10.10 -p0-65535 -oA scan
masscan 10.10.10.10 -p0-65535 --max-rate 100000

Using /dev/tcp/ip/port

#!/bin/bash

IP="10.10.10.10"

for port in $(seq 1 65535); do
        (timeout 1 bash -c "</dev/tcp/$IP/$port") >/dev/null 2>&1 && echo "Puerto Abierto: $IP:$port" &
done; wait
port=80
timeout 1 bash -c "echo >/dev/tcp/10.10.10.10/$port" && echo "port $port is open" || echo "port $port is closed"
🐕‍🦺
https://github.com/projectdiscovery/naabu
https://github.com/robertdavidgraham/masscan