• Stars
    star
    142
  • Rank 250,046 (Top 6 %)
  • Language
    Python
  • Created over 3 years ago
  • Updated 10 months ago

Reviews

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

Repository Details

SpooNMAP

Dependencies

This script is simply a wrapper for NMAP and Masscan. Install them from your favorite package manager, or install from source.

The script also utilizes Python's magical f-strings, so Python 3.6 or above is required.

Usage

Again, make sure that you have Python 3.6 or above installed. Simply executing the script will prompt you for all of the required scanning options.

# ./spoonmap.py 

________                   _____   _______  _________________ 
__  ___/______________________  | / /__   |/  /__    |__  __ \
_____ \___  __ \  __ \  __ \_   |/ /__  /|_/ /__  /| |_  /_/ /
____/ /__  /_/ / /_/ / /_/ /  /|  / _  /  / / _  ___ |  ____/ 
/____/ _  .___/\____/\____//_/ |_/  /_/  /_/  /_/  |_/_/      
       /_/                                                 
    

Scan Type
	(1) Small Port Scan
	(2) Medium Port Scan
	(3) Large Port Scan
	(4) Extra Large Port Scan (Small, Medium, and Large)
	(5) Full Port Scan
	(6) Custom Port Scan

What type of scan would you like to perform (default: Small Port Scan)? 

Would you like to enumerate service banners for any identified services (default: Yes)? 

Target Scan
	(1) External
	(2) Internal

Is this an internal or external scan (default: External)? 

How fast would you like to scan (default: 20000 packets/second)? 

Example Target File
One CIDR or IP Address per line

	192.168.0.0/24
	192.168.1.23

Please enter the full path for the file containing target hosts (default: /opt/spoonmap/ranges.txt): 

Would you like to exclude any hosts?  (default: No) 

Scan Type: Small Port Scan
Target Ports: ['80', '443', '8000', '8080', '8008', '8181', '8443']
Service Banner: False
Source Port: 53
Masscan Max Packet Rate (pps): 2000
Target File: ranges.txt
Exclusions File: exclusions.txt

Scanning port 80...

You can also create a configuration file to avoid all of the prompts. Use the provided 'config.json.sample' as an example. Just make sure that your file is named 'config.json'

# cat config.json
{
    "__scan_type_choices__" : "Small Port Scan, Medium Port Scan, Large Port Scan, Extra Large Port Scan, Full Port Scan, Custom Port Scan", 
    "scan_type" : "Custom Port Scan", 
    "dest_ports" : ["80","443","8000","8080","U:53"],
    "__banner_scan_choices__" : "True, False", 
    "banner_scan" : "True", 
    "__target_scan_choices__" : "External, Internal", 
    "target_scan" : "Internal",
    "__max_rate_external_recommedation__" : "Single Port = 20000, Full Port = 10000", 
    "__max_rate_internal_recommedation__" : "Single Port = 2000, Full Port = 1000", 
    "max_rate" : "2000",
    "target_file" : "ranges.txt",
    "output_path" : "./",
    "exclusions_file" : "exclusions.txt"
}

Note: To perform UDP scans simply prepend 'U:' to the port you'd like to scan (i.e 'U:53').

config.json Parameters

scan_type

This paramater is used to determine what ports to scan.

  • Small Port Scan
    • 80, 443, 8000, 8080, 8008, 8181, 8443
  • Medium Port Scan
    • 7001, 1433, 445, 139, 21, 22, 23, 25,
      53, 111, 389, 4243, 3389, 3306, 4786,
      5900, 5901, 6379, 6970, 9100
  • Large Port Scan
    • 1090, 1098, 1099, 10999, 11099, 11111,
      3300, 4243, 4444, 4445, 45000, 45001,
      47001, 47002, 4786, 4848, 50500, 5555,
      5556, 6129, 6379, 6970, 7000,
      7002, 7003, 7004, 7070, 7071,
      8001, 8002, 8003, 8686, 9000,
      9001, 9002, 9003, 9012, 9503
  • Extra Large Port Scan
    • Small, Medium, and Large Ports Combined
  • Full Port Scan
    • 1-65,535
  • Custom Port Scan
    • Dealer's Choice
dest_ports
  • Only used if 'Custom Port Scan' is selected.
banner_scan

This parameter is used to determine whether NMAP will be used to grab service banners.

  • True
  • False
target_scan

This paramater is used to determine what source port to spoof.

  • External Port Scan
    • source port = 53
  • Internal Port Scan
    • source port = 88
max_rate

This parameter is used to determine how fast to scan in masscan. If it is not set manually, it is determined from the scan_type and target_scan parameters. Note: Selecting a max_rate that is too high can easily create a denial-of-service. In my testing, the following rates have been found to be safe. YMMV

  • 'External' and 'Common Port Scan'
    • max_rate = 20,000 packets/second
  • 'External' and 'Full Port Scan'
    • max_rate = 10,000 packets/second
  • 'Internal' and 'Common Port Scan'
    • max_rate = 2,000 packets/second
  • 'Internal' and 'Full Port Scan'
    • max_rate = 1,000 packets/second
  • Everything else
    • max_rate = 2,000 packets/second

Potential Hacks to Look For

1090, 1098, 1099, 4444, 11099, 47001, 47002, 10999
Java RMI
https://www.rapid7.com/db/modules/exploit/multi/misc/java_rmi_server
https://medium.com/@afinepl/java-rmi-for-pentesters-structure-recon-and-communication-non-jmx-registries-a10d5c996a79
https://medium.com/@afinepl/java-rmi-for-pentesters-part-two-reconnaissance-attack-against-non-jmx-registries-187a6561314d

7000-7004, 8000-8003, 9000-9003, 9503, 7070, 7071
WebLogic
https://www.exploit-db.com/search?q=weblogic

45000, 45001
JDWP
https://www.rapid7.com/db/modules/exploit/multi/misc/java_jdwp_debugger
https://github.com/IOActive/jdwp-shellifier

8686, 9012, 50500
JMX
https://www.rapid7.com/db/modules/exploit/multi/misc/java_jmx_server

4848
GlassFish
https://www.rapid7.com/db/modules/auxiliary/scanner/http/glassfish_traversal

11111, 4444, 4445
JBoss
https://www.rapid7.com/db/modules/auxiliary/scanner/http/jboss_vulnscan
https://github.com/joaomatosf/jexboss

4786
Cisco Smart Install
https://www.rapid7.com/db/modules/auxiliary/scanner/misc/cisco_smart_install
https://github.com/Sab0tag3d/SIET

5555, 5556
HP Data Protector
https://www.rapid7.com/db/modules/exploit/multi/misc/hp_data_protector_exec_integutil
https://www.rapid7.com/db/modules/exploit/windows/misc/hp_dataprotector_cmd_exec

3300
SAP
https://github.com/chipik/SAP_GW_RCE_exploit

6129
Dameware
https://www.tenable.com/security/research/tra-2019-43
https://github.com/tenable/poc/blob/master/Solarwinds/Dameware/dwrcs_dwDrvInst_rce.py

6379
Redis
https://www.rapid7.com/db/modules/exploit/linux/redis/redis_replication_cmd_exec

6970
Cisco Unified Communications Manager https://github.com/trustedsec/SeeYouCM-Thief http://[CUCM IP Address]:6970/ConfigFileCacheList.txt

8080
Adobe CodFusion BlazeDS
https://www.tenable.com/plugins/nessus/99731

More Repositories

1

social-engineer-toolkit

The Social-Engineer Toolkit (SET) repository from TrustedSec - All new versions of SET will be deployed here.
Python
9,986
star
2

ptf

The Penetration Testers Framework (PTF) is a way for modular support for up-to-date tools.
Python
4,921
star
3

unicorn

Unicorn is a simple tool for using a PowerShell downgrade attack and inject shellcode straight into memory. Based on Matthew Graeber's powershell attacks and the powershell bypass technique presented by David Kennedy (TrustedSec) and Josh Kelly at Defcon 18.
Python
3,595
star
4

hate_crack

A tool for automating cracking methodologies through Hashcat from the TrustedSec team.
Python
1,589
star
5

trevorc2

TrevorC2 is a legitimate website (browsable) that tunnels client/server communications for covert command execution.
C
1,165
star
6

CS-Situational-Awareness-BOF

Situational Awareness commands implemented using Beacon Object Files
C
1,126
star
7

SysmonCommunityGuide

TrustedSec Sysinternals Sysmon Community Guide
CSS
1,074
star
8

CS-Remote-OPs-BOF

C
672
star
9

cve-2019-19781

This is a tool published for the Citrix ADC (NetScaler) vulnerability. We are only disclosing this due to others publishing the exploit code first.
Python
570
star
10

meterssh

MeterSSH is a way to take shellcode, inject it into memory then tunnel whatever port you want to over SSH to mask any type of communications as a normal SSH connection. The way it works is by injecting shellcode into memory, then wrapping a port spawned (meterpeter in this case) by the shellcode over SSH back to the attackers machine. Then connecting with meterpreter's listener to localhost will communicate through the SSH proxy, to the victim through the SSH tunnel. All communications are relayed through the SSH tunnel and not through the network.
Python
518
star
11

physical-docs

This is a collection of legal wording and documentation used for physical security assessments. The goal is to hopefully allow this as a template for other companies to use and to protect themselves when conducting physical security assessments.
453
star
12

nps_payload

This script will generate payloads for basic intrusion detection avoidance. It utilizes publicly demonstrated techniques from several different sources. Written by Larry Spohn (@Spoonman1091) Payload written by Ben Mauch (@Ben0xA) aka dirty_ben
Python
427
star
13

COFFLoader

C
423
star
14

tap

The TrustedSec Attack Platform is a reliable method for droppers on an infrastructure in order to ensure established connections to an organization.
Python
369
star
15

hardcidr

hardCIDR is a Linux Bash script, but also functions under macOS. Your mileage may vary on other distros. The script with no specified options will query ARIN and a pool of BGP route servers. The route server is selected at random at runtime.
Shell
354
star
16

orpheus

Bypassing Kerberoast Detections with Modified KDC Options and Encryption Types
Python
342
star
17

egressbuster

Egressbuster is a method to check egress filtering and identify if ports are allowed. If they are, you can automatically spawn a shell.
Python
332
star
18

artillery

The Artillery Project is an open-source blue team tool designed to protect Linux and Windows operating systems through multiple methods.
323
star
19

spraywmi

SprayWMI is an easy way to get mass shells on systems that support WMI. Much more effective than PSEXEC as it does not leave remnants on a system.
Python
250
star
20

ridenum

Rid_enum is a null session RID cycle attack for brute forcing domain controllers.
Python
225
star
21

ELFLoader

C
221
star
22

Obsidian-Vault-Structure

203
star
23

SeeYouCM-Thief

HTML
173
star
24

User-Behavior-Mapping-Tool

Python
156
star
25

pivoter

Pivoter is a proxy tool for pentesters to have easier lateral movement.
C
140
star
26

SliverKeylogger

C++
136
star
27

PPLFaultDumpBOF

C
129
star
28

SHIPS

The Shared Host Integrated Password System (SHIPS) is a solution to provide unique and rotated local super user or administrator passwords for environments where it is not possible or not appropriate to disable these local accounts. Clients may be configured to rotate passwords automatically. Stored passwords can be retrieved by desktop support personnel as required, or updated when a password has to be manually changed in the course of system maintenance. By having unique passwords on each machine and logging of password retrievals, security can be improved my making networks more resistant to lateral movement by attackers and enhancing the ability to attribute actions to individual persons.
JavaScript
128
star
29

CS_COFFLoader

C#
126
star
30

CrackHound

Python
126
star
31

cors-poc

HTML
125
star
32

quicksql

QuickSQL is a simple MSSQL query tool that allows you to connect to MSSQL databases and does not require administrative level rights to use.
Python
98
star
33

tscopy

Python
87
star
34

HoneyBadger

Ruby
81
star
35

conqr

ConQR is an open source ticketing system for conferences to issue QRCode's in a quick, efficient, and easy manner.
Python
75
star
36

auto_SettingContent-ms

This is a quick POC for using the Matt Nelson (enigma0x3) technique for generating a malicious .SettingContent-ms extension type for remote code execution. This automates generating an HTA downloader and embeds it in the SettingContent-ms file for you and starts Apache.
Python
49
star
37

defensive-scripts

PowerShell
42
star
38

wpupdate

WPUpdate is a simple Linux service that automatically checks for a new version of Wordpress each night at 2AM.
Python
37
star
39

proxy_helper

Proxy Helper is a WiFi Pineapple module that will automatically configure the Pineapple for use with a proxy such as Burp Suite.
JavaScript
29
star
40

hash_parser

This is a hash parser that will export a rc file compatible with Metasploit. This is useful when compromising a separate domain and want to see if any of the credentials work on another domain or other systems.
Python
23
star
41

Windows-MS-LSAT-RPC-Example

Windows RPC example calling stubs generated from MS-LSAT and MS-LSAD
C
23
star
42

Zoinks

Manage Engine Decrypter
Python
22
star
43

inProc_Evade_Get-InjectedThread

PoC code from blog
C
15
star
44

scriptkiddie-wmi-provider

C#
13
star
45

TCS_InjectionTechniques

C
12
star
46

RisingSun

RisingSun: Decoding SUNBURST C2 to identify infected hosts without network telemetry.
Go
9
star