capabilities

package
v0.0.0-...-7be17cd Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTML_API   = "https://www.sec.gov"
	JSON_API   = "https://data.sec.gov"
	USER_AGENT = "research@praetorian.com"
)
View Source
const YESTERDAY = -time.Hour * 24 * 30

Variables

View Source
var HONEYPOT = 50

Functions

func CheckRegreSSHion

func CheckRegreSSHion(url *url.URL) (bool, string)

func IsValidWebsite

func IsValidWebsite(target string) bool

func NewAmazon

func NewAmazon(job model.Job) model.Capability

func NewAzure

func NewAzure(job model.Job) model.Capability

func NewAzureAD

func NewAzureAD(job model.Job) model.Capability

func NewCloudflare

func NewCloudflare(job model.Job) model.Capability

func NewCrawler

func NewCrawler(job model.Job) model.Capability

func NewCrowdstrike

func NewCrowdstrike(job model.Job) model.Capability

func NewDigitalOcean

func NewDigitalOcean(job model.Job) model.Capability

func NewEdgar

func NewEdgar(job model.Job) model.Capability

func NewGCP

func NewGCP(job model.Job) model.Capability

func NewGato

func NewGato(job model.Job) model.Capability

func NewGit

func NewGit(job model.Job) model.Capability

func NewGithubRepository

func NewGithubRepository(job model.Job) model.Capability

func NewGitlab

func NewGitlab(job model.Job) model.Capability

func NewNS1

func NewNS1(job model.Job) model.Capability

func NewNessus

func NewNessus(job model.Job) model.Capability

func NewNuclei

func NewNuclei(job model.Job) model.Capability

func NewPortScan

func NewPortScan(job model.Job) model.Capability

func NewSSH

func NewSSH(job model.Job) model.Capability

func NewSecrets

func NewSecrets(job model.Job) model.Capability

func NewSubdomain

func NewSubdomain(job model.Job) model.Capability

func NewWhois

func NewWhois(job model.Job) model.Capability

Types

type Amazon

type Amazon struct {
	Job     model.Job
	Asset   model.Asset
	Account string
	Region  string
	Credentials
	XYZ
}

func (*Amazon) Invoke

func (a *Amazon) Invoke() error

func (*Amazon) Match

func (a *Amazon) Match() bool

func (*Amazon) Send

func (a *Amazon) Send(account string)

func (*Amazon) Timeout

func (a *Amazon) Timeout() int

type Azure

type Azure struct {
	Job   model.Job
	Asset model.Asset

	XYZ
	// contains filtered or unexported fields
}

func (*Azure) Invoke

func (a *Azure) Invoke() error

func (*Azure) Match

func (a *Azure) Match() bool

func (*Azure) Timeout

func (a *Azure) Timeout() int

type AzureAD

type AzureAD struct {
	Stream chan interface{}
	Asset  model.Asset
	XYZ
}

func (*AzureAD) Invoke

func (task *AzureAD) Invoke() error

func (*AzureAD) Match

func (task *AzureAD) Match() bool

type Cloudflare

type Cloudflare struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Cloudflare) Invoke

func (task *Cloudflare) Invoke() error

func (*Cloudflare) Match

func (task *Cloudflare) Match() bool

type Crawler

type Crawler struct {
	Job    model.Job
	Asset  model.Asset
	Header string
	XYZ
}

func (*Crawler) Crawler

func (task *Crawler) Crawler() *colly.Collector

func (*Crawler) FindInputFields

func (task *Crawler) FindInputFields(c *colly.Collector) func()

func (*Crawler) FindSecrets

func (task *Crawler) FindSecrets(c *colly.Collector) func()

func (*Crawler) Invoke

func (task *Crawler) Invoke() error

func (*Crawler) Match

func (task *Crawler) Match() bool

type Credentials

type Credentials struct {
	Id    string `json:"AccessKeyId"`
	Key   string `json:"SecretAccessKey"`
	Token string `json:"SessionToken"`
}

type Crowdstrike

type Crowdstrike struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Crowdstrike) Invoke

func (task *Crowdstrike) Invoke() error

func (*Crowdstrike) Match

func (task *Crowdstrike) Match() bool

func (*Crowdstrike) Timeout

func (task *Crowdstrike) Timeout() int

type Device

type Device struct {
	HostID   string         `json:"device_id"`
	Hostname string         `json:"hostname"`
	OS       string         `json:"platform_name"`
	Policies []DevicePolicy `json:"policies"`
}

type DevicePolicy

type DevicePolicy struct {
	PolicyType string `json:"policy_type"`
	PolicyID   string `json:"policy_id"`
	Applied    bool   `json:"applied"`
}

type DigitalOcean

type DigitalOcean struct {
	Job   model.Job
	Asset model.Asset

	XYZ
	// contains filtered or unexported fields
}

func (*DigitalOcean) Invoke

func (task *DigitalOcean) Invoke() error

func (*DigitalOcean) Match

func (task *DigitalOcean) Match() bool

type Edgar

type Edgar struct {
	Stream chan interface{}
	Asset  model.Asset
	XYZ
}

func (*Edgar) Adjacent

func (task *Edgar) Adjacent(filterFunc func(Filing) bool) error

func (*Edgar) Invoke

func (task *Edgar) Invoke() error

func (*Edgar) Match

func (task *Edgar) Match() bool

func (*Edgar) Register

func (task *Edgar) Register() error

type Enumeration

type Enumeration struct {
	Repositories []Repository `json:"repositories"`
}

type Exclusion

type Exclusion struct {
	ID     string `json:"id"`
	Path   string `json:"value"`
	Global bool   `json:"applied_globally"`
}

type FalconClient

type FalconClient struct {
	Token   string
	BaseURL string
}

func NewFalconClient

func NewFalconClient(clientID, secret, baseURL string) (*FalconClient, error)

func (*FalconClient) Devices

func (c *FalconClient) Devices() ([]Device, error)

func (*FalconClient) Exclusions

func (c *FalconClient) Exclusions() ([]Exclusion, error)

func (*FalconClient) PreventionPolicies

func (c *FalconClient) PreventionPolicies() ([]Policy, error)

type Filing

type Filing struct {
	AccessionNumber string `json:"accessionNumber"`
	FilingDate      string `json:"filingDate"`
	Form            string `json:"form"`
	PrimaryDocument string `json:"primaryDocument"`
	Text            string `json:"text"`
}

type GCP

type GCP struct {
	Job   model.Job
	Asset model.Asset

	XYZ
	// contains filtered or unexported fields
}

func (*GCP) Invoke

func (g *GCP) Invoke() error

func (*GCP) Match

func (g *GCP) Match() bool

func (*GCP) Timeout

func (g *GCP) Timeout() int

type Gato

type Gato struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Gato) Invoke

func (task *Gato) Invoke() error

func (*Gato) Match

func (task *Gato) Match() bool

func (*Gato) Timeout

func (task *Gato) Timeout() int

type GatoXOutput

type GatoXOutput struct {
	Enumeration Enumeration `json:"enumeration"`
}

type GenericResponse

type GenericResponse[T any] struct {
	Resources []T `json:"resources"`
}

type Git

type Git struct {
	Job   model.Job
	Asset model.Asset

	XYZ
	// contains filtered or unexported fields
}

func (*Git) Invoke

func (task *Git) Invoke() error

func (*Git) Match

func (task *Git) Match() bool

func (*Git) Timeout

func (task *Git) Timeout() int

type GithubRepository

type GithubRepository struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*GithubRepository) Invoke

func (task *GithubRepository) Invoke() error

func (*GithubRepository) Match

func (task *GithubRepository) Match() bool

type Gitlab

type Gitlab struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Gitlab) Invoke

func (task *Gitlab) Invoke() error

func (*Gitlab) Match

func (task *Gitlab) Match() bool

type Host

type Host struct {
	Info struct {
		IP   string `json:"host-ip"`
		FQDN string `json:"host-fqdn"`
	} `json:"info"`
	Vulns []struct {
		Severity int    `json:"severity"`
		PluginID int    `json:"plugin_id"`
		Name     string `json:"plugin_name"`
	} `json:"vulnerabilities"`
}

type Info

type Info struct {
	Count int `json:"count"`
	Page  int `json:"page"`
}

type NPLine

type NPLine struct {
	FindingID string `json:"finding_id"`
	RuleID    string `json:"rule_text_id"`
}

type NS1

type NS1 struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*NS1) Invoke

func (task *NS1) Invoke() error

func (*NS1) Match

func (task *NS1) Match() bool

type Nessus

type Nessus struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Nessus) Invoke

func (task *Nessus) Invoke() error

func (*Nessus) Match

func (task *Nessus) Match() bool

type Nuclei

type Nuclei struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Nuclei) Encode

func (task *Nuclei) Encode(path string) string

func (*Nuclei) Invoke

func (task *Nuclei) Invoke() error

func (*Nuclei) Match

func (task *Nuclei) Match() bool

type NucleiFinding

type NucleiFinding struct {
	ID   string `json:"template-id"`
	Path string `json:"template-path"`
	Info struct {
		Description string   `json:"description"`
		Severity    string   `json:"severity"`
		Author      []string `json:"author"`
		Metadata    struct {
			Praetorian struct {
				Detection  bool              `json:"detection"`
				Attributes map[string]string `json:"attributes"`
			} `json:"praetorian"`
		} `json:"metadata"`
	} `json:"info"`
	Extracted []string `json:"extracted-results"`
	IP        string   `json:"ip"`
	Port      string   `json:"port"`
	URL       string   `json:"matched-at"`
}

type Parser

type Parser func(string)

type Plugin

type Plugin struct {
	Info struct {
		Attrs struct {
			Risk struct {
				Factor string `json:"risk_factor"`
			} `json:"risk_information"`
			Desc string `json:"description"`
		} `json:"pluginattributes"`
	} `json:"info"`
	Outputs []struct {
		Output string `json:"plugin_output"`
	} `json:"outputs"`
}

type Policy

type Policy struct {
	ID       string               `json:"id"`
	Name     string               `json:"name"`
	Platform string               `json:"platform_name"`
	Settings []PreventionCategory `json:"prevention_settings"`
}

type PortScan

type PortScan struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*PortScan) Invoke

func (task *PortScan) Invoke() error

func (*PortScan) Match

func (task *PortScan) Match() bool

func (*PortScan) Timeout

func (task *PortScan) Timeout() int

type PreventionCategory

type PreventionCategory struct {
	Name     string              `json:"name"`
	Controls []PreventionControl `json:"settings"`
}

type PreventionControl

type PreventionControl struct {
	Name    string                 `json:"name"`
	Options map[string]interface{} `json:"value"`
}

type Realm

type Realm struct {
	Domain string `json:"DomainName"`
	Type   string `json:"NameSpaceType"`
}

type Record

type Record struct {
	Content string `json:"content"`
	Name    string `json:"name"`
	Type    string `json:"type"`
}

type Records

type Records struct {
	Info   Info     `json:"result_info"`
	Result []Record `json:"result"`
}

type Repository

type Repository struct {
	CanFork         bool          `json:"can_fork"`
	RunnerWorkflows []string      `json:"runner_workflows"`
	PwnRequestRisk  []interface{} `json:"pwn_request_risk"`
	InjectionRisk   []interface{} `json:"injection_risk"`
}

type SSH

type SSH struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*SSH) Invoke

func (task *SSH) Invoke() error

func (*SSH) Match

func (task *SSH) Match() bool

type Scan

type Scan struct {
	Scans []struct {
		ID int `json:"id"`
	} `json:"scans"`
}

type ScanDetails

type ScanDetails struct {
	Hosts []struct {
		HostID int `json:"host_id"`
	} `json:"hosts"`
}

type SearchResult

type SearchResult struct {
	Domain    string `json:"domain_name"`
	QueryTime string `json:"query_time"`
}

type Secrets

type Secrets struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Secrets) Invoke

func (task *Secrets) Invoke() error

func (*Secrets) Match

func (task *Secrets) Match() bool

type Subdomain

type Subdomain struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Subdomain) Invoke

func (task *Subdomain) Invoke() error

func (*Subdomain) Match

func (task *Subdomain) Match() bool

type Vulnerability

type Vulnerability func(url *url.URL) (bool, string)

type Whois

type Whois struct {
	Job   model.Job
	Asset model.Asset
	XYZ
}

func (*Whois) Invoke

func (task *Whois) Invoke() error

func (*Whois) Match

func (task *Whois) Match() bool

func (*Whois) Secret

func (task *Whois) Secret() string

type WhoxyResponse

type WhoxyResponse struct {
	TotalPages   int            `json:"total_pages"`
	SearchResult []SearchResult `json:"search_result"`
}

type XYZ

type XYZ struct{}

func NewXYZ

func NewXYZ() XYZ

func (*XYZ) Execute

func (xyz *XYZ) Execute(cmd *exec.Cmd, parser Parser) error

func (*XYZ) Resolve

func (xyz *XYZ) Resolve(host string) []string

func (*XYZ) Secret

func (xyz *XYZ) Secret() string

func (*XYZ) Timeout

func (xyz *XYZ) Timeout() int

type Zone

type Zone struct {
	ID string `json:"id"`
}

type Zones

type Zones struct {
	Info   Info   `json:"result_info"`
	Result []Zone `json:"result"`
}

Jump to

Keyboard shortcuts

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