Documentation ¶
Index ¶
- Constants
- Variables
- func CheckForDoEProtocol(scanId string, targetName string, protocol string, ...) (svcbRR *svcb.SVCBRR, errColl []custom_errors.DoEErrors)
- type CanaryScan
- type CanaryScanMetaInformation
- type CertificateScan
- type CertificateScanMetaInformation
- type DDRDNSSECScan
- type DDRDNSSECScanMetaInformation
- type DDRScan
- func (scan *DDRScan) CreateScansFromResponse() ([]Scan, []custom_errors.DoEErrors)
- func (scan *DDRScan) GetIdentifier() string
- func (scan *DDRScan) GetMetaInformation() *ScanMetaInformation
- func (scan *DDRScan) GetScanId() string
- func (scan *DDRScan) GetType() string
- func (scan *DDRScan) Marshal() (bytes []byte, err error)
- type DDRScanMetaInformation
- type DoEScan
- type DoHScan
- type DoHScanMetaInformation
- type DoQScan
- type DoQScanMetaInformation
- type DoTScan
- type DoTScanMetaInformation
- type EDSRHop
- type EDSRResult
- type EDSRScan
- type EDSRScanMetaInformation
- type FingerprintScan
- type FingerprintScanMetaInformation
- type GlueRecord
- type PTRScan
- type PTRScanMetaInformation
- type Scan
- type ScanCache
- type ScanMetaInformation
- func (smi *ScanMetaInformation) AddError(err ...custom_errors.DoEErrors)
- func (smi *ScanMetaInformation) GenerateRunId()
- func (smi *ScanMetaInformation) GenerateScanId()
- func (smi *ScanMetaInformation) Schedule()
- func (smi *ScanMetaInformation) SetFinished()
- func (smi *ScanMetaInformation) SetScheduled()
- func (smi *ScanMetaInformation) SetStarted()
- type ScanRunCache
Constants ¶
View Source
const CANARY_APPLE_DOMAIN_MASK = "mask.icloud.com."
View Source
const CANARY_APPLE_DOMAIN_MASK_H2 = "mask-h2.icloud.com."
View Source
const CANARY_MOZILLA_DOMAIN = "use-application-dns.net."
View Source
const CANARY_SCAN_TYPE = "canary"
View Source
const CERTIFICATE_SCAN_TYPE = "certificate"
View Source
const DDR_DNSSEC_SCAN_TYPE = "DDR_DNSSEC"
View Source
const DDR_SCAN_TYPE = "DDR"
View Source
const DOH_SCAN_TYPE = "DoH"
View Source
const DOQ_SCAN_TYPE = "DoQ"
View Source
const DOT_SCAN_TYPE = "DoT"
View Source
const EDSR_SCAN_TYPE = "EDSR"
View Source
const FINGERPRINT_SCAN_TYPE = "fingerprint"
View Source
const PTR_SCAN_TYPE = "PTR"
View Source
const SCAN_CACHE_TIME = 36 * time.Hour
the time a scan usually takes
Variables ¶
View Source
var CANARY_DOMAINS = []string{ CANARY_MOZILLA_DOMAIN, }
nolint: gochecknoglobals
Functions ¶
func CheckForDoEProtocol ¶
func CheckForDoEProtocol(scanId string, targetName string, protocol string, res *query.ConventionalDNSResponse) (svcbRR *svcb.SVCBRR, errColl []custom_errors.DoEErrors)
Types ¶
type CanaryScan ¶
type CanaryScan struct { Scan Meta *CanaryScanMetaInformation `json:"meta"` Query *query.ConventionalDNSQuery `json:"query"` Result *query.ConventionalDNSResponse `json:"result"` }
func NewCanaryScan ¶
func NewCanaryScan(q *query.ConventionalDNSQuery, runId string, vantagePoint string) *CanaryScan
func (*CanaryScan) GetIdentifier ¶
func (scan *CanaryScan) GetIdentifier() string
func (*CanaryScan) GetMetaInformation ¶
func (scan *CanaryScan) GetMetaInformation() *ScanMetaInformation
func (*CanaryScan) GetScanId ¶
func (scan *CanaryScan) GetScanId() string
func (*CanaryScan) GetType ¶
func (scan *CanaryScan) GetType() string
func (*CanaryScan) Marshal ¶
func (scan *CanaryScan) Marshal() (bytes []byte, err error)
type CanaryScanMetaInformation ¶
type CanaryScanMetaInformation struct { IpVersion string `json:"ip_version"` ScanMetaInformation }
type CertificateScan ¶
type CertificateScan struct { Scan Meta *CertificateScanMetaInformation `json:"meta"` Query *query.CertificateQuery `json:"query"` Result *query.CertificateResponse `json:"result"` }
func NewCertificateScan ¶
func NewCertificateScan(q *query.CertificateQuery, rootScanId, parentScanId, runId, vantagePoint string) *CertificateScan
func (*CertificateScan) GetIdentifier ¶
func (scan *CertificateScan) GetIdentifier() string
func (*CertificateScan) GetMetaInformation ¶
func (scan *CertificateScan) GetMetaInformation() *ScanMetaInformation
func (*CertificateScan) GetScanId ¶
func (scan *CertificateScan) GetScanId() string
func (*CertificateScan) GetType ¶
func (scan *CertificateScan) GetType() string
func (*CertificateScan) Marshal ¶
func (scan *CertificateScan) Marshal() (bytes []byte, err error)
type CertificateScanMetaInformation ¶
type CertificateScanMetaInformation struct {
ScanMetaInformation
}
type DDRDNSSECScan ¶
type DDRDNSSECScan struct { Scan Meta *DDRDNSSECScanMetaInformation `json:"meta"` Query *query.ConventionalDNSQuery `json:"query"` Result *query.ConventionalDNSResponse `json:"result"` }
func NewDDRDNSSECScan ¶
func NewDDRDNSSECScan(targetName, host, parentScanId, rootScanId, runId, vantagePoint string) *DDRDNSSECScan
func (*DDRDNSSECScan) GetIdentifier ¶
func (scan *DDRDNSSECScan) GetIdentifier() string
func (*DDRDNSSECScan) GetMetaInformation ¶
func (scan *DDRDNSSECScan) GetMetaInformation() *ScanMetaInformation
func (*DDRDNSSECScan) GetScanId ¶
func (scan *DDRDNSSECScan) GetScanId() string
func (*DDRDNSSECScan) GetType ¶
func (scan *DDRDNSSECScan) GetType() string
func (*DDRDNSSECScan) Marshal ¶
func (scan *DDRDNSSECScan) Marshal() (bytes []byte, err error)
type DDRDNSSECScanMetaInformation ¶
type DDRDNSSECScanMetaInformation struct { ScanMetaInformation OriginTargetName string }
type DDRScan ¶
type DDRScan struct { Scan Meta *DDRScanMetaInformation `json:"meta"` Query *query.ConventionalDNSQuery `json:"query"` Result *query.ConventionalDNSResponse `json:"result"` }
func NewDDRScan ¶
func (*DDRScan) CreateScansFromResponse ¶
func (scan *DDRScan) CreateScansFromResponse() ([]Scan, []custom_errors.DoEErrors)
func (*DDRScan) GetIdentifier ¶
func (*DDRScan) GetMetaInformation ¶
func (scan *DDRScan) GetMetaInformation() *ScanMetaInformation
type DDRScanMetaInformation ¶
type DDRScanMetaInformation struct { ScanMetaInformation IpVersion string `json:"ip_version"` ScheduleDoEScans bool `json:"schedule_doe_scans"` ScheduleFingerprintScan bool `json:"schedule_fingerprint_scan"` PTRScheduled bool `json:"ptr_scheduled"` }
type DoHScan ¶
type DoHScan struct { Scan Meta *DoHScanMetaInformation `json:"meta"` Query *query.DoHQuery `json:"query"` Result *query.DoHResponse `json:"result"` }
func NewDoHScan ¶
func (*DoHScan) GetDoEQuery ¶
func (*DoHScan) GetIdentifier ¶
func (*DoHScan) GetMetaInformation ¶
func (scan *DoHScan) GetMetaInformation() *ScanMetaInformation
type DoHScanMetaInformation ¶
type DoHScanMetaInformation struct {
ScanMetaInformation
}
type DoQScan ¶
type DoQScan struct { Scan Meta *DoQScanMetaInformation `json:"meta"` Query *query.DoQQuery `json:"query"` Result *query.DoQResponse `json:"result"` }
func NewDoQScan ¶
func (*DoQScan) GetDoEQuery ¶
func (*DoQScan) GetIdentifier ¶
func (*DoQScan) GetMetaInformation ¶
func (scan *DoQScan) GetMetaInformation() *ScanMetaInformation
type DoQScanMetaInformation ¶
type DoQScanMetaInformation struct {
ScanMetaInformation
}
type DoTScan ¶
type DoTScan struct { DoEScan Meta *DoTScanMetaInformation `json:"meta"` Query *query.DoTQuery `json:"query"` Result *query.DoTResponse `json:"result"` }
func NewDoTScan ¶
func (*DoTScan) GetDoEQuery ¶
func (*DoTScan) GetIdentifier ¶
func (*DoTScan) GetMetaInformation ¶
func (scan *DoTScan) GetMetaInformation() *ScanMetaInformation
type DoTScanMetaInformation ¶
type DoTScanMetaInformation struct {
ScanMetaInformation
}
type EDSRHop ¶
type EDSRHop struct { Id string `json:"id"` ChildNodes []string `json:"child_nodes"` Hop int `json:"hop"` Errors []custom_errors.DoEErrors `json:"errors"` Query *query.ConventionalDNSQuery `json:"query"` Result *query.ConventionalDNSResponse `json:"result"` ConsideredSVCB *svcb.SVCBRR `json:"considered_svcb"` GlueRecords []*GlueRecord `json:"glue_records"` }
func NewEDSRHop ¶
func NewEDSRHop(parentHop int, query *query.ConventionalDNSQuery) *EDSRHop
type EDSRResult ¶
type EDSRScan ¶
type EDSRScan struct { Scan Meta *EDSRScanMetaInformation `json:"meta"` // the protocol to scan for, e.g., h2, h3, dot, doq, etc. Protocol string `json:"protocol"` // the targetName to scan for in SVCB records (see strict origin redirection in the draft) TargetName string `json:"target_name"` // the host to start the EDSR scan from Host string `json:"host"` Result *EDSRResult `json:"result"` }
see https://www.ietf.org/id/draft-jt-add-dns-server-redirection-04.html
func NewEDSRScan ¶
func (*EDSRScan) GetIdentifier ¶
func (*EDSRScan) GetMetaInformation ¶
func (scan *EDSRScan) GetMetaInformation() *ScanMetaInformation
type EDSRScanMetaInformation ¶
type EDSRScanMetaInformation struct {
ScanMetaInformation
}
type FingerprintScan ¶
type FingerprintScan struct { Scan Meta *FingerprintScanMetaInformation `json:"meta"` VersionBindQuery *query.ConventionalDNSQuery `json:"version_bind_query"` VersionServerQuery *query.ConventionalDNSQuery `json:"version_server_query"` SSHQuery *query.SSHQuery `json:"ssh_query"` VersionBindResult *query.ConventionalDNSResponse `json:"version_bind_result"` VersionServerResult *query.ConventionalDNSResponse `json:"version_server_result"` SSHResult *query.SSHResponse `json:"ssh_result"` }
func NewFingerprintScan ¶
func NewFingerprintScan(host string, rootScanId, parentScanId, runId, vantagePoint string) *FingerprintScan
func (*FingerprintScan) GetIdentifier ¶
func (scan *FingerprintScan) GetIdentifier() string
func (*FingerprintScan) GetMetaInformation ¶
func (scan *FingerprintScan) GetMetaInformation() *ScanMetaInformation
func (*FingerprintScan) GetScanId ¶
func (scan *FingerprintScan) GetScanId() string
func (*FingerprintScan) GetType ¶
func (scan *FingerprintScan) GetType() string
func (*FingerprintScan) Marshal ¶
func (scan *FingerprintScan) Marshal() (bytes []byte, err error)
type FingerprintScanMetaInformation ¶
type FingerprintScanMetaInformation struct {
ScanMetaInformation
}
type GlueRecord ¶
type PTRScan ¶
type PTRScan struct { Scan Meta *PTRScanMetaInformation `json:"meta"` Query *query.ConventionalDNSQuery `json:"query"` Result *query.ConventionalDNSResponse `json:"result"` }
func NewPTRScan ¶
func NewPTRScan(q *query.ConventionalDNSQuery, parentScanId, rootScanId, runId, vantagePoint string) *PTRScan
TODO: Just pass meta information as a struct
func (*PTRScan) GetIdentifier ¶
func (*PTRScan) GetMetaInformation ¶
func (scan *PTRScan) GetMetaInformation() *ScanMetaInformation
type PTRScanMetaInformation ¶
type PTRScanMetaInformation struct {
ScanMetaInformation
}
type Scan ¶
type Scan interface { GetType() string GetMetaInformation() *ScanMetaInformation Marshal() ([]byte, error) GetIdentifier() string }
type ScanCache ¶
type ScanCache struct {
// contains filtered or unexported fields
}
ScanCache is a cache for scans
type ScanMetaInformation ¶
type ScanMetaInformation struct { // RunId is a unique identifier for a set of scans RunId string `json:"run_id"` // ScanId is a unique identifier for a single scan ScanId string `json:"scan_id"` // IsOnBlocklist is true if the scan is on the blocklist IsOnBlocklist bool `json:"is_on_blocklist"` // ParentScanId is the scan id of the scan that triggered this scan ParentScanId string `json:"parent_scan_id"` // RootScanId is the scan id of the scan that started the scan chain RootScanId string `json:"root_scan_id"` // VantagePoint is the vantage point from which the scan was started VantagePoint string `json:"vantage_point"` // Scheduled is the time when the scan was scheduled, i.e., when the scan was created and scheduled to kafka Scheduled time.Time `json:"scheduled"` // Started is the time when the scan was started Started time.Time `json:"started"` // Finished is the time when the scan was finished Finished time.Time `json:"finished"` // the children scans of this scan (DoE, PTR, EDSR, ...) Children []string `json:"children"` // Errors is a list of errors that occurred during the scan Errors []custom_errors.DoEErrors `json:"errors"` }
func NewScanMetaInformation ¶
func NewScanMetaInformation(parentScanId, rootScanId, runId, vantagePoint string) *ScanMetaInformation
func (*ScanMetaInformation) AddError ¶
func (smi *ScanMetaInformation) AddError(err ...custom_errors.DoEErrors)
func (*ScanMetaInformation) GenerateRunId ¶
func (smi *ScanMetaInformation) GenerateRunId()
func (*ScanMetaInformation) GenerateScanId ¶
func (smi *ScanMetaInformation) GenerateScanId()
func (*ScanMetaInformation) Schedule ¶
func (smi *ScanMetaInformation) Schedule()
func (*ScanMetaInformation) SetFinished ¶
func (smi *ScanMetaInformation) SetFinished()
func (*ScanMetaInformation) SetScheduled ¶
func (smi *ScanMetaInformation) SetScheduled()
func (*ScanMetaInformation) SetStarted ¶
func (smi *ScanMetaInformation) SetStarted()
type ScanRunCache ¶
type ScanRunCache struct { RunId string CacheTime time.Duration // contains filtered or unexported fields }
ScanRunCache is a cache for scans of a single run, cleared after SCAN_CACHE_TIME if no new scans are added
func NewScanRunContainer ¶
func NewScanRunContainer(runId string) *ScanRunCache
NewScanRunContainer creates a new ScanRunCache, the timer is started
func (*ScanRunCache) AddScan ¶
func (src *ScanRunCache) AddScan(s Scan)
AddScan adds a scan to the cache and resets the timer
func (*ScanRunCache) ContainsScan ¶
func (src *ScanRunCache) ContainsScan(s Scan) (string, bool)
ContainsScan checks if a scan is in the cache, returns the scanId if found
Click to show internal directories.
Click to hide internal directories.