Gibson> Download Garbage
  • Statement of purpose
  • Techniques
    • Intelligence Gathering
      • O365 Tenant ID
      • Internal domain enumeration
      • O365 email enumeration
      • Passive nmap (smap)
      • Large IP list handling
      • Host Enumeration
    • Initial Access
      • Mail scanning
      • VBA
    • Execution
      • DLL Hijacking
      • Windows LOLBINS
        • DLLs - LOLBIN Execution
        • Executables - LOLBIN Execution
        • Scripts - LOLBIN Execution
    • Privilege Escalation
      • Windows
        • Initial Enumeration
      • Linux
    • Defense Evasion
      • Clear windows event logs
      • Bypassing proxies and firewalls
      • Microsoft Windows Defender
    • Credential Access
      • Extract credentials from LSASS dump
      • Extract credentials from registry hives
      • LSA secrets extraction
      • Dumping LSASS.exe
      • Dumping registry hives
      • Dump the domain (Domain Controllers)
      • Browser cookies & passwords
      • Wi-Fi passwords
      • Clipboard
    • Infrastructure
    • Web application testing
      • XSS - Cross site scripting
        • Weaponising XSS
    • Other
      • Buffer Overflow resources
        • Buffer Overflow Python Template
        • Buffer Overflow Python Fuzzer
      • C Reverse Shell
      • Creating Tiered Storage in Windows 10
      • Default Credentials
    • Red Team Infrastructure
      • Cobalt Strike Team Server
      • Pre-redirector (free domains!)
      • HTTPS Redirector
      • Multi functional WebApp
      • Malleable C2 profiles
      • Gophish Docker reverse proxy
    • Malware
  • Tools
    • Tools
Powered by GitBook
On this page
  • Group IP list into /24s (CIDR)
  • Basic count of IPs

Was this helpful?

  1. Techniques
  2. Intelligence Gathering

Large IP list handling

Some handy one liners for IP list parsing

Group IP list into /24s (CIDR)

Count number of unique IPs in list grouped by /24

cat IPs_list.txt | sort -u | awk 'BEGIN { FS = "." } ; { printf("%s.%s.%s/24\n", $1, $2, $3) }' | sort | uniq -c | sort -rn 

Count number of IPs in list grouped by /24 (not filtered for unique IPs). Useful if trying to understand location of high amounts of vHosting.

cat IP_list.txt | awk 'BEGIN { FS = "." } ; { printf("%s.%s.%s/24\n", $1, $2, $3) }' | sort | uniq -c | sort -rn

Basic count of IPs

Count IPs in list to highlight common IPs, eg. if you've resolved many subdomains.

cat IP_list.txt | sort | uniq -c | sort -rn
PreviousPassive nmap (smap)NextHost Enumeration

Last updated 2 years ago

Was this helpful?