Documentation ¶
Index ¶
- Constants
- Variables
- func FindBingSearchPath(key string) (string, error)
- func GetWildCard(domain, serverAddr string) string
- func GetWildCard6(domain, serverAddr string) string
- func LookupCname(fqdn, serverAddr string) (string, error)
- func LookupIP(ip, serverAddr string) ([]string, error)
- func LookupMX(domain, serverAddr string) ([]string, error)
- func LookupNS(domain, serverAddr string) ([]string, error)
- func LookupName(fqdn, serverAddr string) (string, error)
- func LookupName6(fqdn, serverAddr string) (string, error)
- func LookupSRV(fqdn, dnsServer string) (string, error)
- type C
- type Result
- type Results
- type Tsk
- func AXFR(domain, serverAddr string) *Tsk
- func BingAPIDomain(domain, key, path, server string) *Tsk
- func BingAPIIP(ip, key, path string) *Tsk
- func BingDomain(domain, server string) *Tsk
- func BingIP(ip string) *Tsk
- func CensysDomain(domain, auth string) *Tsk
- func CensysIP(ip, auth string) *Tsk
- func Dictionary(domain, subname, blacklist, serverAddr string) *Tsk
- func Dictionary6(domain, subname, blacklist, serverAddr string) *Tsk
- func ExfiltratedHostname(domain, server string) *Tsk
- func Headers(ip string, timeout int64) *Tsk
- func LogonTubeAPI(search string) *Tsk
- func MX(domain, serverAddr string) *Tsk
- func NS(domain, serverAddr string) *Tsk
- func Reverse(ip, serverAddr string) *Tsk
- func SRV(domain, dnsServer string) *Tsk
- func ShodanAPIHostSearch(domain string, key string) *Tsk
- func ShodanAPIReverse(ips []string, key string) *Tsk
- func TLS(ip string, timeout int64) *Tsk
- func ViewDNSInfo(ip string) *Tsk
- func ViewDNSInfoAPI(ip, key string) *Tsk
- func YandexAPI(domain, apiURL, serverAddr string) *Tsk
Constants ¶
const VERSION = "3.0.1"
VERSION is the version of blacksheepwall.
Variables ¶
var DomainRegex = `^\.?[a-z\d]+(?:(?:[a-z\d]*)|(?:[a-z\d\-]*[a-z\d]))(?:\.[a-z\d]+(?:(?:[a-z\d]*)|(?:[a-z\d\-]*[a-z\d])))*$`
DomainRegex is used to validate a hostname to ensure it is legitimate.
Functions ¶
func FindBingSearchPath ¶
FindBingSearchPath attempts an authenticated search request to two different Bing API paths. If and when a search is successfull, that path will be returned. If no path is valid this function returns an error.
func GetWildCard ¶
GetWildCard searches for a possible wild card host by attempting to get an A record for wildcardsub + domain.
func GetWildCard6 ¶
GetWildCard6 searches for a possible wild card host by attempting to get an AAAA record wildcardsub + domain.
func LookupCname ¶
LookupCname returns a fqdn address from CNAME record or error.
func LookupName ¶
LookupName returns IPv4 address from A record or error.
func LookupName6 ¶
LookupName6 returns a IPv6 address from AAAA record or error.
Types ¶
type C ¶
type C struct { Timeout int64 `yaml:"timeout"` Concurrency int `yaml:"concurrency"` Validate bool `yaml:"validate"` IPv6 bool `yaml:"ipv6"` Server string `yaml:"server"` Reverse bool `yaml:"reverse"` Headers bool `yaml:"headers"` TLS bool `yaml:"tls"` AXFR bool `yaml:"axfr"` MX bool `yaml:"mx"` NS bool `yaml:"ns"` ViewDNSInfo bool `yaml:"viewdns_html"` ViewDNSInfoAPI string `yaml:"viewdns"` Robtex bool `yaml:"robtex"` LogonTube bool `yaml:"logontube"` SRV bool `yaml:"srv"` Bing string `yaml:"bing"` BingHTML bool `yaml:"bing_html"` Shodan string `yaml:"shodan"` Censys string `yaml:"censys"` Yandex string `yaml:"yandex"` Exfil bool `yaml:"exfiltrated"` DictFile string `yaml:"dictionary"` FCRDNS bool `yaml:"fcrdns"` }
C is used to parse a YAML config file.
func ReadConfig ¶
ReadConfig parses a yaml file and returns a pointer to a new config.
type Result ¶
type Result struct { Source string `json:"src"` IP string `json:"ip"` Hostname string `json:"hostname"` }
Result is used to store a single IP and Hostname record.
type Results ¶
type Results []Result
Results is a slice of Result.
type Tsk ¶
type Tsk struct {
// contains filtered or unexported fields
}
Tsk is used to return the results of a task to the caller.
func BingAPIDomain ¶
BingAPIDomain uses the bing search API and 'domain' search operator to find hostnames for a single domain.
func BingAPIIP ¶
BingAPIIP uses the bing search API and 'ip' search operator to find alternate hostnames for a single IP.
func BingDomain ¶
BingDomain uses bing's 'domain:' search operator and scrapes the HTML to find ips and hostnames for a domain.
func BingIP ¶
BingIP uses bing's 'ip:' search operator and scrapes the HTML to find hostnames for an ip.
func CensysDomain ¶
CensysDomain search censys.io for a particular domain. After a list of IP addresses are found to be matching the domain, each ip in the list is looked up using the 'view' search. This TLS certificates for each IP, hostnames are gathers from these TLS certificates.
func CensysIP ¶
CensysIP search an ip using censys.io's ipv4 view. Hostnames are extracted from previously gathered TLS certificates.
func Dictionary ¶
Dictionary attempts to get an A and CNAME record for a sub domain of domain.
func Dictionary6 ¶
Dictionary6 attempts to get an AAAA record for a sub domain of a domain.
func ExfiltratedHostname ¶
ExfiltratedHostname uses exfiltrated.com's hostname search to identify possible hostnames for a domain. Each returned hostname is then resolved to the current IP.
func Headers ¶
Headers uses attempts to connect to IP over http(s). If connection is successfull return any hostnames from the possible 'Location' headers.
func LogonTubeAPI ¶
LogonTubeAPI sends either a domain or IP to logontube.com's API.
func SRV ¶
SRV iterates over a list of common SRV records, returning hostname and IP results for each.
func ShodanAPIHostSearch ¶
ShodanAPIHostSearch uses Shodan's '/shodan/host/search' REST API endpoint to find hostnames and ip addresses for a domain.
func ShodanAPIReverse ¶
ShodanAPIReverse uses Shodan's '/dns/reverse' REST API to get hostnames for a list of ips.
func TLS ¶
TLS attempts connection to an IP using TLS on port 443, and if successfull, will parse the server certificate for CommonName and SubjectAlt names.
func ViewDNSInfo ¶
ViewDNSInfo uses viewdns.info's reverseip functionality, parsing the HTML table for hostnames.
func ViewDNSInfoAPI ¶
ViewDNSInfoAPI uses viewdns.iinfo's API and reverseip function to find hostnames for an ip.
func YandexAPI ¶
YandexAPI uses Yandex XML API and the 'rhost' search operator to find subdomains of a given domain.
func (*Tsk) HasResults ¶
HasResults return true if len of results is greater than 0.