report

package
v0.0.0-...-58ca1b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Unlicense, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SEV_CRITICAL = "critical"
View Source
const SEV_HIGH = "high"
View Source
const SEV_INFO = "info"
View Source
const SEV_LOW = "low"
View Source
const SEV_MEDIUM = "medium"

Variables

This section is empty.

Functions

func RegisterSimpleReportCheck

func RegisterSimpleReportCheck(check SimpleReportCheck)

Types

type AnalyticsIDsCheck

type AnalyticsIDsCheck struct{}

AnalyticsIDsCheck implementation

func (*AnalyticsIDsCheck) Check

func (srt *AnalyticsIDsCheck) Check(out *SimpleReport, report *AnonymityReport)

type AnonymityReport

type AnonymityReport struct {
	PrivateKeyDetected bool `json:"privateKeyDetected"`

	// Apache Specific
	FoundApacheModStatus   bool     `json:"foundApacheModStatus"`
	ServerVersion          string   `json:"serverVersion"`
	RelatedOnionServices   []string `json:"relatedOnionServices"`
	RelatedClearnetDomains []string `json:"relatedOnionDomains"`
	IPAddresses            []string `json:"ipAddresses"`
	EmailAddresses         []string `json:"emailAddresses"`
	AnalyticsIDs           []string `json:"analyticsIDs"`
	BitcoinAddresses       []string `json:"bitcoinAddresses"`
	LinkedOnions           []string `json:"linkedOnions"`

	OpenDirectories []string    `json:"openDirectories"`
	ExifImages      []ExifImage `json:"exifImages"`
}

This is a summary report without all the crawl information

func (*AnonymityReport) AddExifImage

func (osr *AnonymityReport) AddExifImage(location string)

func (*AnonymityReport) AddExifTag

func (osr *AnonymityReport) AddExifTag(name string, value string)

func (*AnonymityReport) AddIPAddress

func (osr *AnonymityReport) AddIPAddress(ip string)

func (*AnonymityReport) AddRelatedClearnetDomain

func (osr *AnonymityReport) AddRelatedClearnetDomain(domain string)

func (*AnonymityReport) AddRelatedOnionService

func (osr *AnonymityReport) AddRelatedOnionService(service string)

func (*AnonymityReport) Serialize

func (osr *AnonymityReport) Serialize() (string, error)

type ApacheModStatusCheck

type ApacheModStatusCheck struct{}

ApacheModStatusCheck implementation

func (*ApacheModStatusCheck) Check

func (srt *ApacheModStatusCheck) Check(out *SimpleReport, report *AnonymityReport)

type BitcoinAddressesCheck

type BitcoinAddressesCheck struct{}

BitcoinAddressesCheck implementation

func (*BitcoinAddressesCheck) Check

func (srt *BitcoinAddressesCheck) Check(out *SimpleReport, report *AnonymityReport)

type BitcoinService

type BitcoinService struct {
	Detected        bool     `json:"detected"`
	UserAgent       string   `json:"userAgent"`
	ProtocolVersion int      `json:"prototocolVersion"`
	OnionPeers      []string `json:"onionPeers"`
}

type EmailAddressCheck

type EmailAddressCheck struct{}

EmailAddressCheck implementation

func (*EmailAddressCheck) Check

func (srt *EmailAddressCheck) Check(out *SimpleReport, report *AnonymityReport)

type ExifImage

type ExifImage struct {
	Location string    `json:"location"`
	ExifTags []ExifTag `json:"exifTags"`
}

type ExifImagesCheck

type ExifImagesCheck struct{}

ExifImagesCheck implementation

func (*ExifImagesCheck) Check

func (srt *ExifImagesCheck) Check(out *SimpleReport, report *AnonymityReport)

type ExifTag

type ExifTag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type IPAddressCheck

type IPAddressCheck struct{}

IPAddressCheck implementation

func (*IPAddressCheck) Check

func (srt *IPAddressCheck) Check(out *SimpleReport, report *AnonymityReport)

type OnionScanReport

type OnionScanReport struct {
	HiddenService  string    `json:"hiddenService"`
	DateScanned    time.Time `json:"dateScanned"`
	Online         bool      `json:"online"`
	PerformedScans []string  `json:"performedScans"`

	// Summary
	WebDetected      bool `json:"webDetected"`
	TLSDetected      bool `json:"tlsDetected"`
	SSHDetected      bool `json:"sshDetected"`
	RicochetDetected bool `json:"ricochetDetected"`
	IRCDetected      bool `json:"ircDetected"`
	FTPDetected      bool `json:"ftpDetected"`
	SMTPDetected     bool `json:"smtpDetected"`
	BitcoinDetected  bool `json:"bitcoinDetected"`
	MongoDBDetected  bool `json:"mongodbDetected"`
	VNCDetected      bool `json:"vncDetected"`
	XMPPDetected     bool `json:"xmppDetected"`
	SkynetDetected   bool `json:"skynetDetected"`

	// Site Specific
	Crawls map[string]int `json:"crawls"`

	// Page Content
	PGPKeys []PGPKey `json:"pgpKeys"`

	// TLS
	Certificates []x509.Certificate `json:"certificates"`

	// Bitcoin
	BitcoinServices map[string]*BitcoinService `json:"bitcoinServices"`

	// SSH
	SSHKey    string `json:"sshKey"`
	SSHBanner string `json:"sshBanner"`

	// FTP
	FTPFingerprint string `json:"ftpFingerprint"`
	FTPBanner      string `json:"ftpBanner"`

	// SMTP
	SMTPFingerprint string `json:"smtpFingerprint"`
	SMTPBanner      string `json:"smtpBanner"`

	// Meta Info
	NextAction string `json:"lastAction"`
	TimedOut   bool   `json:"timedOut"`
	Error      error  `json:"error"`

	// Sub Reports
	AnonymityReport *AnonymityReport `json:"identifierReport"`
	SimpleReport    *SimpleReport    `json:"simpleReport"`
}

func LoadReportFromFile

func LoadReportFromFile(filename string) (OnionScanReport, error)

LoadReportFromFile creates an OnionScan report from a json encoded file.

func NewOnionScanReport

func NewOnionScanReport(hiddenService string) *OnionScanReport

NewOnionScanReport creates a new OnionScan report for the given hidden service.

func (*OnionScanReport) AddBitcoinService

func (osr *OnionScanReport) AddBitcoinService(name string) *BitcoinService

AddBitcoinService adds a new Bitcoin Service to the Report

func (*OnionScanReport) AddPGPKey

func (osr *OnionScanReport) AddPGPKey(armoredKey, identity, fingerprint string)

AddPGPKey adds a new PGP Key to the Report

func (*OnionScanReport) Serialize

func (osr *OnionScanReport) Serialize() (string, error)

Serialize converts the report to a JSON representation

type OpenDirectoriesCheck

type OpenDirectoriesCheck struct{}

OpenDirectoriesCheck implementation

func (*OpenDirectoriesCheck) Check

func (srt *OpenDirectoriesCheck) Check(out *SimpleReport, report *AnonymityReport)

type PGPKey

type PGPKey struct {
	ArmoredKey  string `json:"armoredKey"`
	Identity    string `json:"identity"`
	FingerPrint string `json:"fingerprint"`
}

type PrivateKeyCheck

type PrivateKeyCheck struct{}

PrivateKeyCheck implementation

func (*PrivateKeyCheck) Check

func (srt *PrivateKeyCheck) Check(out *SimpleReport, report *AnonymityReport)

type RelatedClearnetDomainsCheck

type RelatedClearnetDomainsCheck struct{}

RelatedClearnetDomainsCheck implementation

func (*RelatedClearnetDomainsCheck) Check

func (srt *RelatedClearnetDomainsCheck) Check(out *SimpleReport, report *AnonymityReport)

type RelatedOnionServicesCheck

type RelatedOnionServicesCheck struct{}

RelatedOnionDomainsCheck implementation

func (*RelatedOnionServicesCheck) Check

func (srt *RelatedOnionServicesCheck) Check(out *SimpleReport, report *AnonymityReport)

type Risk

type Risk struct {
	Severity    string   `json:"severity"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Fix         string   `json:"fix"`
	Items       []string `json:"items"`
}

type SimpleReport

type SimpleReport struct {
	HiddenService string `json:"hiddenService"`
	Risks         []Risk `json:"risks"`
}

func NewSimpleReport

func NewSimpleReport(hiddenService string) *SimpleReport

func SummarizeToSimpleReport

func SummarizeToSimpleReport(hiddenService string, report *AnonymityReport) *SimpleReport

func (*SimpleReport) AddRisk

func (osr *SimpleReport) AddRisk(severity string, title string, description string, fix string, items []string)

func (*SimpleReport) Format

func (osr *SimpleReport) Format(width int) (string, error)

Format as human-readable text to be printed to console

func (*SimpleReport) Serialize

func (osr *SimpleReport) Serialize() (string, error)

Format as JSON

type SimpleReportCheck

type SimpleReportCheck interface {
	Check(out *SimpleReport, report *AnonymityReport)
}

Interface for SimpleReport checks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL