Documentation
¶
Overview ¶
core - the "core" package is used to organize all primary libraries and utilities that are made use of across several aspects of the application.
This can include anything from custom data structures, to colors for text output.
Index ¶
- Variables
- func AssignWolfBroadcast(username string, rhost string, response string)
- func AssignWolfResponse(username string, rhost string, response string)
- func BroadcastSession(session string)
- func BroadcastWolfPackChat(response string)
- func ChatLog(data string) error
- func ClientLoadExtendedFunctions(activeSession int) []byte
- func DownloadFile(filename string, fileb64 string)
- func ExecuteConnection(rhost string, rport int, protocol string, path string, commandQuery string, ...) (string, error)
- func GeneratePSK() string
- func GenerateSelfSignedCert(ip, host string, days int) error
- func GetFirstUsePSK() (response string, psk string, instructions string, help string)
- func KillListener(id int) (responseSuccess string, responseFail string)
- func LoadExtendedFunctions(sessionApp *grumble.App, activeSession int)
- func LogData(data string) error
- func ManagePSK(psk string, isRandom bool, operator string) (response string, currentPSK string, instruction string)
- func QueueImplantCommand(sessionID int, cmd string, operator string)
- func RegisterSession(sessionID int, protocol string, implant Implant, rhost string, rport int, ...)
- func SessionCheckIn(sessionID int)
- func SessionExists(session int) bool
- func SessionStatusUpdate(sessionID int, status string)
- func ShowListeners() map[string]ListenerStrings
- func ShowSessions() map[string]SessionStrings
- func StartConnector(id int, rhost string, rport int, protocol string, requestType string, ...) (string, error)
- func UpdateImplant(sessionID int, updateInterval float64, arch string, ...)
- func UpdateWolf(username string, rhost string)
- func UploadFile(file string) string
- func WebShellStatus(id int, rhost string, rport int, protocol string, requestType string, ...) (bool, error)
- type Commands
- type Implant
- type Listener
- type ListenerStrings
- type ManageResponse
- type Session
- type SessionStrings
- type StartResponse
- type TCPData
- type Wolf
Constants ¶
This section is empty.
Variables ¶
var ActiveSession = -1
var DidDisplayPsk = false
DidDisplayPsk - a boolean to check if the pre-generated PSK was already given to the user so it is not printed each time
ErrorColorBold - bold red color useful for error messages
ErrorColorBoldIns - insert variant for variables, bold red color useful for error messages
ErrorColorUnderline - underlined bold red color useful for strong error messages
var GreenColor = color.New(color.FgGreen)
GreenColor - green color for text output
var GreenColorIns = color.New(color.FgGreen).SprintFunc()
GreenColorIns - insert variant for variables, green color for text output
var Listeners = make(map[int]Listener)
Listeners - a map of Listeners. This is used to manage listeners that are created by the user. The map structure makes it easy to search, add, modify, and delete a large amount of Listeners.
var MagentaColor = color.New(color.FgMagenta)
MagentaColor - magenta color for text output
MagentaColorBold - bold magenta color for text output
var PSK string
PSK - global PSK for listeners to manage and set the server PSK
var PersistenceMode bool
PersistenceMode - a boolean to check to see if persistence mode is enabled/disabled
var RedColor = color.New(color.FgRed)
RedColor - red color for text output
var RedColorIns = color.New(color.FgRed).SprintFunc()
RedColorIns - insert variant for variables, red color for text output
var SessionID int = 0
var Sessions sync.Map
SuccessColorBold - bold green color useful for success messages
WarningColorBold - bold yellow color useful for warning messages
var Wolves = make(map[string]Wolf)
Wolves - map of all operators (wolves). This is used to manage wolf pack server users that have been generated. The map structure makes it easy to search, add, modify, and delete a large amount of Wolves.
var ZeroedUUID, _ = uuid.Parse("00000000-0000-0000-0000-000000000000")
ZeroedUUID - zeroed global used to clear UUIDs wherever applicable
Functions ¶
func AssignWolfBroadcast ¶
AssignWolfBroadcast - this function takes in a username and rhost to keep track of the user being assigned the broadcast message. The response parameter is then updated and linked to a wolf which will be returned by the WolfPack Server.
func AssignWolfResponse ¶
AssignWolfResponse - this function takes in a username and rhost to keep track of the user being assigned the response. The response parameter is then updated and linked to a wolf which will be returned by the WolfPack Server.
func BroadcastSession ¶
func BroadcastSession(session string)
func BroadcastWolfPackChat ¶
func BroadcastWolfPackChat(response string)
BroadcastWolfPackChat - this function takes in a chat message response and broadcasts it to all wolves, they will only receive it if making a request from the Chat CLI. The response parameter is then updated and linked to each wolf which will be returned by the WolfPack Server.
func DownloadFile ¶
DownloadFile - Reads a base64 encoded string and writes it out to a local file
func ExecuteConnection ¶
func GeneratePSK ¶
func GeneratePSK() string
GeneratePSK - Generates a random 32 character string, encodes it with SHA256 as a PSK that is set by default on startup unless the user specifies a static PSK
func GenerateSelfSignedCert ¶ added in v1.1.0
func GetFirstUsePSK ¶
func KillListener ¶
KillListener - kills a listener with the specified id and returns the response
func LoadExtendedFunctions ¶
func LogData ¶
LogData - wrapper function to use golang's built in logger and append all operational data to a central log file
func QueueImplantCommand ¶
QueueImplantCommand - adds a command to the implant’s queue
func RegisterSession ¶
func SessionCheckIn ¶
func SessionCheckIn(sessionID int)
func SessionExists ¶
func SessionStatusUpdate ¶
func ShowListeners ¶
func ShowListeners() map[string]ListenerStrings
ShowListeners - returns a string map of Listeners and their details
func ShowSessions ¶
func ShowSessions() map[string]SessionStrings
func StartConnector ¶
func UpdateImplant ¶
func UpdateImplant(sessionID int, updateInterval float64, arch string, functions map[string]interface{})
UpdateImplant - updates fields of an implant during check-in
func UpdateWolf ¶
UpdateWolf - updates the properties of an individual wolfpack user for processing elsewhere in the application. Updates the current command in the queue and the remote host connection value.
func UploadFile ¶
UploadFile - Reads a file to be uploaded and converts it to base64 to pass to the server as a response for the session
Types ¶
type Implant ¶
type Implant struct {
ID uuid.UUID
Arch string
Commands []Commands
Update float64
Functions map[string]interface{}
// contains filtered or unexported fields
}
Implant - defines an implant structure composed of:
type Listener ¶
type Listener struct {
ID int
Lhost string
Lport int
Protocol string
HTTPInstance *http.Server
TCPInstance net.Listener
CryptoPSK string
}
Listener - defines a listener structure composed of:
id - unique identifier that is autoincremented on creation of a new listener
lhost - the "listening" host address. This tells a listener what interface to listen on based on the address it is tied to.
lport - the "listening" port. This tells a listener what port the lhost of the listener should open to receive connections on.
protocol - the protocol to use when listening for incoming connections. Currenlty supports HTTP(S) and TCP.
httpInstance - a pointer to an instance of the http.Server struct. This is used to reference the core HTTP Server itself when conducting operations such as starting/stopping a listener.
tcpInstance - a copy of the net.Listener struct. This is used to interact with the core TCP Server itself when conducting operations such as starting/stopping a listener.
type ListenerStrings ¶
ListenerStrings - more loose structure for handling listener data, primarily used to hand off as JSON to the lupo client. Contains all the same fields as a Listener structure but as string data types and omits the HTTP/TCPInstance values.
type ManageResponse ¶
type SessionStrings ¶
type StartResponse ¶
type Wolf ¶
type Wolf struct {
WolfPSK string
Username string
Rhost string
Response string
Broadcast string
Checkin string
}
Wolf - defines a user structure known as a "wolf" composed of:
WolfPSK - unique PSK randomly generated and seeded into the compilation of the wolfpack client binary on creation of a new user for authentication to the wolfpack server ¶
Username - a username to identify the user connecting to the wolfpack server ¶
Rhost - the "remote" host address. This contains a value of the external IP where a wolpack user is connecting from.
Response - a response to transmit to the wolfpack user (may not be necessary if the server handler loop takes care of this once implemented)