Documentation
¶
Index ¶
- Constants
- type AgentKillRequestPacket
- type ConnectRequestPacket
- type ConnectResponsePacket
- type Envelope
- type HostPingRequestPacket
- type HostPingResponsePacket
- type InfoReplyPacket
- type InfoRequestPacket
- type LigoloDecoder
- type LigoloEncoder
- type LigoloEncoderDecoder
- type ListenerBindPacket
- type ListenerBindReponse
- type ListenerCloseRequestPacket
- type ListenerCloseResponsePacket
- type ListenerRequestPacket
- type ListenerResponsePacket
- type ListenerSockRequestPacket
- type ListenerSockResponsePacket
- type ListenerSocketConnectionReady
- type ListenerUDPPacket
- type NetInterface
Constants ¶
const ( MessageInfoRequest = uint8(iota) MessageInfoReply MessageConnectRequest MessageConnectResponse MessageHostPingRequest MessageHostPingResponse MessageListenerRequest // Start a listener MessageListenerResponse MessageListenerBindRequest // Bind to a listener MessageListenerBindResponse MessageListenerSockRequest // Bind to a socket MessageListenerSockResponse MessageListenerCloseRequest MessageListenerCloseResponse MessageAgentKillRequest MessageListenerSocketConnectionReady )
const ( TransportTCP = uint8(iota) TransportUDP )
const ( Networkv4 = uint8(iota) Networkv6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentKillRequestPacket ¶ added in v0.8.1
type AgentKillRequestPacket struct{}
AgentKillRequestPacket is sent by the proxy to terminate an agent
type ConnectRequestPacket ¶
ConnectRequestPacket is sent by the proxy to request a new TCP/UDP connection
type ConnectResponsePacket ¶
ConnectResponsePacket is the response to the ConnectRequestPacket and indicate if the connection can be established, and if a RST packet need to be sent
type Envelope ¶
type Envelope struct {
Type uint8
Payload interface{}
}
Envelope is the structure used when Encoding/Decode ligolo packets
type HostPingRequestPacket ¶
type HostPingRequestPacket struct {
Address string
}
HostPingRequestPacket is used when a ICMP packet is received on the proxy server. It is used to request a ping request to the agent
type HostPingResponsePacket ¶
type HostPingResponsePacket struct {
Alive bool
}
HostPingResponsePacket is sent by the agent to indicate the requested host status
type InfoReplyPacket ¶
type InfoReplyPacket struct {
Name string
Interfaces []NetInterface
SessionID string
}
InfoReplyPacket contains the Name of the agent and the network interfaces configuration
type InfoRequestPacket ¶
type InfoRequestPacket struct {
}
InfoRequestPacket is sent by the proxy to discover the agent information
type LigoloDecoder ¶
type LigoloDecoder struct {
Payload interface{}
// contains filtered or unexported fields
}
LigoloDecoder is the struct containing the decoded Envelope and the reader
func NewDecoder ¶
func NewDecoder(reader io.Reader) LigoloDecoder
NewDecoder decode Ligolo-ng packets
func (*LigoloDecoder) Decode ¶
func (d *LigoloDecoder) Decode() error
Decode read content from the reader and fill the Envelope
type LigoloEncoder ¶
type LigoloEncoder struct {
// contains filtered or unexported fields
}
LigoloEncoder is the structure containing the writer used when encoding Envelopes
func NewEncoder ¶
func NewEncoder(writer io.Writer) LigoloEncoder
NewEncoder encode Ligolo-ng packets
func (*LigoloEncoder) Encode ¶
func (e *LigoloEncoder) Encode(payload interface{}) error
Encode an Envelope packet and write the result into the writer
type LigoloEncoderDecoder ¶ added in v0.5.1
type LigoloEncoderDecoder struct {
LigoloDecoder
LigoloEncoder
}
func NewEncoderDecoder ¶ added in v0.5.1
func NewEncoderDecoder(rw io.ReadWriter) LigoloEncoderDecoder
type ListenerBindPacket ¶
type ListenerBindPacket struct {
ListenerID int32
}
ListenerBindPacket is used by the proxy to Bind to a ListenerID, waiting for connections.
type ListenerBindReponse ¶
ListenerBindReponse is returned when listener sockets are ready to be relayed from the agent to the proxy.
type ListenerCloseRequestPacket ¶
type ListenerCloseRequestPacket struct {
ListenerID int32
}
ListenerCloseRequestPacket is the packet sent when closing Listeners
type ListenerCloseResponsePacket ¶
ListenerCloseResponsePacket is the response to ListenerCloseRequestPacket
type ListenerRequestPacket ¶
ListenerRequestPacket is used when a new listener socket is created by the proxy.
type ListenerResponsePacket ¶
ListenerResponsePacket is used to indicate if the Listener was created, and send the ListenerID.
type ListenerSockRequestPacket ¶
type ListenerSockRequestPacket struct {
SockID int32
}
ListenerSockRequestPacket is used by the proxy when relaying a listener socket
type ListenerSockResponsePacket ¶
ListenerSockRequestPacket is the response to ListenerSockRequestPacket
type ListenerSocketConnectionReady ¶ added in v0.7.4
type ListenerSocketConnectionReady struct {
Err bool
}
type NetInterface ¶
type NetInterface struct {
Index int // positive integer that starts at one, zero is never used
MTU int // maximum transmission unit
Name string // e.g., "en0", "lo0", "eth0.100"
HardwareAddr net.HardwareAddr // IEEE MAC-48, EUI-48 and EUI-64 form
Flags net.Flags // e.g., FlagUp, FlagLoopback, FlagMulticast
Addresses []string
}
NetInterface is the structure containing the agent network informations
func NewNetInterfaces ¶
func NewNetInterfaces(netif []net.Interface) (out []NetInterface)
NewNetInterfaces converts a net.Interface slice to a NetInterface slice that can be transmitted over Gob
func (NetInterface) MarshalJSON ¶ added in v0.8.1
func (ni NetInterface) MarshalJSON() ([]byte, error)