Documentation
¶
Overview ¶
Package shellkit exposes the WebShell/C2 foothold as capkit session tools. It owns no transport itself: the host injects a session.Executor for WebShells and a core.SessionManager, and these tools drive them through the same contract SSH and WinRM use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCapability ¶
func NewCapability(deps core.Deps) (core.Capability, error)
NewCapability builds the session capability.
func NewCapabilityWithDeployer ¶
func NewCapabilityWithDeployer(deps core.Deps, deployer WebShellDeployer) (core.Capability, error)
NewCapabilityWithDeployer builds the session capability with a host-supplied delivery channel, which is what enables webshell_deploy. The deployer cannot ride in core.Deps because it is shellkit-specific (the same reason enterprisekit takes its resolver separately).
Types ¶
type Capability ¶
type Capability struct {
// contains filtered or unexported fields
}
Capability exposes foothold management and session operations as tools. Everything routes through core.SessionManager, so a WebShell, SSH or WinRM session is used identically.
func (*Capability) Manifest ¶
func (c *Capability) Manifest() core.Manifest
Manifest implements core.Capability.
type WebShellDeployer ¶
type WebShellDeployer interface {
Drop(ctx context.Context, req WebShellDrop) (*WebShellDropResult, error)
}
WebShellDeployer is the host boundary for actually placing a shell on the target. The host owns the transport — typically the same gate-aware HTTPDoer it used for the probe that confirmed execution — and must apply its own scope/approval/evidence policy on top of the runtime's.
type WebShellDrop ¶
type WebShellDrop struct {
TargetURL string
Method string
Dir string
Filename string
Content []byte
SHA256 string
ShellType string
CmdParam string
PassParam string
// Password is the connection secret baked into the payload. The host needs
// it to register the session; it must not be logged or stored in evidence.
Password string
Variant string
Protocol string
}
WebShellDrop is what the host is handed: the rendered payload plus where it should go. Content is the exact bytes to write; the host decides how.
type WebShellDropResult ¶
type WebShellDropResult struct {
FileURL string
// Cleanup is the command that removes the file (e.g. `rm -f /var/www/x.php`).
Cleanup string
// CleanupURL, when set, is an URL that removes the file when requested.
CleanupURL string
}
WebShellDropResult is what the host reports back. FileURL is the URL that serves the dropped shell, and the tool turns it into a session_open spec.
type WebShellOpener ¶
WebShellOpener adapts a host session.Executor into a core.SessionOpener for kind "webshell". Shell parameters (cmd param, password, protocol) travel in SessionSpec.Options so the tool input stays transport-neutral.
func (*WebShellOpener) Open ¶
func (o *WebShellOpener) Open(_ context.Context, spec core.SessionSpec) (core.Session, error)
Open builds a WebShell-backed core.Session.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package delivery contains the pure delivery state machine.
|
Package delivery contains the pure delivery state machine. |
|
Package listener is a small Go reverse-shell session manager.
|
Package listener is a small Go reverse-shell session manager. |
|
Package memshell 内存马注入载荷生成。
|
Package memshell 内存马注入载荷生成。 |
|
Package payload renders minimal, protocol-compatible WebShell payloads.
|
Package payload renders minimal, protocol-compatible WebShell payloads. |
|
Package plan describes a WebShell delivery without performing it.
|
Package plan describes a WebShell delivery without performing it. |
|
Package shell WebShell 流量协议层。
|
Package shell WebShell 流量协议层。 |
|
adapter.go bridges the WebShell model (Session + host Executor) to the core.Session contract, so a WebShell foothold gets the same Exec/upload/ download surface as SSH and every downstream kit works against it unchanged.
|
adapter.go bridges the WebShell model (Session + host Executor) to the core.Session contract, so a WebShell foothold gets the same Exec/upload/ download surface as SSH and every downstream kit works against it unchanged. |