Documentation ¶
Index ¶
- Constants
- Variables
- func AnySubdomainRegex() *regexp.Regexp
- func CIDRRequest(cidr *net.IPNet) (int, string)
- func CIDRSubset(cidr *net.IPNet, addr string, num int) []net.IP
- func CheckConfig(config *AmassConfig) error
- func DNSDialContext(ctx context.Context, network, address string) (net.Conn, error)
- func DialContext(ctx context.Context, network, address string) (net.Conn, error)
- func GetARecordData(answers []DNSAnswer) string
- func GetDefaultWordlist() []string
- func GetWebPageWithDialContext(dc dialCtx, u string, hvals map[string]string) string
- func IPRequest(addr string) (int, *net.IPNet, string)
- func IPv6NibbleFormat(ip string) string
- func LookupIPHistory(domain string) []string
- func NetHosts(cidr *net.IPNet) []net.IP
- func NewUniqueElements(orig []string, add ...string) []string
- func NextResolverAddress() string
- func PullCertificate(addr string, config *AmassConfig, add bool)
- func RangeHosts(start, end net.IP) []net.IP
- func ReverseDNS(ip string) (string, error)
- func ReverseIP(ip string) string
- func ReverseWhois(domain string) []string
- func SetCustomResolvers(resolvers []string)
- func StartEnumeration(config *AmassConfig) error
- func SubdomainRegex(domain string) *regexp.Regexp
- func UniqueAppend(orig []string, add ...string) []string
- type ASRecord
- type AlterationService
- type AmassAddressInfo
- type AmassConfig
- type AmassOutput
- 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) IsActive() bool
- func (bas *BaseAmassService) IsStarted() bool
- func (bas *BaseAmassService) IsStopped() bool
- func (bas *BaseAmassService) NextRequest() *AmassRequest
- func (bas *BaseAmassService) OnStart() error
- func (bas *BaseAmassService) OnStop() error
- func (bas *BaseAmassService) Quit() <-chan struct{}
- func (bas *BaseAmassService) SendRequest(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 DataManagerService
- type Edge
- type Graph
- type Neo4j
- type Node
- 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 CertDBScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func CertSpotterScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func CrtshScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func DNSDBScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func DNSDumpsterScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func DogpileScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func ExaleadScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func FindSubDomainsScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func GoogleScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func HackerTargetScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func NetcraftScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func PTRArchiveScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func RiddlerScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func RobtexScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func SiteDossierScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func ThreatCrowdScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func ThreatMinerScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func VirusTotalScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- func YahooScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
- type ScraperService
Constants ¶
const ( Version string = "v2.1.0" 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" // Node types used in the Maltego local transform TypeNorm int = iota TypeNS TypeMX TypeWeb )
const ( // 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 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 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 HTMLEnd string = `` /* 151-byte string literal not displayed */
const HTMLStart string = `` /* 1589-byte string literal not displayed */
Variables ¶
var ( // Public & free DNS servers PublicResolvers = []string{ "1.1.1.1:53", "8.8.8.8:53", "64.6.64.6:53", "208.67.222.222:53", "77.88.8.8:53", "74.82.42.42:53", "1.0.0.1:53", "8.8.4.4:53", "208.67.220.220:53", "77.88.8.1:53", } CustomResolvers = []string{} )
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 DNSDialContext ¶
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 IPv6NibbleFormat ¶
func LookupIPHistory ¶
LookupIPHistory - Attempts to obtain IP addresses used by a root domain name
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 NextResolverAddress ¶
func NextResolverAddress() string
NextResolverAddress - Requests the next server
func PullCertificate ¶
func PullCertificate(addr string, config *AmassConfig, add bool)
pullCertificate - Attempts to pull a cert from several ports on an IP
func ReverseDNS ¶
func ReverseWhois ¶
-------------------------------------------------------------------------------------------------- ReverseWhois - Returns domain names that are related to the domain provided
func SetCustomResolvers ¶
func SetCustomResolvers(resolvers []string)
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 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 ¶
type AlterationService ¶
type AlterationService struct {
BaseAmassService
}
func NewAlterationService ¶
func NewAlterationService(config *AmassConfig) *AlterationService
func (*AlterationService) OnStart ¶
func (as *AlterationService) OnStart() error
func (*AlterationService) OnStop ¶
func (as *AlterationService) OnStop() error
type AmassAddressInfo ¶
type AmassConfig ¶
type AmassConfig struct { sync.Mutex Graph *Graph // The channel that will receive the results Output chan *AmassOutput // 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 // Minimum number of subdomain discoveries before performing recursive brute forcing MinForRecursive int // Will discovered subdomain name alterations be generated? Alterations bool // Determines if active information gathering techniques will be used Active 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) AddDomains ¶ added in v1.2.0
func (c *AmassConfig) AddDomains(names []string)
func (*AmassConfig) Blacklisted ¶ added in v1.4.0
func (c *AmassConfig) Blacklisted(name string) bool
func (*AmassConfig) Domains ¶
func (c *AmassConfig) Domains() []string
func (*AmassConfig) IsDomainInScope ¶
func (c *AmassConfig) IsDomainInScope(name string) bool
type AmassOutput ¶
type AmassRequest ¶
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 NextRequest() *AmassRequest SendRequest(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(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) IsActive ¶
func (bas *BaseAmassService) IsActive() bool
func (*BaseAmassService) IsStarted ¶
func (bas *BaseAmassService) IsStarted() bool
func (*BaseAmassService) IsStopped ¶
func (bas *BaseAmassService) IsStopped() bool
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(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(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 ResolveDNS ¶
type DNSService ¶
type DNSService struct { BaseAmassService // contains filtered or unexported fields }
func NewDNSService ¶
func NewDNSService(config *AmassConfig) *DNSService
func (*DNSService) DetectWildcard ¶
func (ds *DNSService) DetectWildcard(req *AmassRequest) bool
DetectWildcard - Checks subdomains in the wildcard cache for matches on the IP address
func (*DNSService) OnStart ¶
func (ds *DNSService) OnStart() error
func (*DNSService) OnStop ¶
func (ds *DNSService) OnStop() error
func (*DNSService) SubdomainToDomain ¶
func (ds *DNSService) SubdomainToDomain(name string) string
type DataManagerService ¶
type DataManagerService struct { BaseAmassService // contains filtered or unexported fields }
func NewDataManagerService ¶
func NewDataManagerService(config *AmassConfig) *DataManagerService
func (*DataManagerService) AttemptSweep ¶
func (dms *DataManagerService) AttemptSweep(name, 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 Graph ¶
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 CertDBScrape ¶ added in v1.3.2
func CertDBScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
CrtshSearch - A searcher that attempts to discover names from SSL certificates
func CertSpotterScrape ¶ added in v1.5.0
func CertSpotterScrape(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 DNSDBScrape ¶ added in v1.5.1
func DNSDBScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
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 ExaleadScrape ¶ added in v1.5.0
func ExaleadScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func FindSubDomainsScrape ¶ added in v1.3.2
func FindSubDomainsScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func GoogleScrape ¶ added in v1.3.1
func GoogleScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func HackerTargetScrape ¶ added in v1.3.2
func HackerTargetScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func NetcraftScrape ¶ added in v1.3.1
func NetcraftScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func PTRArchiveScrape ¶ added in v1.3.2
func PTRArchiveScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func RiddlerScrape ¶ added in v1.5.0
func RiddlerScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func RobtexScrape ¶ added in v1.3.1
func RobtexScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func SiteDossierScrape ¶ added in v1.5.0
func SiteDossierScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func ThreatCrowdScrape ¶ added in v1.3.1
func ThreatCrowdScrape(out chan<- *AmassRequest, config *AmassConfig) Scraper
func ThreatMinerScrape ¶ added in v1.5.1
func ThreatMinerScrape(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(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