models

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	YAMLPlugins = make(map[string][]AppVulInfo) //yaml插件集
	GOPlugins   = make(map[string][]AppVulInfo) //go所有插件
)
View Source
var PassDict = map[string][]string{}
View Source
var UserDict = map[string][]string{}

Functions

func Register

func Register(Info AppVulInfo)

Register 注册插件

Types

type AppVulInfo

type AppVulInfo struct {
	App   string  `json:"app" form:"app" yaml:"app"` //App名称
	Query string  `json:"query" yaml:"query"`        //程序类型 1 基线 2 web
	Meta  VulMeta `json:"meta" yaml:"meta" gorm:"-"` //漏洞信息
}

AppVulInfo 程序漏洞信息

type Dict

type Dict struct {
	User     string
	Password string
}

Dict 组合密码字典

type ExploitParams

type ExploitParams struct {
	Name  string `json:"name" yaml:"name"`   //选择框标题,如 CMD、FILE
	Type  string `json:"type" yaml:"type"`   //类型,支持 input、select
	Value string `json:"value" yaml:"value"` //select多参数需以逗号分割  select: key:value  如 readFile:/index?path=/etc/passwd  预留占位符:{{exploit}}
}

type ExploitSteps

type ExploitSteps struct {
	Type      string                                                                              `json:"type" yaml:"type"` //or | and  可能有多种复现方式。这个时候就使用此参数决定响应内容是都必须符合还是只需符合其中一项
	Params    ExploitParams                                                                       `json:"params" yaml:"params"`
	Exploit   []StepMeta                                                                          `json:"exploit,omitempty" yaml:"exploit,omitempty"` //exp验证,如果是数组的情况,type为and情况下最后一次匹配到的结果为最终请求与响应数据,or的情况下第一次匹配规则即是最终响应。
	ExploitGo func(scheme, ip string, port int, payload string, duration time.Duration) VulResult `json:"-" yaml:"-"`
}

type HydraAppFunc

type HydraAppFunc struct {
	App  string        //协议
	Func func(any) any //爆破函数
}

HydraAppFunc 爆破使用

type HydraTask

type HydraTask struct {
	App      string
	Target   string
	DictList []Dict
	Config   ScanParams
	Dict     Dict
	Scan     *task.Pool
}

HydraTask 爆破任务配置

type MSG

type MSG struct {
	Target    string        `json:"target"`
	Name      string        `json:"name"`
	Type      string        `json:"type"`
	Payload   any           `json:"payload"`
	Response  string        `json:"response"`
	Leve      int           `json:"leve"`
	Describe  string        `json:"describe"`
	EXP       bool          `json:"exp"`
	ExpParams ExploitParams `json:"exp_params"`
}

MSG success out payload

type ScanParams

type ScanParams struct {
	IP, Port, BlackPort, BlackIP                                      string        //要检查的IP、端口以及黑名单
	Timeout                                                           time.Duration //网络超时
	Thread                                                            int           //线程数
	Ping, AliveCheck, AliveFuzz, WeakPass, SubDomain, PN, Vul, Nuclei bool          //是否用ping、智能/模糊模式检测存活、基线扫描、目录扫描、子域名扫描、PN、vul扫描
	HostList                                                          []string      //解析得到的待扫描IP
	PortList                                                          []int         //解析得到的待扫描端口
	Uri                                                               []string      //域名列表
}

type StepMeta

type StepMeta struct {
	Request struct {
		Method   string              `json:"method" yaml:"method"`                    //请求类型
		Path     string              `json:"path" yaml:"path"`                        //存在问题的地址
		Redirect bool                `json:"redirect" yaml:"redirect" default:"true"` //http是否允许重定向,默认允许
		Header   []map[string]string `json:"header" yaml:"header"`
		Params   string              `json:"params" yaml:"params"` //请求参数
	} `json:"request" yaml:"request"` //构造payload
	Response []struct {
		Name  string `json:"name" yaml:"name"`   //校验响应的数据模块,如header、body、code、time
		Value string `json:"value" yaml:"value"` //期待的值
		Type  string `json:"type" yaml:"type"`   //操作类型,如等于=、包含contain、不等于!=、不包含not contain、regex
	} `json:"response" yaml:"response"` //根据响应信息检测漏洞是否存在 示例: code == 200
}

StepMeta 验证结构体

type StepsMeta

type StepsMeta struct {
	Variable     []map[string]any `json:"variable" yaml:"variable"`                               //每个请求都允许自定义 允许存在request:header、path、params、body response:code、body、raw中
	VerifySteps  VerifySteps      `json:"verify_steps" yaml:"verify_steps"`                       //POC模块,漏洞验证
	ExploitSteps ExploitSteps     `json:"exploit_steps,omitempty" yaml:"exploit_steps,omitempty"` //exp模块
}

type VerifySteps

type VerifySteps struct {
	Type     string                                                              `json:"type" yaml:"type"`                         //or | and  可能有多种复现方式。这个时候就使用此参数决定响应内容是都必须符合还是只需符合其中一项
	Verify   []StepMeta                                                          `json:"verify,omitempty" yaml:"verify,omitempty"` //poc验证,如果是数组的情况,type为and情况下最后一次匹配到的结果为最终请求与响应数据,or的情况下第一次匹配规则即是最终响应。
	VerifyGo func(scheme, ip string, port int, duration time.Duration) VulResult `json:"-" yaml:"-"`
}

type VulMeta

type VulMeta struct {
	Name        string    `json:"name" yaml:"name"`               //漏洞名称
	Level       int       `json:"level" yaml:"level"`             //危险级别 信息、低、中、高、严重 Nil  = 0 Info = 1 Low = 2 Middle = 3 High = 4、Serious = 5
	Tags        []string  `json:"tags" yaml:"tags"`               //漏洞类型,如远程命令执行
	Description string    `json:"description" yaml:"description"` //漏洞描述
	Homepage    string    `json:"homepage" yaml:"homepage"`       //厂商官网
	Author      string    `json:"author" yaml:"author"`           //漏洞作者
	References  string    `json:"references" yaml:"references"`   //参考文章
	Solution    string    `json:"solution" yaml:"solution"`       //解决方案
	CreateAt    string    `json:"create_at" yaml:"create_at"`     //poc创建时间
	Available   bool      `json:"available" yaml:"available"`     //可利用
	Steps       StepsMeta `json:"steps" yaml:"steps"`
}

VulMeta 每个漏洞详细信息

type VulResult

type VulResult struct {
	Request  string `json:"request,omitempty"`
	Response string `json:"response"`
	State    bool   `json:"state"`
}

VulResult 封装漏洞检测返回信息

Jump to

Keyboard shortcuts

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