Documentation ¶
Index ¶
- Constants
- func AnySubdomainRegex() *regexp.Regexp
- func CIDRSubset(cidr *net.IPNet, addr string, num int) []string
- func CheckConfig(config *AmassConfig) error
- func GetARecordData(answers []DNSAnswer) string
- func GetDefaultWordlist() []string
- func GetWebPageWithDialContext(dc dialCtx, u string) string
- func NetHosts(cidr *net.IPNet) []string
- func NewUniqueElements(orig []string, add ...string) []string
- func NextNameserver() string
- func RangeHosts(start, end net.IP) []string
- func ReverseDNSWithDialContext(dc dialCtx, ip string) (string, error)
- func ReverseIP(ip string) string
- func StartEnumeration(config *AmassConfig) error
- func SubdomainRegex(domain string) *regexp.Regexp
- func UniqueAppend(orig []string, add ...string) []string
- type ASRecord
- type ActiveCertService
- type AlterationService
- type AmassConfig
- func (c *AmassConfig) AddDomains(names []string)
- func (c *AmassConfig) DNSDialContext(ctx context.Context, network, address string) (net.Conn, error)
- func (c *AmassConfig) DialContext(ctx context.Context, network, address string) (net.Conn, error)
- func (c *AmassConfig) Domains() []string
- func (c *AmassConfig) Setup()
- func (c *AmassConfig) SetupProxyConnection(addr string) error
- type AmassRequest
- type AmassService
- type ArchiveService
- type Archiver
- func ArchiveIsArchive(out chan<- *AmassRequest) Archiver
- func ArchiveItArchive(out chan<- *AmassRequest) Archiver
- func ArquivoArchive(out chan<- *AmassRequest) Archiver
- func LibraryCongressArchive(out chan<- *AmassRequest) Archiver
- func MementoWebArchive(u, name string, out chan<- *AmassRequest) Archiver
- func UKGovArchive(out chan<- *AmassRequest) Archiver
- func UKWebArchive(out chan<- *AmassRequest) Archiver
- func WaybackMachineArchive(out chan<- *AmassRequest) Archiver
- type BaseAmassService
- func (bas *BaseAmassService) Config() *AmassConfig
- func (bas *BaseAmassService) Input() <-chan *AmassRequest
- func (bas *BaseAmassService) IsActive() bool
- func (bas *BaseAmassService) IsStarted() bool
- func (bas *BaseAmassService) IsStopped() bool
- func (bas *BaseAmassService) OnStart() error
- func (bas *BaseAmassService) OnStop() error
- func (bas *BaseAmassService) Output() chan<- *AmassRequest
- func (bas *BaseAmassService) Quit() <-chan struct{}
- func (bas *BaseAmassService) SendOut(req *AmassRequest)
- func (bas *BaseAmassService) SetActive(active bool)
- func (bas *BaseAmassService) SetStarted()
- func (bas *BaseAmassService) SetStopped()
- func (bas *BaseAmassService) Start() error
- func (bas *BaseAmassService) Stop() error
- func (bas *BaseAmassService) String() string
- type BruteForceService
- type DNSAnswer
- type DNSService
- type DomainLookup
- type DomainRequest
- type IPHistoryService
- type NetblockService
- func (ns *NetblockService) ASNRequest(r *cacheRequest)
- func (ns *NetblockService) CIDRRequest(r *cacheRequest)
- func (ns *NetblockService) FetchOnlineData(addr string, asn int) *ASRecord
- func (ns *NetblockService) FetchOnlineNetblockData(asn int) []string
- func (ns *NetblockService) IPRequest(r *cacheRequest)
- func (ns *NetblockService) OnStart() error
- func (ns *NetblockService) OnStop() error
- type NgramService
- func (ns *NgramService) AddGoodWords(words []string)
- func (ns *NgramService) GoodWords() []string
- func (ns *NgramService) IsGuessing() bool
- func (ns *NgramService) LastInput() time.Time
- func (ns *NgramService) MarkGuessing()
- func (ns *NgramService) NextGuess() (string, error)
- func (ns *NgramService) NumGood() int
- func (ns *NgramService) NumGuesses() int
- func (ns *NgramService) NumSubdomains() int
- func (ns *NgramService) OnStart() error
- func (ns *NgramService) OnStop() error
- func (ns *NgramService) SetLastInput(last time.Time)
- func (ns *NgramService) StartGuessing()
- func (ns *NgramService) Subdomains() []*AmassRequest
- func (ns *NgramService) Tag() string
- func (ns *NgramService) Train()
- type ReverseDNSService
- type Scraper
- func AskScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func BaiduScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func BingScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func CensysScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func CrtshScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func DNSDumpsterScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func DogpileScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func GoogleScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func NetcraftScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func RobtexScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func ThreatCrowdScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func VirusTotalScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func YahooScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- type ScraperService
- type SweepService
- type Wildcards
Constants ¶
const ( Version string = "v1.3.1" Author string = "Jeff Foley (@jeff_foley)" // Tags used to mark the data source with the Subdomain struct ALT = "alt" BRUTE = "brute" SCRAPE = "scrape" 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" )
const ( TypeNorm int = iota TypeNS TypeMX TypeWeb )
Node types used in the Maltego local transform
Variables ¶
This section is empty.
Functions ¶
func AnySubdomainRegex ¶ added in v1.2.0
func CIDRSubset ¶ added in v1.2.1
getCIDRSubset - Returns a subset of the hosts slice with num elements around the addr element
func CheckConfig ¶
func CheckConfig(config *AmassConfig) error
func GetARecordData ¶ added in v1.3.0
Goes through the DNS answers looking for A and AAAA records, and returns the first Data field found for those types
func GetDefaultWordlist ¶
func GetDefaultWordlist() []string
func GetWebPageWithDialContext ¶ added in v1.3.0
func NetHosts ¶ added in v1.2.0
Obtained/modified the next two functions from the following: https://gist.github.com/kotakanbe/d3059af990252ba89a82
func NewUniqueElements ¶
NewUniqueElements - Removes elements that have duplicates in the original or new elements
func RangeHosts ¶ added in v1.2.0
func ReverseDNSWithDialContext ¶ added in v1.3.0
func StartEnumeration ¶ added in v1.3.0
func StartEnumeration(config *AmassConfig) error
func SubdomainRegex ¶
func UniqueAppend ¶
UniqueAppend - Behaves like the Go append, but does not add duplicate elements
Types ¶
type ActiveCertService ¶ added in v1.2.0
type ActiveCertService struct { BaseAmassService // contains filtered or unexported fields }
func NewActiveCertService ¶ added in v1.2.0
func NewActiveCertService(in, out chan *AmassRequest, config *AmassConfig) *ActiveCertService
func (*ActiveCertService) OnStart ¶ added in v1.2.0
func (acs *ActiveCertService) OnStart() error
func (*ActiveCertService) OnStop ¶ added in v1.2.0
func (acs *ActiveCertService) OnStop() error
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 { sync.Mutex // 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 // 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 // Will discovered subdomain name alterations be generated? Alterations bool // Sets the maximum number of DNS queries per minute Frequency time.Duration // The channel that will receive the results Output chan *AmassRequest // Indicate that Amass cannot add domains to the config AdditionalDomains bool // 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) AddDomains ¶ added in v1.2.0
func (c *AmassConfig) AddDomains(names []string)
func (*AmassConfig) DNSDialContext ¶ added in v1.3.0
func (*AmassConfig) DialContext ¶ added in v1.3.0
func (*AmassConfig) Domains ¶
func (c *AmassConfig) Domains() []string
func (*AmassConfig) Setup ¶ added in v1.3.0
func (c *AmassConfig) Setup()
func (*AmassConfig) SetupProxyConnection ¶ added in v1.3.0
func (c *AmassConfig) SetupProxyConnection(addr string) error
type AmassRequest ¶
type AmassRequest struct { // The subdomain name Name string // The type of host that this name refers to Type int // 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 // contains filtered or unexported fields }
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 ¶
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 ¶ added in v1.1.0
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 DNSAnswer ¶ added in v1.3.0
type DNSAnswer struct { Name string `json:"name"` Type int `json:"type"` TTL int `json:"TTL"` Data string `json:"data"` }
func DNSExchangeConn ¶ added in v1.3.1
DNSExchange - Encapsulates miekg/dns usage
func ResolveDNSWithDialContext ¶ added in v1.3.0
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 DomainLookup ¶ added in v1.3.0
type DomainLookup struct { // Requests are sent here to check the root domain of a subdomain name Requests chan *DomainRequest // The configuration being used by the amass enumeration Config *AmassConfig }
func NewDomainLookup ¶ added in v1.3.0
func NewDomainLookup(config *AmassConfig) *DomainLookup
func (*DomainLookup) SubdomainToDomain ¶ added in v1.3.0
func (dl *DomainLookup) SubdomainToDomain(name string) string
type DomainRequest ¶ added in v1.3.0
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) ASNRequest ¶ added in v1.3.1
func (ns *NetblockService) ASNRequest(r *cacheRequest)
func (*NetblockService) CIDRRequest ¶ added in v1.3.1
func (ns *NetblockService) CIDRRequest(r *cacheRequest)
func (*NetblockService) FetchOnlineData ¶ added in v1.3.0
func (ns *NetblockService) FetchOnlineData(addr string, asn int) *ASRecord
func (*NetblockService) FetchOnlineNetblockData ¶ added in v1.3.0
func (ns *NetblockService) FetchOnlineNetblockData(asn int) []string
func (*NetblockService) IPRequest ¶ added in v1.3.1
func (ns *NetblockService) IPRequest(r *cacheRequest)
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 ReverseDNSService ¶ added in v1.3.0
type ReverseDNSService struct { BaseAmassService // contains filtered or unexported fields }
func NewReverseDNSService ¶ added in v1.3.0
func NewReverseDNSService(in, out chan *AmassRequest, config *AmassConfig) *ReverseDNSService
func (*ReverseDNSService) OnStart ¶ added in v1.3.0
func (rds *ReverseDNSService) OnStart() error
func (*ReverseDNSService) OnStop ¶ added in v1.3.0
func (rds *ReverseDNSService) OnStop() error
type Scraper ¶ added in v1.3.0
Searcher - represents all types that perform searches for domain names
func AskScrape ¶ added in v1.3.1
func AskScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func BaiduScrape ¶ added in v1.3.1
func BaiduScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func BingScrape ¶ added in v1.3.1
func BingScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func CensysScrape ¶ added in v1.3.1
func CensysScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func CrtshScrape ¶ added in v1.3.1
func CrtshScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
CrtshSearch - A searcher that attempts to discover names from SSL certificates
func DNSDumpsterScrape ¶ added in v1.3.1
func DNSDumpsterScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func DogpileScrape ¶ added in v1.3.1
func DogpileScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func GoogleScrape ¶ added in v1.3.1
func GoogleScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func NetcraftScrape ¶ added in v1.3.1
func NetcraftScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func RobtexScrape ¶ added in v1.3.1
func RobtexScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func ThreatCrowdScrape ¶ added in v1.3.1
func ThreatCrowdScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func VirusTotalScrape ¶ added in v1.3.1
func VirusTotalScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func YahooScrape ¶ added in v1.3.1
func YahooScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
type ScraperService ¶ added in v1.3.0
type ScraperService struct { BaseAmassService // contains filtered or unexported fields }
func NewScraperService ¶ added in v1.3.0
func NewScraperService(in, out chan *AmassRequest, config *AmassConfig) *ScraperService
func (*ScraperService) OnStart ¶ added in v1.3.0
func (ss *ScraperService) OnStart() error
func (*ScraperService) OnStop ¶ added in v1.3.0
func (ss *ScraperService) 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
type Wildcards ¶ added in v1.3.0
type Wildcards struct { // Requests are sent through this channel to check DNS wildcard matches Request chan *wildcard // The amass enumeration configuration Config *AmassConfig }
func NewWildcardDetection ¶ added in v1.3.0
func NewWildcardDetection(config *AmassConfig) *Wildcards
func (*Wildcards) DetectWildcard ¶ added in v1.3.0
func (wd *Wildcards) DetectWildcard(req *AmassRequest) bool
DetectWildcard - Checks subdomains in the wildcard cache for matches on the IP address