Documentation ¶
Index ¶
- func AddAgent(agentkey string, agentname string, os string, osType string, osVers string, ...)
- func AddComment(agentKey string, comment string, username string) (bool, string, string)
- func AddDropper(name string, dtype string, userid string, lkey string, timegen time.Time)
- func AddListener(key string, name string, ltype string, host string, bindport string, ...)
- func AddLoot(agentkey string, user string, password string, hash string, credtype string, ...)
- func AddUser(username string, clearPassword string, admin int) (bool, string)
- func AddWebshell(url string, authToken string, webkey string, os string, hostname string, ...)
- func AgentByListener() string
- func AgentCheckin(agentName string)
- func AgentOSTypes() string
- func AgentTimeline() []string
- func ChangeUserPassword(userid string, newdata string, oldpass string) (bool, string)
- func CheckBackup() (bool, string, string)
- func CheckListener(lName string) (bool, string)
- func CheckMFA(userID string) bool
- func CheckPassword(password string, hashedPassword string) bool
- func CloseDB() bool
- func DeleteAgent(agentkey string)
- func EditListener(key string, name string, ltype string, host string, bindport string, ...)
- func EditPassLoot(password string, hash string) (bool, int)
- func FirstUser(username string, clearPassword string) bool
- func GetAgentData() *sql.Rows
- func GetAgentPivotData() *sql.Rows
- func GetListenerKeys() ([]string, map[string]string, map[string]string, map[string]string)
- func GetListenerPrivateKey(key string) string
- func GetListeners() *sql.Rows
- func GetMFASecret(userID string) string
- func InitAppSettings(mfa bool, passLegnth int) bool
- func Initalize(filename string)
- func ListAllLoot() string
- func ListComments(agentKey string) (string, string)
- func ListLoot(agentkey string) string
- func ListWebShell() *sql.Rows
- func ListenerExists(name string) bool
- func Login(user string, pass string) (bool, string, bool, bool, bool, bool)
- func OpenDB(filename string)
- func ParseSocket(fname string, data interface{}, ws *websocket.Conn, admin bool, userid string)
- func RemoveListener(lName string)
- func SetAgentName(agentKey string, agentName string) (string, string)
- func SetSchedule(hour string, days []byte, status bool) bool
- func SetupMFA(userID string, secret string) bool
- func WebShellDeactivate(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAgent ¶
func AddAgent(agentkey string, agentname string, os string, osType string, osVers string, av []byte, hostname string, username string, localip string, externalip string, path string, shell1 string, shell2 string, shell3 string, pid int, isAdmin bool, isElevated bool, active int, listenerkey string)
AddAgent adds an agent to the database Might want to change this so it just passes a struct but i dont think it really matters from a performance standpoint.. This can be applied to all of the add functions within this package
func AddComment ¶
AddComment will add the user comment per the agent they are commenting on
func AddDropper ¶
AddDropper adds a dropper to the db
func AddListener ¶
func AddListener(key string, name string, ltype string, host string, bindport string, pubkey []byte, privkey []byte, advanced string, agentdelay string, agentjitter string, agenteol string, agentlivehours string, userid string)
AddListener adds a listener to the db
func AddLoot ¶
func AddLoot(agentkey string, user string, password string, hash string, credtype string, ssp string, host string, domain string, isWebShell bool)
AddLoot adds loot to the db
func AddWebshell ¶
func AddWebshell(url string, authToken string, webkey string, os string, hostname string, username string, localIP string, domain string)
AddWebshell will add an initalized webshell into the database
func AgentByListener ¶
func AgentByListener() string
AgentByListener returns the listener for all agents in the DB
func AgentCheckin ¶
func AgentCheckin(agentName string)
AgentCheckin updates the last checkin time for the agent
func AgentTimeline ¶
func AgentTimeline() []string
AgentTimeline returns the time for all agents in the DB
func ChangeUserPassword ¶
ChangeUserPassword will force the user to change their password and update lastlogin
func CheckBackup ¶
CheckBackup checks the schedule of when a backup should run
func CheckListener ¶
CheckListener checks to ensure listener exists for moving laterally
func CheckPassword ¶
CheckPassword verifies that the password is correct
func CloseDB ¶
func CloseDB() bool
CloseDB closes the db to ensure we can archive it in a zip folder
func DeleteAgent ¶
func DeleteAgent(agentkey string)
DeleteAgent switches the active bit from 1 to 0 when called
func EditListener ¶
func EditListener(key string, name string, ltype string, host string, bindport string, pubkey []byte, privkey []byte, advanced string, agentdelay string, agentjitter string, agenteol string, agentlivehours string, userid string)
EditListener changes the listener's settings to the new user supplied ones
func EditPassLoot ¶
EditPassLoot edits loot entry to add a password
func GetAgentData ¶
GetAgentData returns the data needed to reinit agents into memory
func GetAgentPivotData ¶
GetAgentPivotData returns some data about the agents for the pivot graph
func GetListenerKeys ¶
GetListenerKeys returns a slice of all listeners
func GetListenerPrivateKey ¶
GetListenerPrivateKey returns the private key for the listener
func GetListeners ¶
GetListeners gets everything on listeners out of the database and returns it
func GetMFASecret ¶
GetMFASecret gets the MFA secret for the requesting user
func InitAppSettings ¶
InitAppSettings sets up the requirements for the users on the web app
func Initalize ¶
func Initalize(filename string)
Initalize is run when the server spins up, it's used to verify the sqlite db or create it
func ListComments ¶
ListComments will get all comments for that specific agent
func ListWebShell ¶
ListWebShell will list all the webshells existing in the database
func ListenerExists ¶
ListenerExists returns true if the listener exists
func OpenDB ¶
func OpenDB(filename string)
OpenDB is just to open the database and put it into the global variable
func ParseSocket ¶
ParseSocket parses calls to make DB edits from the frontend
func SetAgentName ¶
SetAgentName sets the agent name in the DB
func SetSchedule ¶
SetSchedule sets the schedule for when a backup should run
func WebShellDeactivate ¶
func WebShellDeactivate(name string)
WebShellDeactivate will flip the active bit from 1 to 0 when delete WebShell is called
Types ¶
This section is empty.