Documentation
¶
Overview ¶
cron based payloads.
The payload package contains cron and cronjob based payloads.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cron = &CronPayload{}
Functions ¶
This section is empty.
Types ¶
type CronPayload ¶
type CronPayload struct{}
func (*CronPayload) SelfRemovingCron ¶
func (c *CronPayload) SelfRemovingCron(user string, cronPath string, xploitPath string, payload string) (string, string)
Creates two strings that can be used for gaining execution via "/etc/cron.d". The first return ("cron") should be uploaded to "cronPath" (presumably /etc/cron.d but I don't know your life), and the second return should be uploaded to "xploitPath" (e.g. /tmp/helloworld). The cron file will trigger execution of the bash script which will delete both the cron and itself. Example usage:
cronPath := fmt.Sprintf("/etc/cron.d/%s", random.RandLetters(8)) xploitPath := fmt.Sprintf("/tmp/%s", random.RandLetters(8)) xploit, ok := generatePayload(conf) if !ok { return false } cron, xploit := payload.SelfRemovingCron("root", cronPath, xploitPath, xploit)
Click to show internal directories.
Click to hide internal directories.