libs

package
v0.0.0-...-243e0b6 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VERSION current Jaeles version
	VERSION = "beta v0.17.1"
	// AUTHOR author of this
	AUTHOR = "@j3ssiejjj"
	// DOCS link to official documentation
	DOCS = "https://jaeles-project.github.io/"
	// SIGNREPO default repo to get signature
	SIGNREPO = "https://github.com/jaeles-project/jaeles-signatures"
	// UIREPO default repo to get UI
	UIREPO = "https://github.com/jaeles-project/jaeles-plugins"
	// REPORT default report template file
	REPORT = "https://raw.githubusercontent.com/jaeles-project/jaeles-plugins/master/report/index.html"
	// VREPORT verbose report template file
	VREPORT = "https://raw.githubusercontent.com/jaeles-project/jaeles-plugins/master/report/verbose.html"
)

Variables

This section is empty.

Functions

func Banner() string

Banner print ascii banner

Types

type Config

type Config struct {
	Forced     bool
	SkipMics   bool
	Username   string
	Password   string
	Repo       string
	PrivateKey string
}

Config options for api server

type Dns

type Dns struct {
	Results  []DnsResult
	Resolver string
	Domain   string

	// for DNS part
	RecordType string `yaml:"record"` // ANY, A, CNAME

	Conditions  []string
	Middlewares []string
	Conclusions []string
	Detections  []string

	// run when detection is true
	PostRun []string
}

Dns result for DNS

type DnsResult

type DnsResult struct {
	RecordType string
	Data       string
}

type Job

type Job struct {
	URL       string
	Checksums []string
	Sign      Signature
	// the base response
	Response Response
}

Job define job for running routine

type Mics

type Mics struct {
	FullHelp         bool
	AlwaysTrue       bool
	BaseRoot         bool
	BurpProxy        bool
	DisableReplicate bool
}

Mics some shortcut options

type Options

type Options struct {
	RootFolder          string
	SignFolder          string
	PassiveFolder       string
	ResourcesFolder     string
	ThirdPartyFolder    string
	ScanID              string
	ConfigFile          string
	FoundCmd            string
	QuietFormat         string
	PassiveOutput       string
	PassiveSummary      string
	Output              string
	SummaryOutput       string
	SummaryVuln         string
	LogFile             string
	Proxy               string
	Selectors           string
	InlineDetection     string
	Params              []string
	Headers             []string
	Signs               []string
	Excludes            []string
	SelectedSigns       []string
	ParsedSelectedSigns []Signature
	ParallelSigns       []string
	SelectedPassive     string
	GlobalVar           map[string]string

	Level             int
	Concurrency       int
	Threads           int
	Delay             int
	Timeout           int
	Refresh           int
	Retry             int
	SaveRaw           bool
	LocalAnalyze      bool
	JsonOutput        bool
	VerboseSummary    bool
	Quiet             bool
	FullHelp          bool
	Verbose           bool
	Version           bool
	Debug             bool
	NoDB              bool
	NoBackGround      bool
	NoOutput          bool
	EnableFormatInput bool
	EnablePassive     bool
	DisableParallel   bool

	// only enable when doing sensitive mode
	EnableFiltering bool
	// for DNS
	Resolver string

	// Chunk Options
	ChunkDir     string
	ChunkRun     bool
	ChunkThreads int
	ChunkSize    int
	ChunkLimit   int

	Mics   Mics
	Scan   Scan
	Server Server
	Report Report
	Config Config
}

Options global options

type Origin

type Origin struct {
	Label     string
	ORequest  Request  `yaml:"origin_req"`
	OResponse Response `yaml:"origin_res"`
}

Origin contain map of origins

type Passive

type Passive struct {
	Name       string
	Desc       string
	Risk       string
	Confidence string
	Level      int
	Rules      []Rule
}

Passive struct for passive detection

type Record

type Record struct {
	Opt           Options
	DonePassive   bool
	SelectPassive string
	OriginReq     Request
	OriginRes     Response
	Origins       []Origin
	Request       Request
	Response      Response
	Sign          Signature
	RawOutput     string
	ExtraOutput   string
	// for detection
	IsVulnerable bool
	DetectString string
	DetectResult string
	ScanID       string
}

Record all information about request

type Report

type Report struct {
	VerboseReport bool
	ReportName    string
	TemplateFile  string
	VTemplateFile string
	OutputPath    string
	Title         string
}

Report options for api server

type Request

type Request struct {
	RawInput          string
	Engine            string
	Timeout           int
	Repeat            int
	Scheme            string
	Host              string
	Port              string
	Path              string
	URL               string
	Proto             string
	Proxy             string
	Method            string
	Payload           string
	Redirect          bool
	UseTemplateHeader bool
	EnableChecksum    bool
	Headers           []map[string]string
	Values            []map[string]string
	Body              string
	Beautify          string
	MiddlewareOutput  string
	Raw               string
	Res               string
	Conditions        []string
	Middlewares       []string
	Conclusions       []string
	Detections        []string

	// run when detection is true
	PostRun []string

	// for fuzzing
	Generators []string
	Encoding   string
	Target     map[string]string
}

Request all information about request

type Response

type Response struct {
	HasPopUp   bool
	StatusCode int
	Status     string
	Checksum   string

	Headers      []map[string]string
	Body         string
	ResponseTime float64
	Length       int
	Beautify     string
}

Response all information about response

type Routine

type Routine struct {
	Signs  []map[string]string
	Names  []string
	Passed bool

	Logics []struct {
		Level      int
		Expression string   `yaml:"expr"`
		Invokes    []string `yaml:"invokes"`
	} `yaml:"logics"`
}

Routine struct

type Rule

type Rule struct {
	ID         string
	Risk       string
	Confidence string
	Reason     string
	// raw regex to avoid the pain of escape char
	Regex      string
	Detections []string
}

Rule rule for run detections

type Scan

type Scan struct {
	RawRequest      string
	EnableGenReport bool
}

Scan options for api server

type Server

type Server struct {
	NoAuth       bool
	DBPath       string
	Bind         string
	JWTSecret    string
	Cors         string
	DefaultSign  string
	SecretCollab string
	Username     string
	Password     string
	Key          string
}

Server options for api server

type Signature

type Signature struct {
	ID      string
	RawPath string
	Type    string
	Level   int

	// Enable filtering mode
	Filter             bool
	OverrideFilerPaths bool
	FilteringPaths     []string `yaml:"fpaths"`
	Checksums          []string
	// local analyze
	Local    bool
	Response Response

	// some mics options
	Threads    int
	Passive    bool
	Parallel   bool
	Single     bool
	Serial     bool
	BasePath   bool
	CleanSlash bool
	// Detect once
	Noutput      bool
	Donce        bool
	StopOnSucces bool

	// Default variables for gen more inputs
	Replicate struct {
		Ports    string
		Prefixes string
	}

	// conditions to check before sending the whole requests
	CRequests []Request
	COutput   bool   `yaml:"coutput"` // store output for check request too
	Match     string // any, all

	Info struct {
		Name       string
		Author     string
		Risk       string
		Confidence string
		Category   string
		Tech       string
		OS         string
	}

	Origin     Request
	Origins    []Origin
	Requests   []Request
	RawRequest string
	Payloads   []string
	Params     []map[string]string
	Variables  []map[string]string
	Target     map[string]string

	// for dns part only
	Dns []Dns

	// similar to passive but only applied in local check
	Rules []Rule

	// routines
	Routines []Routine
}

Signature base signature struct

type VulnData

type VulnData struct {
	ScanID          string
	SignID          string
	SignName        string
	URL             string
	Risk            string
	DetectionString string
	DetectResult    string
	Confidence      string
	Req             string
	Res             string
	// little information
	StatusCode    string
	ContentLength string
	OutputFile    string
	SignatureFile string
}

VulnData vulnerable Data

Jump to

Keyboard shortcuts

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