Documentation
¶
Overview ¶
Package internalnetkit performs internal-network reconnaissance from an established foothold (docs 究极渗透能力包实现方案 §4.10, phase P2).
Everything here runs THROUGH a core.Session: host surveys, live-host discovery, port scanning, domain information gathering and SMB share enumeration are all executed on the target side with `Exec`, never from the machine running the kit. Sessions are resolved from core.Deps.Sessions, so a WebShell, SSH, WinRM or CLI foothold is used identically.
Output parsing lives in parse.go as pure functions (cheap to test, fail closed: an unparseable command yields an empty result rather than a guess).
Index ¶
- func Manifest() core.Manifest
- func NewCapability(deps core.Deps) (core.Capability, error)
- type ARPEntry
- type Adapter
- type Capability
- type DiscoveredHost
- type DomainInfo
- type HostDiscovery
- type Ipconfig
- type Listener
- type LocalInfo
- type NetInterface
- type OpenPort
- type PortScan
- type Process
- type Route
- type SMBResult
- type Share
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCapability ¶
func NewCapability(deps core.Deps) (core.Capability, error)
NewCapability builds the capability.
Types ¶
type ARPEntry ¶
type ARPEntry struct {
IP string `json:"ip"`
MAC string `json:"mac,omitempty"`
Iface string `json:"iface,omitempty"`
Type string `json:"type,omitempty"`
}
ARPEntry is one neighbour-cache entry (linux `arp -a`, windows `arp -a`).
type Adapter ¶
type Adapter struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
MAC string `json:"mac,omitempty"`
IPv4 []string `json:"ipv4,omitempty"`
Mask string `json:"mask,omitempty"`
Gateway string `json:"gateway,omitempty"`
DNS []string `json:"dns,omitempty"`
DHCP bool `json:"dhcp,omitempty"`
}
Adapter is one windows network adapter.
type Capability ¶
type Capability struct {
// contains filtered or unexported fields
}
Capability exposes the internal-network reconnaissance tools.
func (*Capability) Call ¶
Call dispatches one tool invocation and normalizes the envelope on every return path (Status/OK/Meta.Tool/Meta.Version/Summary clamp).
func (*Capability) Manifest ¶
func (c *Capability) Manifest() core.Manifest
Manifest implements core.Capability.
type DiscoveredHost ¶
type DiscoveredHost struct {
Host string `json:"host"`
Method string `json:"method,omitempty"`
MAC string `json:"mac,omitempty"`
}
DiscoveredHost is one live host found through the foothold.
type DomainInfo ¶
type DomainInfo struct {
Domain string `json:"domain,omitempty"`
Users []string `json:"users,omitempty"`
Groups []string `json:"groups,omitempty"`
Trusts []string `json:"trusts,omitempty"`
DCs []string `json:"dcs,omitempty"`
}
DomainInfo is the tool payload.
type HostDiscovery ¶
type HostDiscovery struct {
CIDR string `json:"cidr"`
Method string `json:"method"`
Probed int `json:"probed"`
Truncated bool `json:"truncated"`
Hosts []DiscoveredHost `json:"hosts"`
}
HostDiscovery is the tool payload.
type Ipconfig ¶
type Ipconfig struct {
Hostname string `json:"hostname,omitempty"`
Domain string `json:"domain,omitempty"`
Adapters []Adapter `json:"adapters,omitempty"`
}
Ipconfig is a parsed windows `ipconfig /all`.
type Listener ¶
type Listener struct {
Proto string `json:"proto,omitempty"`
Local string `json:"local,omitempty"`
Port int `json:"port,omitempty"`
State string `json:"state,omitempty"`
PID int `json:"pid,omitempty"`
Process string `json:"process,omitempty"`
}
Listener is one listening socket (linux `ss -tunlp`, windows `netstat -ano`).
type LocalInfo ¶
type LocalInfo struct {
OS string `json:"os,omitempty"`
Hostname string `json:"hostname,omitempty"`
User string `json:"user,omitempty"`
Kernel string `json:"kernel,omitempty"`
OSRelease string `json:"os_release,omitempty"`
Interfaces []NetInterface `json:"interfaces,omitempty"`
Routes []Route `json:"routes,omitempty"`
Users []string `json:"users,omitempty"`
Admins []string `json:"admins,omitempty"`
Logins []string `json:"logins,omitempty"`
ARP []ARPEntry `json:"arp,omitempty"`
Listeners []Listener `json:"listeners,omitempty"`
Processes []Process `json:"processes,omitempty"`
Errors []string `json:"errors,omitempty"`
}
LocalInfo is the structured host survey payload.
type NetInterface ¶
type NetInterface struct {
Name string `json:"name,omitempty"`
MAC string `json:"mac,omitempty"`
IPv4 []string `json:"ipv4,omitempty"`
IPv6 []string `json:"ipv6,omitempty"`
Mask string `json:"mask,omitempty"`
State string `json:"state,omitempty"`
}
NetInterface is one local network interface (linux `ip addr`, windows `ipconfig /all`).
type OpenPort ¶
type OpenPort struct {
Host string `json:"host"`
Port int `json:"port"`
Service string `json:"service,omitempty"`
}
OpenPort is one open port discovered through the foothold.
type PortScan ¶
type PortScan struct {
ProbedHosts int `json:"probed_hosts"`
ProbedPorts int `json:"probed_ports"`
Truncated bool `json:"truncated"`
OpenCount int `json:"open_count"`
TotalOpen int `json:"total_open"`
Open []OpenPort `json:"open"`
}
PortScan is the tool payload.
type Route ¶
type Route struct {
Dest string `json:"dest"`
Gateway string `json:"gateway,omitempty"`
Iface string `json:"iface,omitempty"`
Metric string `json:"metric,omitempty"`
}
Route is one routing-table entry (linux `ip route`, windows `route print`).