core

package
v0.0.0-...-079d421 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AltResolveDetection

func AltResolveDetection(detections []string, target map[string]string) []string

AltResolveDetection resolve detection part in YAML signature file

func AltResolveHeader

func AltResolveHeader(headers []map[string]string, target map[string]string) []map[string]string

AltResolveHeader resolve headers part in YAML signature file

func AltResolveRequest

func AltResolveRequest(req *libs.Request)

AltResolveRequest resolve all request but look for [[ ]] delimiter

func AltResolveVariable

func AltResolveVariable(format string, data map[string]string) string

AltResolveVariable just like ResolveVariable but looking for [[.var]]

func Analyze

func Analyze(options libs.Options, record *libs.Record)

Analyze run analyzer with each detections

func Background

func Background(options libs.Options)

Background main function to call other background task

func Base64Encode

func Base64Encode(raw string) string

Base64Encode just Base64 Encode

func Between

func Between(value string, left string, right string) string

Between get string between left and right

func Body

func Body(req libs.Request, arguments []otto.Value) []libs.Request

Body gen request with body

func ChooseOrigin

func ChooseOrigin(record libs.Record, index int) libs.Record

ChooseOrigin choose origin to compare

func CommonError

func CommonError(component string) (string, bool)

CommonError shortcut for common error

func Cookie(req libs.Request, arguments []otto.Value) []libs.Request

Cookie gen request with Cookie

func Encoder

func Encoder(encodeString string, data string) string

Encoder encoding part after resolve

func Execution

func Execution(cmd string) string

Execution Run a command

func Fuzz

func Fuzz(req libs.Request, arguments []otto.Value) []libs.Request

// Usage: Fuzz('{{.payload}}'), Fuzz('{{.payload}}11', 'ANOTHER_FUZZ') Fuzz gen request with fuzz keyword

func GenActiveReport

func GenActiveReport(options libs.Options) error

GenActiveReport generate report file

func GenPassiveReport

func GenPassiveReport(options libs.Options) error

GenPassiveReport generate report file

func Generators

func Generators(req libs.Request, sign libs.Signature) []libs.Request

Generators run multiple generator

func GetComponent

func GetComponent(record libs.Record, component string) string

GetComponent get component to run detection

func GetPassives

func GetPassives(options libs.Options) []libs.Passive

GetPassives get all passives rule

func Header(req libs.Request, arguments []otto.Value) []libs.Request

Header gen request with header

func Host2IP

func Host2IP(rawURL string) map[string]string

Host2IP replace Host header with IP address

func InitConfig

func InitConfig(options *libs.Options)

InitConfig init config

func InputCmd

func InputCmd(Cmd string) string

InputCmd take input as os command @NOTE: this is a feature not an RCE :P

func InvokeCmd

func InvokeCmd(rec *libs.Record, rawCmd string) string

InvokeCmd execute external command

func Method

func Method(req libs.Request, arguments []otto.Value) []libs.Request

Method gen request with multiple method

func MiddleWare

func MiddleWare(rec *libs.Record, options libs.Options)

MiddleWare is main function for middleware

func MoreVariables

func MoreVariables(target map[string]string, sign libs.Signature, options libs.Options) map[string]string

MoreVariables get more options to render in sign template

func ParseBurpRequest

func ParseBurpRequest(raw string) (req libs.Request)

ParseBurpRequest parse burp style request

func ParseBurpResponse

func ParseBurpResponse(rawReq string, rawRes string) (res libs.Response)

ParseBurpResponse parse burp style response

func ParseFuzzRequest

func ParseFuzzRequest(record libs.Record, sign libs.Signature) []libs.Request

ParseFuzzRequest parse request receive in API server

func ParseHeaders

func ParseHeaders(rawHeaders map[string][]string) []map[string]string

ParseHeaders parse header for sending method

func ParseInputFormat

func ParseInputFormat(raw string) map[string]string

ParseInputFormat format input

func ParseOrigin

func ParseOrigin(req libs.Request, sign libs.Signature, _ libs.Options) libs.Request

ParseOrigin parse origin request

func ParseParams

func ParseParams(rawParams []string) map[string]string

ParseParams parse more params from cli

func ParsePassive

func ParsePassive(passiveFile string) (passive libs.Passive, err error)

ParsePassive parsing YAML passive file

func ParsePayloads

func ParsePayloads(sign libs.Signature) []string

ParsePayloads parse payload to replace

func ParseRawHeaders

func ParseRawHeaders(rawHeaders []string) map[string]string

ParseRawHeaders parse more headers from cli

func ParseRequest

func ParseRequest(req libs.Request, sign libs.Signature, options libs.Options) []libs.Request

ParseRequest parse request part in YAML signature file

func ParseRequestFromServer

func ParseRequestFromServer(record *libs.Record, req libs.Request, _ libs.Signature)

ParseRequestFromServer parse request receive from API server

func ParseSign

func ParseSign(signFile string) (sign libs.Signature, err error)

ParseSign parsing YAML signature file

func ParseTarget

func ParseTarget(raw string) map[string]string

ParseTarget parsing target and some variable for template

func ParseVariable

func ParseVariable(sign libs.Signature) []map[string]string

ParseVariable parse variable in YAML signature file

func PassiveAnalyze

func PassiveAnalyze(options libs.Options, record libs.Record)

PassiveAnalyze do passive analyzer based on default passive signature

func Path

func Path(req libs.Request, arguments []otto.Value) []libs.Request

Path gen request with path

func PickupLog

func PickupLog(options libs.Options)

PickupLog pickup request that's have log coming back

func PollCollab

func PollCollab(record libs.Record, analyzeString string) (string, bool)

PollCollab polling burp collab with secret from DB

func PollingLog

func PollingLog()

PollingLog polling all request with their

func Query

func Query(req libs.Request, arguments []otto.Value) []libs.Request

Query gen request with query string

func RandomNumber

func RandomNumber(n int) string

RandomNumber return a random number with length

func RandomString

func RandomString(n int) string

RandomString return a random string with length

func RegexCount

func RegexCount(component string, analyzeString string) int

RegexCount count regex string in component

func RegexGrep

func RegexGrep(realRec libs.Record, arguments []otto.Value) string

RegexGrep grep regex string from component

func RegexSearch

func RegexSearch(component string, analyzeString string) (string, bool)

RegexSearch search regex string in component

func RegexSelect

func RegexSelect(realRec libs.Record, arguments []otto.Value) map[string]string

RegexSelect get regex string from component

func ReplaceMe

func ReplaceMe(req libs.Request, arguments []otto.Value) []libs.Request

Usage: Replace(), Replace('FUZZ') ReplaceMe gen request with fuzz keyword

func ResolveDetection

func ResolveDetection(detections []string, target map[string]string) []string

ResolveDetection resolve detection part in YAML signature file

func ResolveHeader

func ResolveHeader(headers []map[string]string, target map[string]string) []map[string]string

ResolveHeader resolve headers part in YAML signature file

func ResolveVariable

func ResolveVariable(format string, data map[string]string) string

ResolveVariable resolve template from signature file

func RunConclude

func RunConclude(concludeScript string, record libs.Record, sign *libs.Signature)

RunConclude run conclusion script

func RunConclusions

func RunConclusions(record libs.Record, sign *libs.Signature)

RunConclusions set new value for next request

func RunDetector

func RunDetector(record libs.Record, detectionString string) (string, bool)

RunDetector is main function for detections

func RunGenerator

func RunGenerator(req libs.Request, genString string) []libs.Request

RunGenerator is main function for generator

func RunVariables

func RunVariables(variableString string) []string

RunVariables is main function for detections

func SelectSign

func SelectSign(signName string) []string

SelectSign select signature by multiple selector

func SingleSign

func SingleSign(signName string) []string

SingleSign select signature by single selector

func SplitLines

func SplitLines(raw string) []string

SplitLines just split new Line

func StoreOutput

func StoreOutput(rec libs.Record, options libs.Options) string

StoreOutput store vulnerable request to a file

func StorePassiveOutput

func StorePassiveOutput(record libs.Record, rule libs.Rule, detectionString string, options libs.Options) string

StorePassiveOutput store passive output found

func StringCount

func StringCount(component string, analyzeString string) int

StringCount count string literal in component

func StringSearch

func StringSearch(component string, analyzeString string) bool

StringSearch search string literal in component

func TurboIntruder

func TurboIntruder(rec *libs.Record) string

TurboIntruder execute Turbo Intruder CLI

func URLEncode

func URLEncode(raw string) string

URLEncode just URL Encode

func UpdatePlugins

func UpdatePlugins(options libs.Options)

UpdatePlugins update latest UI and Plugins from default repo

func UpdateSignature

func UpdateSignature(options libs.Options)

UpdateSignature update latest UI from UI repo

Types

type ReportData

type ReportData struct {
	Vulnerabilities []Vulnerability
}

type VulnData

type VulnData struct {
	SignID          string
	SignName        string
	URL             string
	Risk            string
	DetectionString string
	Confidence      string
	Req             string
	Res             string
}

type Vulnerability

type Vulnerability struct {
	SignID     string
	SignPath   string
	URL        string
	Risk       string
	Confidence string
	ReportPath string
	ReportFile string
	Status     string
	Length     string
	Words      string
	Time       string
}

func ParsePassiveVuln

func ParsePassiveVuln(options libs.Options) []Vulnerability

ParsePassiveVuln parse vulnerbility based on

func ParseVuln

func ParseVuln(options libs.Options) []Vulnerability

ParseVuln parse vulnerbility based on

Jump to

Keyboard shortcuts

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