amass

package
v2.4.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version string = "v2.4.0"
	Author  string = "Jeff Foley (@jeff_foley)"
	// Tags used to mark the data source with the Subdomain struct
	ALT     = "alt"
	ARCHIVE = "archive"
	API     = "api"
	BRUTE   = "brute"
	CERT    = "cert"
	SCRAPE  = "scrape"

	// Topics used in the EventBus
	DNSQUERY = "amass:dnsquery"
	RESOLVED = "amass:resolved"
	OUTPUT   = "amass:output"

	// Node types used in the Maltego local transform
	TypeNorm int = iota
	TypeNS
	TypeMX
	TypeWeb
)
View Source
const MAX_THROTTLED int = 20

Variables

View Source
var (
	WebRegex *regexp.Regexp = regexp.MustCompile("web|www")
)

Functions

func CIDRRequest

func CIDRRequest(cidr *net.IPNet) (int, string, error)

func CheckConfig

func CheckConfig(config *AmassConfig) error

func GetDefaultWordlist

func GetDefaultWordlist() ([]string, error)

func IPRequest

func IPRequest(addr string) (int, *net.IPNet, string, error)

func LookupIPHistory

func LookupIPHistory(domain string) ([]string, error)

LookupIPHistory - Attempts to obtain IP addresses used by a root domain name

func ObtainAdditionalDomains

func ObtainAdditionalDomains(config *AmassConfig)

func ReverseWhois

func ReverseWhois(domain string) ([]string, error)

-------------------------------------------------------------------------------------------------- ReverseWhois - Returns domain names that are related to the domain provided

func StartEnumeration added in v1.3.0

func StartEnumeration(config *AmassConfig) error

func SubdomainToDomain added in v1.2.1

func SubdomainToDomain(name string) string

func WriteD3File

func WriteD3File(path string, config *AmassConfig)

func WriteGEXFFile

func WriteGEXFFile(path string, config *AmassConfig)

func WriteGraphistryFile

func WriteGraphistryFile(path string, config *AmassConfig)

func WriteVisjsFile

func WriteVisjsFile(path string, config *AmassConfig)

Types

type ASRecord added in v1.3.0

type ASRecord struct {
	ASN            int
	Prefix         string
	CC             string
	Registry       string
	AllocationDate time.Time
	Description    string
	Netblocks      []string
}

func ASNRequest

func ASNRequest(asn int) (*ASRecord, error)

type AlterationService

type AlterationService struct {
	BaseAmassService
	// contains filtered or unexported fields
}

func NewAlterationService

func NewAlterationService(config *AmassConfig, bus evbus.Bus) *AlterationService

func (*AlterationService) OnStart

func (as *AlterationService) OnStart() error

func (*AlterationService) OnStop

func (as *AlterationService) OnStop() error

type AmassAddressInfo

type AmassAddressInfo struct {
	Address     net.IP
	Netblock    *net.IPNet
	ASN         int
	Description string
}

type AmassConfig

type AmassConfig struct {
	sync.Mutex

	Graph *Graph

	// The channel that will receive the results
	Output chan *AmassOutput

	// Logger for error messages
	Log *log.Logger

	// The ASNs that the enumeration will target
	ASNs []int

	// The CIDRs that the enumeration will target
	CIDRs []*net.IPNet

	// The IPs that the enumeration will target
	IPs []net.IP

	// The ports that will be checked for certificates
	Ports []int

	// Will whois info be used to add additional domains?
	Whois bool

	// The list of words to use when generating names
	Wordlist []string

	// Will the enumeration including brute forcing techniques
	BruteForcing bool

	// Will recursive brute forcing be performed?
	Recursive bool

	// Minimum number of subdomain discoveries before performing recursive brute forcing
	MinForRecursive int

	// Will discovered subdomain name alterations be generated?
	Alterations bool

	// Only access the data sources for names and return results?
	NoDNS bool

	// Determines if active information gathering techniques will be used
	Active bool

	// Use web archive data sources, which causes the enumeration to take longer
	UseWebArchives bool

	// A blacklist of subdomain names that will not be investigated
	Blacklist []string

	// Sets the maximum number of DNS queries per minute
	Frequency time.Duration

	// Preferred DNS resolvers identified by the user
	Resolvers []string

	// The Neo4j URL used by the bolt driver to connect with the database
	Neo4jPath string
	// contains filtered or unexported fields
}

AmassConfig - Passes along optional configurations

func CustomConfig

func CustomConfig(ac *AmassConfig) *AmassConfig

Ensures that all configuration elements have valid values

func DefaultConfig

func DefaultConfig() *AmassConfig

DefaultConfig returns a config with values that have been tested

func (*AmassConfig) AddDomain

func (c *AmassConfig) AddDomain(domain string)

func (*AmassConfig) Blacklisted added in v1.4.0

func (c *AmassConfig) Blacklisted(name string) bool

func (*AmassConfig) DomainRegex

func (c *AmassConfig) DomainRegex(domain string) *regexp.Regexp

func (*AmassConfig) Domains

func (c *AmassConfig) Domains() []string

func (*AmassConfig) IsDomainInScope

func (c *AmassConfig) IsDomainInScope(name string) bool

type AmassOutput

type AmassOutput struct {
	Name      string
	Domain    string
	Addresses []AmassAddressInfo
	Tag       string
	Source    string
	Type      int
}

type AmassRequest

type AmassRequest struct {
	Name    string
	Domain  string
	Records []dns.DNSAnswer
	Tag     string
	Source  string
}

AmassRequest - Contains data obtained throughout AmassService processing

func PullCertificateNames

func PullCertificateNames(addr string, ports []int) []*AmassRequest

pullCertificate - Attempts to pull a cert from several ports on an IP

type AmassService

type AmassService interface {
	// Start the service
	Start() error
	OnStart() error

	// OPSEC for the service
	List() string

	// Stop the service
	Stop() error
	OnStop() error

	NextRequest() *AmassRequest
	SendRequest(req *AmassRequest)

	IsActive() bool
	SetActive()

	// Returns a channel that is closed when the service is stopped
	Quit() <-chan struct{}

	// String description of the service
	String() string
}

type BaseAmassService

type BaseAmassService struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBaseAmassService

func NewBaseAmassService(name string, config *AmassConfig, service AmassService) *BaseAmassService

func (*BaseAmassService) Config

func (bas *BaseAmassService) Config() *AmassConfig

func (*BaseAmassService) IsActive

func (bas *BaseAmassService) IsActive() bool

func (*BaseAmassService) IsStarted

func (bas *BaseAmassService) IsStarted() bool

func (*BaseAmassService) IsStopped

func (bas *BaseAmassService) IsStopped() bool

func (*BaseAmassService) List

func (bas *BaseAmassService) List() string

func (*BaseAmassService) NextRequest

func (bas *BaseAmassService) NextRequest() *AmassRequest

func (*BaseAmassService) OnStart

func (bas *BaseAmassService) OnStart() error

func (*BaseAmassService) OnStop

func (bas *BaseAmassService) OnStop() error

func (*BaseAmassService) Quit

func (bas *BaseAmassService) Quit() <-chan struct{}

func (*BaseAmassService) SendRequest

func (bas *BaseAmassService) SendRequest(req *AmassRequest)

func (*BaseAmassService) SetActive

func (bas *BaseAmassService) SetActive()

func (*BaseAmassService) SetStarted

func (bas *BaseAmassService) SetStarted()

func (*BaseAmassService) SetStopped

func (bas *BaseAmassService) SetStopped()

func (*BaseAmassService) Start

func (bas *BaseAmassService) Start() error

func (*BaseAmassService) Stop

func (bas *BaseAmassService) Stop() error

func (*BaseAmassService) String

func (bas *BaseAmassService) String() string

type BruteForceService

type BruteForceService struct {
	BaseAmassService
	// contains filtered or unexported fields
}

func NewBruteForceService

func NewBruteForceService(config *AmassConfig, bus evbus.Bus) *BruteForceService

func (*BruteForceService) OnStart

func (bfs *BruteForceService) OnStart() error

func (*BruteForceService) OnStop

func (bfs *BruteForceService) OnStop() error

type DNSService

type DNSService struct {
	BaseAmassService
	// contains filtered or unexported fields
}

func NewDNSService

func NewDNSService(config *AmassConfig, bus evbus.Bus) *DNSService

func (*DNSService) OnStart

func (ds *DNSService) OnStart() error

func (*DNSService) OnStop

func (ds *DNSService) OnStop() error

type DataManagerService

type DataManagerService struct {
	BaseAmassService
	// contains filtered or unexported fields
}

func NewDataManagerService

func NewDataManagerService(config *AmassConfig, bus evbus.Bus) *DataManagerService

func (*DataManagerService) AttemptSweep

func (dms *DataManagerService) AttemptSweep(domain, addr string, cidr *net.IPNet)

AttemptSweep - Initiates a sweep of a subset of the addresses within the CIDR

func (*DataManagerService) OnStart

func (dms *DataManagerService) OnStart() error

func (*DataManagerService) OnStop

func (dms *DataManagerService) OnStop() error

type Edge

type Edge struct {
	From, To int
	Label    string
	// contains filtered or unexported fields
}

type Graph

type Graph struct {
	sync.Mutex
	Domains    map[string]*Node
	Subdomains map[string]*Node
	Addresses  map[string]*Node
	PTRs       map[string]*Node
	Netblocks  map[string]*Node
	ASNs       map[int]*Node
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph() *Graph

func (*Graph) NewEdge

func (g *Graph) NewEdge(from, to int, label string) *Edge

func (*Graph) NewNode

func (g *Graph) NewNode(label string) *Node

func (*Graph) VizData

func (g *Graph) VizData() ([]viz.Node, []viz.Edge)

type Neo4j

type Neo4j struct {
	// contains filtered or unexported fields
}

func NewNeo4j

func NewNeo4j(url string) (*Neo4j, error)

url param will typically look like the following: neo4j:DoNotUseThisPassword@localhost:7687

type Node

type Node struct {
	Edges      []int
	Labels     []string
	Properties map[string]string
	// contains filtered or unexported fields
}

type SourcesService

type SourcesService struct {
	BaseAmassService
	// contains filtered or unexported fields
}

func NewSourcesService

func NewSourcesService(config *AmassConfig, bus evbus.Bus) *SourcesService

func (*SourcesService) OnStart

func (ss *SourcesService) OnStart() error

func (*SourcesService) OnStop

func (ss *SourcesService) OnStop() error

Directories

Path Synopsis
internal
dns
viz

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL