Documentation ¶
Index ¶
- Constants
- Variables
- func AcquireConfig(dir, file string, cfg *Config) error
- func ExpandMask(word string) ([]string, error)
- func ExpandMaskWordlist(wordlist []string) ([]string, error)
- func GetListFromFile(path string) ([]string, error)
- func GetPublicDNSResolvers() error
- func OutputDirectory(dir ...string) string
- type Config
- func (c *Config) AcquireScripts() ([]string, error)
- func (c *Config) AddDomain(domain string)
- func (c *Config) AddDomains(domains ...string)
- func (c *Config) AddResolver(resolver string)
- func (c *Config) AddResolvers(resolvers ...string)
- func (c *Config) AddTrustedResolver(resolver string)
- func (c *Config) AddTrustedResolvers(resolvers ...string)
- func (c *Config) BlacklistSubdomain(name string)
- func (c *Config) Blacklisted(name string) bool
- func (c *Config) CalcMaxQPS()
- func (c *Config) CheckSettings() error
- func (c *Config) DomainRegex(domain string) *regexp.Regexp
- func (c *Config) Domains() []string
- func (c *Config) GetDataSourceConfig(source string) *DataSourceConfig
- func (c *Config) IsAddressInScope(addr string) bool
- func (c *Config) IsDomainInScope(name string) bool
- func (c *Config) LoadSettings(path string) error
- func (c *Config) LocalDatabaseSettings(dbs []*Database) *Database
- func (c *Config) SetResolvers(resolvers ...string)
- func (c *Config) SetTrustedResolvers(resolvers ...string)
- func (c *Config) UpdateConfig(update Updater) error
- func (c *Config) WhichDomain(name string) string
- type Credentials
- type DataSourceConfig
- type Database
- type Updater
Constants ¶
const DefaultQueriesPerBaselineResolver = 15
DefaultQueriesPerBaselineResolver is the number of queries sent to each trusted DNS resolver per second.
const DefaultQueriesPerPublicResolver = 5
DefaultQueriesPerPublicResolver is the number of queries sent to each public DNS resolver per second.
Variables ¶
var DefaultBaselineResolvers = []string{
"8.8.8.8",
"1.1.1.1",
"9.9.9.9",
"208.67.222.222",
"84.200.69.80",
"64.6.64.6",
"8.26.56.26",
"205.171.3.65",
"134.195.4.2",
"185.228.168.9",
"76.76.19.19",
"37.235.1.177",
"77.88.8.1",
"94.140.14.140",
"38.132.106.139",
"74.82.42.42",
"76.76.2.0",
}
DefaultBaselineResolvers is a list of trusted public DNS resolvers.
var PublicResolvers []string
PublicResolvers includes the addresses of public resolvers obtained dynamically.
Functions ¶
func AcquireConfig ¶
AcquireConfig populates the Config struct provided by the Config argument.
func ExpandMask ¶
ExpandMask will return a slice of words that a "hashcat-style" mask matches.
func ExpandMaskWordlist ¶
ExpandMaskWordlist performs ExpandMask on a slice of words.
func GetListFromFile ¶
GetListFromFile reads a wordlist text or gzip file and returns the slice of words.
func GetPublicDNSResolvers ¶
func GetPublicDNSResolvers() error
GetPublicDNSResolvers obtains the public DNS server addresses from public-dns.info and assigns them to PublicResolvers.
func OutputDirectory ¶
OutputDirectory returns the file path of the Amass output directory. A suitable path provided will be used as the output directory instead.
Types ¶
type Config ¶
type Config struct { sync.Mutex // A Universally Unique Identifier (UUID) for the enumeration UUID uuid.UUID // The pseudo-random number generator Rand *rand.Rand // Logger for error messages Log *log.Logger // The directory that stores the bolt db and other files created Dir string `ini:"output_directory"` // Alternative directory for scripts provided by the user ScriptsDirectory string `ini:"scripts_directory"` // The graph databases used by the system / enumerations GraphDBs []*Database // The maximum number of concurrent DNS queries MaxDNSQueries int `ini:"maximum_dns_queries"` // Names provided to seed the enumeration ProvidedNames []string // The IP addresses specified as in scope Addresses []net.IP // CIDR that is in scope CIDRs []*net.IPNet // ASNs specified as in scope ASNs []int // 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 // Maximum depth for bruteforcing MaxDepth int // Will discovered subdomain name alterations be generated? Alterations bool FlipWords bool FlipNumbers bool AddWords bool AddNumbers bool MinForWordFlip int EditDistance int AltWordlist []string // Only access the data sources for names and return results? Passive bool // Determines if zone transfers will be attempted Active bool // A blacklist of subdomain names that will not be investigated Blacklist []string // A list of data sources that should not be utilized SourceFilter struct { Include bool // true = include, false = exclude Sources []string } // The minimum number of minutes that data source responses will be reused MinimumTTL int // Type of DNS records to query for RecordTypes []string // Resolver settings Resolvers []string ResolversQPS int TrustedResolvers []string TrustedQPS int // Option for verbose logging and output Verbose bool // contains filtered or unexported fields }
Config passes along Amass configuration settings and options.
func (*Config) AcquireScripts ¶
AcquireScripts returns all the default and user provided scripts for data sources.
func (*Config) AddDomain ¶
AddDomain appends the domain name provided in the parameter to the list in the configuration.
func (*Config) AddDomains ¶
AddDomains appends the domain names provided in the parameter to the list in the configuration.
func (*Config) AddResolver ¶
AddResolver appends the untrusted resolver name provided in the parameter to the list in the configuration.
func (*Config) AddResolvers ¶
AddResolvers appends the untrusted resolver names provided in the parameter to the list in the configuration.
func (*Config) AddTrustedResolver ¶
AddTrustedResolver appends the trusted resolver name provided in the parameter to the list in the configuration.
func (*Config) AddTrustedResolvers ¶
AddTrustedResolvers appends the trusted resolver names provided in the parameter to the list in the configuration.
func (*Config) BlacklistSubdomain ¶
BlacklistSubdomain adds a subdomain name to the config blacklist.
func (*Config) Blacklisted ¶
Blacklisted returns true is the name in the parameter ends with a subdomain name in the config blacklist.
func (*Config) CalcMaxQPS ¶
func (c *Config) CalcMaxQPS()
CalcMaxQPS updates the MaxDNSQueries field of the configuration based on current settings.
func (*Config) CheckSettings ¶
CheckSettings runs some sanity checks on the configuration options selected.
func (*Config) DomainRegex ¶
DomainRegex returns the Regexp object for the domain name identified by the parameter.
func (*Config) GetDataSourceConfig ¶
func (c *Config) GetDataSourceConfig(source string) *DataSourceConfig
GetDataSourceConfig returns the DataSourceConfig associated with the data source name argument.
func (*Config) IsAddressInScope ¶
IsAddressInScope returns true if the addr parameter matches provided network scope and when no network scope has been set.
func (*Config) IsDomainInScope ¶
IsDomainInScope returns true if the DNS name in the parameter ends with a domain in the config list.
func (*Config) LoadSettings ¶
LoadSettings parses settings from an .ini file and assigns them to the Config.
func (*Config) LocalDatabaseSettings ¶
LocalDatabaseSettings returns the Database for the local bolt store.
func (*Config) SetResolvers ¶
SetResolvers assigns the untrusted resolver names provided in the parameter to the list in the configuration.
func (*Config) SetTrustedResolvers ¶
SetTrustedResolvers assigns the trusted resolver names provided in the parameter to the list in the configuration.
func (*Config) UpdateConfig ¶
UpdateConfig allows the provided Updater to update the current configuration.
func (*Config) WhichDomain ¶
WhichDomain returns the domain in the config list that the DNS name in the parameter ends with.
type Credentials ¶
type Credentials struct { Name string Username string `ini:"username"` Password string `ini:"password"` Key string `ini:"apikey"` Secret string `ini:"secret"` }
Credentials contains values required for authenticating with web APIs.
type DataSourceConfig ¶
type DataSourceConfig struct { Name string TTL int `ini:"ttl"` // contains filtered or unexported fields }
DataSourceConfig contains the configurations specific to a data source.
func (*DataSourceConfig) AddCredentials ¶
func (dsc *DataSourceConfig) AddCredentials(cred *Credentials) error
AddCredentials adds the Credentials provided to the configuration.
func (*DataSourceConfig) GetCredentials ¶
func (dsc *DataSourceConfig) GetCredentials() *Credentials
GetCredentials returns randomly selected Credentials associated with the receiver configuration.
type Database ¶
type Database struct { System string Primary bool `ini:"primary"` URL string `ini:"url"` Username string `ini:"username"` Password string `ini:"password"` DBName string `ini:"database"` Options string `ini:"options"` }
Database contains values required for connecting with graph databases.