Documentation
¶
Index ¶
- Variables
- func AES_CBC_Encrypt(shirokey string) string
- func AES_GCM_Encrypt(shirokey string) string
- func CheckInfoPoc(infostr string) string
- func CheckMultiPoc(req *http.Request, pocs []*Poc, workers int)
- func Combo(input ListMap) [][]string
- func Evaluate(env *cel.Env, expression string, params map[string]interface{}) (ref.Val, error)
- func GetHeader(header map[string]string) string
- func GetShrioCookie(key, mode string) string
- func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) error
- func Inithttp()
- func MakeData(base [][]string, nextData []string) [][]string
- func NewEnv(c *CustomLib) (*cel.Env, error)
- func Padding(plainText []byte, blockSize int) []byte
- func RandomStr(randSource *rand.Rand, letterBytes string, n int) string
- func SelectPoc(Pocs embed.FS, pocname string) []string
- func UrlTypeToString(u *UrlType) string
- type CustomLib
- type Detail
- type ListItem
- type ListMap
- type MapSlice
- type Poc
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() []byte
- func (x *Request) GetContentType() string
- func (x *Request) GetHeaders() map[string]string
- func (x *Request) GetMethod() string
- func (x *Request) GetUrl() *UrlType
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetBody() []byte
- func (x *Response) GetContentType() string
- func (x *Response) GetDuration() float64
- func (x *Response) GetHeaders() map[string]string
- func (x *Response) GetStatus() int32
- func (x *Response) GetUrl() *UrlType
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Reverse
- func (*Reverse) Descriptor() ([]byte, []int)deprecated
- func (x *Reverse) GetDomain() string
- func (x *Reverse) GetIp() string
- func (x *Reverse) GetIsDomainNameServer() bool
- func (x *Reverse) GetUrl() string
- func (*Reverse) ProtoMessage()
- func (x *Reverse) ProtoReflect() protoreflect.Message
- func (x *Reverse) Reset()
- func (x *Reverse) String() string
- type RuleItem
- type RuleMap
- type Rules
- type StrItem
- type StrMap
- type Task
- type UrlType
- func (*UrlType) Descriptor() ([]byte, []int)deprecated
- func (x *UrlType) GetDomain() string
- func (x *UrlType) GetFragment() string
- func (x *UrlType) GetHost() string
- func (x *UrlType) GetPath() string
- func (x *UrlType) GetPort() string
- func (x *UrlType) GetQuery() string
- func (x *UrlType) GetScheme() string
- func (*UrlType) ProtoMessage()
- func (x *UrlType) ProtoReflect() protoreflect.Message
- func (x *UrlType) Reset()
- func (x *UrlType) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Client *http.Client // 标准HTTP客户端 ClientNoRedirect *http.Client // 不自动跟随重定向的HTTP客户端 )
全局HTTP客户端变量
View Source
var ( // CheckContent 是经过base64编码的Shiro序列化对象 CheckContent = "" /* 152-byte string literal not displayed */ // Content 是解码后的原始内容 Content, _ = base64.StdEncoding.DecodeString(CheckContent) )
View Source
var File_http_proto protoreflect.FileDescriptor
Functions ¶
func AES_GCM_Encrypt ¶
AES_GCM_Encrypt 使用AES-GCM模式加密(Shiro 1.4.2+)
func CheckMultiPoc ¶
CheckMultiPoc 并发执行多个POC检测 参数说明: - req: HTTP请求对象 - pocs: POC检测脚本列表 - workers: 并发工作协程数量
func GetShrioCookie ¶
GetShrioCookie 获取加密后的Shiro Cookie值
func InitHttpClient ¶
InitHttpClient 创建HTTP客户端
func UrlTypeToString ¶
UrlTypeToString 将 TargetURL 结构体转换为字符串
Types ¶
type CustomLib ¶
type CustomLib struct {
// contains filtered or unexported fields
}
func NewEnvOption ¶
func NewEnvOption() CustomLib
func (*CustomLib) CompileOptions ¶
CompileOptions 返回环境编译选项
func (*CustomLib) ProgramOptions ¶
func (c *CustomLib) ProgramOptions() []cel.ProgramOption
ProgramOptions 返回程序运行选项
func (*CustomLib) UpdateCompileOptions ¶
UpdateCompileOptions 更新编译选项,处理不同类型的变量声明
type Detail ¶
type Detail struct { Author string `yaml:"author"` // POC作者 Links []string `yaml:"links"` // 相关链接 Description string `yaml:"description"` // POC描述 Version string `yaml:"version"` // POC版本 }
Detail 定义POC详情结构
type ListMap ¶
type ListMap []ListItem // 字符串键列表值映射
自定义映射类型
func (*ListMap) UnmarshalYAML ¶
UnmarshalYAML 实现ListMap的YAML解析接口 参数:
- unmarshal: YAML解析函数
返回:
- error: 解析错误
type Poc ¶
type Poc struct { Name string `yaml:"name"` // POC名称 Set StrMap `yaml:"set"` // 单值配置映射 Sets ListMap `yaml:"sets"` // 列表值配置映射 Rules []Rules `yaml:"rules"` // 检测规则列表 Groups RuleMap `yaml:"groups"` // 规则组映射 Detail Detail `yaml:"detail"` // 漏洞详情 }
Poc 定义漏洞检测配置结构
type Request ¶
type Request struct { Url *UrlType `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func ParseRequest ¶
ParseRequest 将标准 HTTP 请求转换为自定义请求对象
func (*Request) Descriptor
deprecated
func (*Request) GetContentType ¶
func (*Request) GetHeaders ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Url *UrlType `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` Duration float64 `protobuf:"fixed64,6,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func ParseResponse ¶
ParseResponse 将标准 HTTP 响应转换为自定义响应对象
func (*Response) Descriptor
deprecated
func (*Response) GetContentType ¶
func (*Response) GetDuration ¶
func (*Response) GetHeaders ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Reverse ¶
type Reverse struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` IsDomainNameServer bool `protobuf:"varint,4,opt,name=is_domain_name_server,json=isDomainNameServer,proto3" json:"is_domain_name_server,omitempty"` // contains filtered or unexported fields }
func (*Reverse) Descriptor
deprecated
func (*Reverse) GetIsDomainNameServer ¶
func (*Reverse) ProtoMessage ¶
func (*Reverse) ProtoMessage()
func (*Reverse) ProtoReflect ¶
func (x *Reverse) ProtoReflect() protoreflect.Message
type RuleMap ¶
type RuleMap []RuleItem // 字符串键规则列表映射
自定义映射类型
func (*RuleMap) UnmarshalYAML ¶
UnmarshalYAML 实现RuleMap的YAML解析接口 参数:
- unmarshal: YAML解析函数
返回:
- error: 解析错误
type Rules ¶
type Rules struct { Method string `yaml:"method"` // HTTP请求方法 Path string `yaml:"path"` // 请求路径 Headers map[string]string `yaml:"headers"` // 请求头 Body string `yaml:"body"` // 请求体 Search string `yaml:"search"` // 搜索模式 FollowRedirects bool `yaml:"follow_redirects"` // 是否跟随重定向 Expression string `yaml:"expression"` // 匹配表达式 Continue bool `yaml:"continue"` // 是否继续执行 }
Rules 定义POC检测规则结构
type StrMap ¶
type StrMap []StrItem // 字符串键值对映射
自定义映射类型
func (*StrMap) UnmarshalYAML ¶
UnmarshalYAML 实现StrMap的YAML解析接口
type UrlType ¶
type UrlType struct { Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"` Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"` Fragment string `protobuf:"bytes,7,opt,name=fragment,proto3" json:"fragment,omitempty"` // contains filtered or unexported fields }
func (*UrlType) Descriptor
deprecated
func (*UrlType) GetFragment ¶
func (*UrlType) ProtoMessage ¶
func (*UrlType) ProtoMessage()
func (*UrlType) ProtoReflect ¶
func (x *UrlType) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.