amass

package
v0.0.0-...-fbe226c Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Tags used to mark the data source with the Subdomain struct
	DNS     = "dns"
	ALT     = "alt"
	BRUTE   = "brute"
	SEARCH  = "search"
	ARCHIVE = "archive"

	// An IPv4 regular expression
	IPv4RE = "((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[.]){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
	// This regular expression + the base domain will match on all names and subdomains
	SUBRE = "(([a-zA-Z0-9]{1}|[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]{1})[.]{1})+"

	USER_AGENT  = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
	ACCEPT      = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
	ACCEPT_LANG = "en-US,en;q=0.8"
)
View Source
const (
	NUM_SEARCHES int = 13
)

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(config *AmassConfig) error

func GetDefaultWordlist

func GetDefaultWordlist() []string

func GetWebPage

func GetWebPage(u string) string

func Nameservers

func Nameservers() []string

func NewUniqueElements

func NewUniqueElements(orig []string, add ...string) []string

NewUniqueElements - Removes elements that have duplicates in the original or new elements

func NextNameserver

func NextNameserver() string

NextNameserver - Requests the next server from the goroutine

func StartAmass

func StartAmass(config *AmassConfig) error

func SubdomainRegex

func SubdomainRegex(domain string) *regexp.Regexp

func UniqueAppend

func UniqueAppend(orig []string, add ...string) []string

UniqueAppend - Behaves like the Go append, but does not add duplicate elements

Types

type AlterationService

type AlterationService struct {
	BaseAmassService
}

func NewAlterationService

func NewAlterationService(in, out chan *AmassRequest, config *AmassConfig) *AlterationService

func (*AlterationService) OnStart

func (as *AlterationService) OnStart() error

func (*AlterationService) OnStop

func (as *AlterationService) OnStop() error

type AmassConfig

type AmassConfig struct {
	// The root domain names that the enumeration will target
	Domains []string

	// 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

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

	// The channel that will receive the results
	Output chan *AmassRequest
}

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

type AmassRequest

type AmassRequest struct {
	// The subdomain name
	Name string

	// The base domain that the name belongs to
	Domain string

	// The IP address that the name resolves to
	Address string

	// The netblock that the address belongs to
	Netblock *net.IPNet

	// The ASN that the address belongs to
	ASN int

	// The name of the service provider associated with the ASN
	ISP string

	// The type of data source that discovered the name
	Tag string

	// The exact data source that discovered the name
	Source string
}

AmassRequest - Contains data obtained throughout AmassService processing

type AmassService

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

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

	// Returns the input channel for the service
	Input() <-chan *AmassRequest

	// Returns the output channel for the service
	Output() chan<- *AmassRequest

	// The request is sent non-blocking on the output chanel
	SendOut(req *AmassRequest)

	// Return true if the service is active
	IsActive() bool

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

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

type ArchiveService

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

func NewArchiveService

func NewArchiveService(in, out chan *AmassRequest, config *AmassConfig) *ArchiveService

func (*ArchiveService) OnStart

func (as *ArchiveService) OnStart() error

func (*ArchiveService) OnStop

func (as *ArchiveService) OnStop() error

type Archiver

type Archiver interface {
	Search(req *AmassRequest)
}

Archiver - represents all objects that perform Memento web archive searches for domain names

func ArchiveIsArchive

func ArchiveIsArchive(out chan<- *AmassRequest) Archiver

func ArchiveItArchive

func ArchiveItArchive(out chan<- *AmassRequest) Archiver

func ArquivoArchive

func ArquivoArchive(out chan<- *AmassRequest) Archiver

func LibraryCongressArchive

func LibraryCongressArchive(out chan<- *AmassRequest) Archiver

func MementoWebArchive

func MementoWebArchive(u, name string, out chan<- *AmassRequest) Archiver

func UKGovArchive

func UKGovArchive(out chan<- *AmassRequest) Archiver

func UKWebArchive

func UKWebArchive(out chan<- *AmassRequest) Archiver

func WaybackMachineArchive

func WaybackMachineArchive(out chan<- *AmassRequest) Archiver

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) Input

func (bas *BaseAmassService) Input() <-chan *AmassRequest

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) OnStart

func (bas *BaseAmassService) OnStart() error

func (*BaseAmassService) OnStop

func (bas *BaseAmassService) OnStop() error

func (*BaseAmassService) Output

func (bas *BaseAmassService) Output() chan<- *AmassRequest

func (*BaseAmassService) Quit

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

func (*BaseAmassService) SendOut

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

func (*BaseAmassService) SetActive

func (bas *BaseAmassService) SetActive(active bool)

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(in, out chan *AmassRequest, config *AmassConfig) *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(in, out chan *AmassRequest, config *AmassConfig) *DNSService

func (*DNSService) OnStart

func (ds *DNSService) OnStart() error

func (*DNSService) OnStop

func (ds *DNSService) OnStop() error

type IPHistoryService

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

func NewIPHistoryService

func NewIPHistoryService(in, out chan *AmassRequest, config *AmassConfig) *IPHistoryService

func (*IPHistoryService) LookupIPs

func (ihs *IPHistoryService) LookupIPs(domain string)

LookupIPs - Attempts to obtain IP addresses from a root domain name

func (*IPHistoryService) OnStart

func (ihs *IPHistoryService) OnStart() error

func (*IPHistoryService) OnStop

func (ihs *IPHistoryService) OnStop() error

type NetblockService

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

func NewNetblockService

func NewNetblockService(in, out chan *AmassRequest, config *AmassConfig) *NetblockService

func (*NetblockService) OnStart

func (ns *NetblockService) OnStart() error

func (*NetblockService) OnStop

func (ns *NetblockService) OnStop() error

type NgramService

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

func NewNgramService

func NewNgramService(in, out chan *AmassRequest, config *AmassConfig) *NgramService

func (*NgramService) AddGoodWords

func (ns *NgramService) AddGoodWords(words []string)

func (*NgramService) GoodWords

func (ns *NgramService) GoodWords() []string

func (*NgramService) IsGuessing

func (ns *NgramService) IsGuessing() bool

func (*NgramService) LastInput

func (ns *NgramService) LastInput() time.Time

func (*NgramService) MarkGuessing

func (ns *NgramService) MarkGuessing()

func (*NgramService) NextGuess

func (ns *NgramService) NextGuess() (string, error)

func (*NgramService) NumGood

func (ns *NgramService) NumGood() int

func (*NgramService) NumGuesses

func (ns *NgramService) NumGuesses() int

func (*NgramService) NumSubdomains

func (ns *NgramService) NumSubdomains() int

func (*NgramService) OnStart

func (ns *NgramService) OnStart() error

func (*NgramService) OnStop

func (ns *NgramService) OnStop() error

func (*NgramService) SetLastInput

func (ns *NgramService) SetLastInput(last time.Time)

func (*NgramService) StartGuessing

func (ns *NgramService) StartGuessing()

func (*NgramService) Subdomains

func (ns *NgramService) Subdomains() []*AmassRequest

func (*NgramService) Tag

func (ns *NgramService) Tag() string

func (*NgramService) Train

func (ns *NgramService) Train()

type ReverseIPService

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

func NewReverseIPService

func NewReverseIPService(in, out chan *AmassRequest, config *AmassConfig) *ReverseIPService

func (*ReverseIPService) OnStart

func (ris *ReverseIPService) OnStart() error

func (*ReverseIPService) OnStop

func (ris *ReverseIPService) OnStop() error

type ReverseIper

type ReverseIper interface {
	Search(domain, ip string, done chan int)
	fmt.Stringer
}

ReverseIper - represents all types that perform reverse IP lookups

func BingReverseIPSearch

func BingReverseIPSearch(out chan<- *AmassRequest) ReverseIper

func ReverseDNSSearch

func ReverseDNSSearch(out chan<- *AmassRequest) ReverseIper

func ShodanReverseIPSearch

func ShodanReverseIPSearch(out chan<- *AmassRequest) ReverseIper

type Searcher

type Searcher interface {
	Search(domain string, done chan int)
	fmt.Stringer
}

Searcher - represents all types that perform searches for domain names

func AskSearch

func AskSearch(out chan<- *AmassRequest) Searcher

func BaiduSearch

func BaiduSearch(out chan<- *AmassRequest) Searcher

func BingSearch

func BingSearch(out chan<- *AmassRequest) Searcher

func CensysSearch

func CensysSearch(out chan<- *AmassRequest) Searcher

func CrtshSearch

func CrtshSearch(out chan<- *AmassRequest) Searcher

CrtshSearch - A searcher that attempts to discover names from SSL certificates

func DNSDumpsterSearch

func DNSDumpsterSearch(out chan<- *AmassRequest) Searcher

func DogpileSearch

func DogpileSearch(out chan<- *AmassRequest) Searcher

func GoogleSearch

func GoogleSearch(out chan<- *AmassRequest) Searcher

func NetcraftSearch

func NetcraftSearch(out chan<- *AmassRequest) Searcher

func RobtexSearch

func RobtexSearch(out chan<- *AmassRequest) Searcher

func ThreatCrowdSearch

func ThreatCrowdSearch(out chan<- *AmassRequest) Searcher

func VirusTotalSearch

func VirusTotalSearch(out chan<- *AmassRequest) Searcher

func YahooSearch

func YahooSearch(out chan<- *AmassRequest) Searcher

type SubdomainSearchService

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

func NewSubdomainSearchService

func NewSubdomainSearchService(in, out chan *AmassRequest, config *AmassConfig) *SubdomainSearchService

func (*SubdomainSearchService) OnStart

func (sss *SubdomainSearchService) OnStart() error

func (*SubdomainSearchService) OnStop

func (sss *SubdomainSearchService) OnStop() error

type SweepService

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

func NewSweepService

func NewSweepService(in, out chan *AmassRequest, config *AmassConfig) *SweepService

func (*SweepService) AttemptSweep

func (ss *SweepService) AttemptSweep(req *AmassRequest)

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

func (*SweepService) OnStart

func (ss *SweepService) OnStart() error

func (*SweepService) OnStop

func (ss *SweepService) OnStop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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