Documentation ¶
Index ¶
- Variables
- func SaveShell(manager BaseShellManager)
- type BaseShellManager
- type BehidnerResourceSystemAction
- func (b *BehidnerResourceSystemAction) Delete(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (b *BehidnerResourceSystemAction) Do(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (b *BehidnerResourceSystemAction) Get(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (b *BehidnerResourceSystemAction) Head(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (b *BehidnerResourceSystemAction) Post(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (b *BehidnerResourceSystemAction) Put(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- type Behinder
- func (b *Behinder) BasicInfo(opts ...behinder.ExecParamsConfig) ([]byte, error)
- func (b *Behinder) ClientRequestEncode(raw []byte) ([]byte, error)
- func (b *Behinder) ClientRequestEncodeFormGo(en codecFunc)
- func (b *Behinder) CommandExec(cmd string, opts ...behinder.ExecParamsConfig) ([]byte, error)
- func (b *Behinder) EchoResultDecodeFormGo(de codecFunc)
- func (b *Behinder) EchoResultDecodeFormYak(raw []byte) ([]byte, error)
- func (b *Behinder) EchoResultEncodeFormGo(en codecFunc)
- func (b *Behinder) EchoResultEncodeFormYak(raw []byte) ([]byte, error)
- func (b *Behinder) GenWebShell() string
- func (b *Behinder) Ping(opts ...behinder.ExecParamsConfig) (bool, error)
- func (b *Behinder) ServerResponseDecode(raw []byte) ([]byte, error)
- func (b *Behinder) SetPacketScriptContent(str string)
- func (b *Behinder) SetPayloadScriptContent(str string)
- func (b *Behinder) String() string
- func (b *Behinder) Unmarshal(bts []byte, m map[string]string) error
- type FileOperation
- type Godzilla
- func (g *Godzilla) BasicInfo(opts ...behinder.ExecParamsConfig) ([]byte, error)
- func (g *Godzilla) ClientRequestEncode(raw []byte) ([]byte, error)
- func (g *Godzilla) ClientRequestEncodeFormGo(en codecFunc)
- func (g *Godzilla) CommandExec(cmd string, opts ...behinder.ExecParamsConfig) ([]byte, error)
- func (g *Godzilla) CustomClassByteCodeDealer(classBytes []byte) (bool, error)
- func (g *Godzilla) DumpWebappComponent(classname string) ([]byte, error)
- func (g *Godzilla) EchoResultDecodeFormGo(de codecFunc)
- func (g *Godzilla) EchoResultDecodeFormYak(raw []byte) ([]byte, error)
- func (g *Godzilla) EchoResultEncodeFormGo(en codecFunc)
- func (g *Godzilla) EchoResultEncodeFormYak(raw []byte) ([]byte, error)
- func (g *Godzilla) EvalFunc(className, funcName string, parameter *godzilla.Parameter) ([]byte, error)
- func (g *Godzilla) FileManagement()
- func (g *Godzilla) GenWebShell() string
- func (g *Godzilla) Include(codeName string, binCode []byte) (bool, error)
- func (g *Godzilla) InjectPayload() error
- func (g *Godzilla) InjectPayloadIfNoCookie() error
- func (g *Godzilla) InvokeCustomPlugin() ([]byte, error)
- func (g *Godzilla) KillWebappComponent(componentType string, name string) ([]byte, error)
- func (g *Godzilla) LoadPotatoPlugin(cmd string) ([]byte, error)
- func (g *Godzilla) LoadScanWebappComponentInfoPlugin(className string) ([]byte, error)
- func (g *Godzilla) LoadSuo5Plugin(className string, memshellType string, path string) ([]byte, error)
- func (g *Godzilla) Ping(opts ...behinder.ExecParamsConfig) (bool, error)
- func (g *Godzilla) ScanWebappComponentInfo() ([]byte, error)
- func (g *Godzilla) ServerResponseDecode(raw []byte) ([]byte, error)
- func (g *Godzilla) SetPacketScriptContent(content string)
- func (g *Godzilla) SetPayloadScriptContent(content string)
- func (g *Godzilla) String() string
- type GodzillaFileSystemAction
- func (g *GodzillaFileSystemAction) Delete(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (g *GodzillaFileSystemAction) Do(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (g *GodzillaFileSystemAction) Get(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (g *GodzillaFileSystemAction) Head(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (g *GodzillaFileSystemAction) Post(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- func (g *GodzillaFileSystemAction) Put(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
- type IResult
- type PacketCodecI
- type PayloadCodecI
- type ShellConfig
- func SetBase64Aes() ShellConfig
- func SetBeinderTool() ShellConfig
- func SetGodzillaTool() ShellConfig
- func SetHeaders(headers map[string]string) ShellConfig
- func SetPass(pass string) ShellConfig
- func SetProxy(p string) ShellConfig
- func SetRawAes() ShellConfig
- func SetSecretKey(key string) ShellConfig
- func SetShellScript(script string) ShellConfig
- func SetShellType(tools string) ShellConfig
Constants ¶
This section is empty.
Variables ¶
var WebShellExports = map[string]interface{}{ "NewWebshell": NewWebShell, "tools": SetShellType, "setProxy": SetProxy, "useBehinder": SetBeinderTool, "useGodzilla": SetGodzillaTool, "useBase64": SetBase64Aes, "useRaw": SetRawAes, "script": SetShellScript, "secretKey": SetSecretKey, "passParams": SetPass, "cmdPath": behinder.SetCommandPath, }
Functions ¶
func SaveShell ¶
func SaveShell(manager BaseShellManager)
Types ¶
type BaseShellManager ¶
type BaseShellManager interface { PacketCodecI PayloadCodecI Ping(opts ...behinder.ExecParamsConfig) (bool, error) BasicInfo(opts ...behinder.ExecParamsConfig) ([]byte, error) CommandExec(cmd string, opts ...behinder.ExecParamsConfig) ([]byte, error) String() string GenWebShell() string }
func NewWebShell ¶
func NewWebShell(url string, opts ...ShellConfig) (BaseShellManager, error)
func NewWebShellManager ¶
func NewWebShellManager(s *ypb.WebShell) (BaseShellManager, error)
type BehidnerResourceSystemAction ¶
type BehidnerResourceSystemAction struct {
// contains filtered or unexported fields
}
func (*BehidnerResourceSystemAction) Delete ¶
func (b *BehidnerResourceSystemAction) Delete(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*BehidnerResourceSystemAction) Do ¶
func (b *BehidnerResourceSystemAction) Do(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*BehidnerResourceSystemAction) Get ¶
func (b *BehidnerResourceSystemAction) Get(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*BehidnerResourceSystemAction) Head ¶
func (b *BehidnerResourceSystemAction) Head(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*BehidnerResourceSystemAction) Post ¶
func (b *BehidnerResourceSystemAction) Post(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*BehidnerResourceSystemAction) Put ¶
func (b *BehidnerResourceSystemAction) Put(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
type Behinder ¶
type Behinder struct { // 连接地址 Url string // 密钥 SecretKey []byte // shell 类型 ShellScript string Proxy string // 自定义 header 头 Headers map[string]string PacketScriptContent string PayloadScriptContent string // contains filtered or unexported fields }
func NewBehinderManager ¶
func NewBehinderManager(url string, opts ...ShellConfig) (*Behinder, error)
func (*Behinder) BasicInfo ¶
func (b *Behinder) BasicInfo(opts ...behinder.ExecParamsConfig) ([]byte, error)
func (*Behinder) ClientRequestEncode ¶
func (*Behinder) ClientRequestEncodeFormGo ¶
func (b *Behinder) ClientRequestEncodeFormGo(en codecFunc)
func (*Behinder) CommandExec ¶
func (*Behinder) EchoResultDecodeFormGo ¶
func (b *Behinder) EchoResultDecodeFormGo(de codecFunc)
func (*Behinder) EchoResultDecodeFormYak ¶
func (*Behinder) EchoResultEncodeFormGo ¶
func (b *Behinder) EchoResultEncodeFormGo(en codecFunc)
func (*Behinder) EchoResultEncodeFormYak ¶
func (*Behinder) GenWebShell ¶
func (*Behinder) ServerResponseDecode ¶
func (*Behinder) SetPacketScriptContent ¶
func (*Behinder) SetPayloadScriptContent ¶
type FileOperation ¶
type FileOperation interface {
Execute(base BaseShellManager) ([]byte, error)
}
type Godzilla ¶
type Godzilla struct { Url string // // 连接参数 Pass string // 密钥 SecretKey []byte // shell 类型 ShellScript string // 加密模式 EncMode string Proxy string // 自定义 header 头 Headers map[string]string // request 开头的干扰字符 ReqLeft string // request 结尾的干扰字符 ReqRight string PacketScriptContent string PayloadScriptContent string // contains filtered or unexported fields }
func NewGodzillaManager ¶
func NewGodzillaManager(url string, opts ...ShellConfig) (*Godzilla, error)
func (*Godzilla) BasicInfo ¶
func (g *Godzilla) BasicInfo(opts ...behinder.ExecParamsConfig) ([]byte, error)
func (*Godzilla) ClientRequestEncode ¶
func (*Godzilla) ClientRequestEncodeFormGo ¶
func (g *Godzilla) ClientRequestEncodeFormGo(en codecFunc)
func (*Godzilla) CommandExec ¶
func (*Godzilla) CustomClassByteCodeDealer ¶
func (*Godzilla) DumpWebappComponent ¶
func (*Godzilla) EchoResultDecodeFormGo ¶
func (g *Godzilla) EchoResultDecodeFormGo(de codecFunc)
func (*Godzilla) EchoResultDecodeFormYak ¶
func (*Godzilla) EchoResultEncodeFormGo ¶
func (g *Godzilla) EchoResultEncodeFormGo(en codecFunc)
func (*Godzilla) EchoResultEncodeFormYak ¶
func (*Godzilla) EvalFunc ¶
func (g *Godzilla) EvalFunc(className, funcName string, parameter *godzilla.Parameter) ([]byte, error)
EvalFunc 个人简单理解为调用远程 shell 的一个方法,以及对指令的序列化,并且发送指令
func (*Godzilla) FileManagement ¶
func (g *Godzilla) FileManagement()
func (*Godzilla) GenWebShell ¶
func (*Godzilla) InjectPayload ¶
func (*Godzilla) InjectPayloadIfNoCookie ¶
func (*Godzilla) InvokeCustomPlugin ¶
func (*Godzilla) KillWebappComponent ¶
KillWebappComponent will unload component given kill `Servlet` need to provide `servletName` eg: `HelloServlet` kill `Filter` need to provide `filterName` eg: `HelloFilter` kill `Listener` need to provide `listenerClass` eg: `com.example.HelloListener` kill `Valve` need to provide `valveID` eg: `1` kill `Timer` need to provide `threadName` kill `Websocket` need to provide `websocketPattern` eg: `/websocket/EchoEndpoint` kill `Upgrade` need to provide `upgradeKey` eg: `version.txt` from goby ysoserial plugin generated kill `Executor` use a fixed value `recovery`
func (*Godzilla) LoadScanWebappComponentInfoPlugin ¶
func (*Godzilla) LoadSuo5Plugin ¶
func (g *Godzilla) LoadSuo5Plugin(className string, memshellType string, path string) ([]byte, error)
LoadSuo5Plugin load suo5 proxy with default memshell type as filter type
func (*Godzilla) ScanWebappComponentInfo ¶
ScanWebappComponentInfo will return target webapp servlet, filter info
func (*Godzilla) ServerResponseDecode ¶
func (*Godzilla) SetPacketScriptContent ¶
func (*Godzilla) SetPayloadScriptContent ¶
type GodzillaFileSystemAction ¶
type GodzillaFileSystemAction struct {
// contains filtered or unexported fields
}
func (*GodzillaFileSystemAction) Delete ¶
func (g *GodzillaFileSystemAction) Delete(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*GodzillaFileSystemAction) Do ¶
func (g *GodzillaFileSystemAction) Do(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*GodzillaFileSystemAction) Get ¶
func (g *GodzillaFileSystemAction) Get(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*GodzillaFileSystemAction) Head ¶
func (g *GodzillaFileSystemAction) Head(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*GodzillaFileSystemAction) Post ¶
func (g *GodzillaFileSystemAction) Post(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
func (*GodzillaFileSystemAction) Put ¶
func (g *GodzillaFileSystemAction) Put(params *ypb.RequestYakURLParams) (*ypb.RequestYakURLResponse, error)
type PacketCodecI ¶
type PayloadCodecI ¶
type ShellConfig ¶
func SetBase64Aes ¶
func SetBase64Aes() ShellConfig
func SetBeinderTool ¶
func SetBeinderTool() ShellConfig
func SetGodzillaTool ¶
func SetGodzillaTool() ShellConfig
func SetPass ¶
func SetPass(pass string) ShellConfig
func SetRawAes ¶
func SetRawAes() ShellConfig
func SetSecretKey ¶
func SetSecretKey(key string) ShellConfig
func SetShellScript ¶
func SetShellScript(script string) ShellConfig
func SetShellType ¶
func SetShellType(tools string) ShellConfig