amass

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version is used to display the current version of Amass.
	Version = "3.0.18"

	// Author is used to display the Amass Project Team.
	Author = "OWASP Amass Project - @owaspamass"
)
View Source
const (
	WildcardTypeNone = iota
	WildcardTypeStatic
	WildcardTypeDynamic
)

Names for the different types of wildcards that can be detected.

View Source

Banner is the ASCII art logo used within help output.

Variables

View Source
var BruteForceQueryTypes = []string{
	"CNAME",
	"A",
	"AAAA",
}

BruteForceQueryTypes contains the DNS record types that service queries for.

View Source
var (
	// InitialQueryTypes include the DNS record types that are
	// initially requested for a discovered name
	InitialQueryTypes = []string{
		"CNAME",
		"TXT",
		"A",
		"AAAA",
	}
)

Functions

func DesiredAddrTypes

func DesiredAddrTypes(addrs []core.AddressInfo, ipv4, ipv6 bool) []core.AddressInfo

DesiredAddrTypes removes undesired address types from the AddressInfo slice.

func GetWildcardType

func GetWildcardType(req *core.DNSRequest) int

GetWildcardType returns the DNS wildcard type for the provided subdomain name.

func IPRequest

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

IPRequest returns the ASN, CIDR and AS Description that contains the provided IP address.

func LookupASNsByName

func LookupASNsByName(s string) ([]*core.ASNRequest, error)

LookupASNsByName returns core.ASNRequest objects for autonomous systems with descriptions that contain the string provided by the parameter.

func MatchesWildcard

func MatchesWildcard(req *core.DNSRequest) bool

MatchesWildcard returns true if the request provided resolved to a DNS wildcard.

func OutputLineParts

func OutputLineParts(out *core.Output, src, addrs, demo bool) (source, name, ips string)

OutputLineParts returns the parts of a line to be printed for a core.Output.

func PrintBanner

func PrintBanner()

PrintBanner outputs the Amass banner the same for all tools.

func PrintEnumerationSummary

func PrintEnumerationSummary(total int, tags map[string]int, asns map[int]*ASNSummaryData, demo bool)

PrintEnumerationSummary outputs the summary information utilized by the command-line tools.

func PullCertificateNames

func PullCertificateNames(addr string, ports []int) []*core.DNSRequest

PullCertificateNames attempts to pull a cert from one or more ports on an IP.

func TrustedTag

func TrustedTag(tag string) bool

TrustedTag returns true when the tag parameter is of a type that should be trusted even facing DNS wildcards.

func UnlikelyName

func UnlikelyName(sub string) string

UnlikelyName takes a subdomain name and returns an unlikely DNS name within that subdomain.

func UpdateSummaryData

func UpdateSummaryData(output *core.Output, tags map[string]int, asns map[int]*ASNSummaryData)

UpdateSummaryData updates the summary maps using the provided core.Output data.

Types

type ASNSummaryData

type ASNSummaryData struct {
	Name      string
	Netblocks map[string]int
}

ASNSummaryData stores information related to discovered ASs and netblocks.

type ActiveCertService

type ActiveCertService struct {
	core.BaseService
	// contains filtered or unexported fields
}

ActiveCertService is the AmassService that handles all active certificate activities within the architecture.

func NewActiveCertService

func NewActiveCertService(config *core.Config, bus *core.EventBus) *ActiveCertService

NewActiveCertService returns he object initialized, but not yet started.

func (*ActiveCertService) OnStart

func (acs *ActiveCertService) OnStart() error

OnStart implements the Service interface

type AddressService

type AddressService struct {
	core.BaseService
	// contains filtered or unexported fields
}

AddressService is the Service that handles all newly discovered IP addresses within the architecture. This is achieved by receiving all the NEWADDR events.

func NewAddressService

func NewAddressService(config *core.Config, bus *core.EventBus) *AddressService

NewAddressService returns he object initialized, but not yet started.

func (*AddressService) OnStart

func (as *AddressService) OnStart() error

OnStart implements the Service interface

type AlterationService

type AlterationService struct {
	core.BaseService
	// contains filtered or unexported fields
}

AlterationService is the Service that handles all DNS name permutations within the architecture.

func NewAlterationService

func NewAlterationService(config *core.Config, bus *core.EventBus) *AlterationService

NewAlterationService returns he object initialized, but not yet started.

func (*AlterationService) OnLowNumberOfNames

func (as *AlterationService) OnLowNumberOfNames() error

OnLowNumberOfNames implements the Service interface.

func (*AlterationService) OnStart

func (as *AlterationService) OnStart() error

OnStart implements the Service interface

type BruteForceService

type BruteForceService struct {
	core.BaseService
	// contains filtered or unexported fields
}

BruteForceService is the Service that handles all brute force name generation within the architecture.

func NewBruteForceService

func NewBruteForceService(config *core.Config, bus *core.EventBus) *BruteForceService

NewBruteForceService returns he object initialized, but not yet started.

func (*BruteForceService) NewSubdomain

func (bfs *BruteForceService) NewSubdomain(req *core.DNSRequest, times int)

NewSubdomain is called by the Name Service when proper subdomains are discovered.

func (*BruteForceService) OnLowNumberOfNames

func (bfs *BruteForceService) OnLowNumberOfNames() error

OnLowNumberOfNames implements the Service interface.

func (*BruteForceService) OnStart

func (bfs *BruteForceService) OnStart() error

OnStart implements the Service interface.

func (*BruteForceService) OnStop

func (bfs *BruteForceService) OnStop() error

OnStop implements the Service interface.

func (*BruteForceService) Stats

func (bfs *BruteForceService) Stats() *core.ServiceStats

Stats implements the Service interface.

type DNSService

type DNSService struct {
	core.BaseService
	// contains filtered or unexported fields
}

DNSService is the Service that handles all DNS name resolution requests within the architecture.

func NewDNSService

func NewDNSService(config *core.Config, bus *core.EventBus) *DNSService

NewDNSService returns he object initialized, but not yet started.

func (*DNSService) OnStart

func (ds *DNSService) OnStart() error

OnStart implements the Service interface

func (*DNSService) OnStop

func (ds *DNSService) OnStop() error

OnStop implements the Service interface.

func (*DNSService) Stats

func (ds *DNSService) Stats() *core.ServiceStats

Stats implements the Service interface

type DataManagerService

type DataManagerService struct {
	core.BaseService

	Handlers []handlers.DataHandler
	// contains filtered or unexported fields
}

DataManagerService is the Service that handles all data collected within the architecture. This is achieved by watching all the RESOLVED events.

func NewDataManagerService

func NewDataManagerService(config *core.Config, bus *core.EventBus) *DataManagerService

NewDataManagerService returns he object initialized, but not yet started.

func (*DataManagerService) AddDataHandler

func (dms *DataManagerService) AddDataHandler(handler handlers.DataHandler)

AddDataHandler provides the Data Manager with another DataHandler.

func (*DataManagerService) OnStart

func (dms *DataManagerService) OnStart() error

OnStart implements the Service interface

type Enumeration

type Enumeration struct {
	Config *core.Config

	Bus *core.EventBus

	// Link graph that collects all the information gathered by the enumeration
	Graph handlers.DataHandler

	// Names already known prior to the enumeration
	ProvidedNames []string

	// The channel that will receive the results
	Output chan *core.Output

	// Broadcast channel that indicates no further writes to the output channel
	Done chan struct{}
	// contains filtered or unexported fields
}

Enumeration is the object type used to execute a DNS enumeration with Amass.

func NewEnumeration

func NewEnumeration() *Enumeration

NewEnumeration returns an initialized Enumeration that has not been started yet.

func (*Enumeration) DNSNamesRemaining

func (e *Enumeration) DNSNamesRemaining() int

DNSNamesRemaining returns the number of discovered DNS names yet to be handled by the enumeration.

func (*Enumeration) DNSQueriesPerSec

func (e *Enumeration) DNSQueriesPerSec() int

DNSQueriesPerSec returns the number of DNS queries the enumeration has performed per second.

func (*Enumeration) GetAllSourceNames

func (e *Enumeration) GetAllSourceNames() []string

GetAllSourceNames returns the names of all the available data sources.

func (*Enumeration) Pause

func (e *Enumeration) Pause()

Pause temporarily halts the enumeration.

func (*Enumeration) PauseChan

func (e *Enumeration) PauseChan() <-chan struct{}

PauseChan returns the channel that is signaled when Pause is called.

func (*Enumeration) Resume

func (e *Enumeration) Resume()

Resume causes a previously paused enumeration to resume execution.

func (*Enumeration) ResumeChan

func (e *Enumeration) ResumeChan() <-chan struct{}

ResumeChan returns the channel that is signaled when Resume is called.

func (*Enumeration) Start

func (e *Enumeration) Start() error

Start begins the DNS enumeration process for the Amass Enumeration object.

type IntelCollection

type IntelCollection struct {
	Config *core.Config
	Bus    *core.EventBus

	// The channel that will receive the results
	Output chan *core.Output

	// Broadcast channel that indicates no further writes to the output channel
	Done chan struct{}
	// contains filtered or unexported fields
}

IntelCollection is the object type used to execute a open source information gathering with Amass.

func NewIntelCollection

func NewIntelCollection() *IntelCollection

NewIntelCollection returns an initialized IntelCollection object that has not been started yet.

func (*IntelCollection) HostedDomains

func (ic *IntelCollection) HostedDomains() error

HostedDomains uses open source intelligence to discover root domain names in the target infrastructure.

func (*IntelCollection) ReverseWhois

func (ic *IntelCollection) ReverseWhois() error

ReverseWhois returns domain names that are related to the domains provided

type MarkovService

type MarkovService struct {
	core.BaseService
	// contains filtered or unexported fields
}

MarkovService is the Service that perform DNS name guessing using markov chain models.

func NewMarkovService

func NewMarkovService(config *core.Config, bus *core.EventBus) *MarkovService

NewMarkovService returns he object initialized, but not yet started.

func (*MarkovService) OnLowNumberOfNames

func (m *MarkovService) OnLowNumberOfNames() error

OnLowNumberOfNames implements the Service interface.

func (*MarkovService) OnStart

func (m *MarkovService) OnStart() error

OnStart implements the Service interface.

type NameService

type NameService struct {
	core.BaseService
	// contains filtered or unexported fields
}

NameService is the Service that handles all newly discovered names within the architecture. This is achieved by receiving all the RESOLVED events.

func NewNameService

func NewNameService(config *core.Config, bus *core.EventBus) *NameService

NewNameService requires the enumeration configuration and event bus as parameters. The object returned is initialized, but has not yet been started.

func (*NameService) OnStart

func (ns *NameService) OnStart() error

OnStart implements the Service interface

func (*NameService) RegisterGraph

func (ns *NameService) RegisterGraph(graph handlers.DataHandler)

RegisterGraph makes the Graph available to the NameService.

func (*NameService) Resolved

func (ns *NameService) Resolved(req *core.DNSRequest)

Resolved is called when a name has been resolved by the DNS Service.

Directories

Path Synopsis
viz

Jump to

Keyboard shortcuts

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