{"id":191,"date":"2004-07-02T18:45:12","date_gmt":"2004-07-02T11:45:12","guid":{"rendered":""},"modified":"2004-07-02T18:45:12","modified_gmt":"2004-07-02T11:45:12","slug":"mac-os-x-stores-loginkeychainfilevault-passwords-on-disk","status":"publish","type":"post","link":"https:\/\/deepquest.code511.com\/blog\/2004\/07\/mac-os-x-stores-loginkeychainfilevault-passwords-on-disk\/","title":{"rendered":"Mac OS X stores login\/Keychain\/FileVault passwords on disk"},"content":{"rendered":"<p>It seems that Mac OS X (10.3.4 tested) doesn&#8217;t bother clearing memory<br \/>\ncontaining sensitive data, or using mlock() to avoid swapping.<br \/>\nA quick grep of the swapfiles will show up various morsels<!--more--><\/p>\n<p>rez:~> sudo strings -8 \/var\/vm\/swapfile0 |grep -A 4 -i longname<br \/>\nlongname<br \/>\npassword<br \/>\n<user's password here><br \/>\n\/bin\/zsh<br \/>\nusername<br \/>\n&#8212;<br \/>\n&#8230; various other occurrences follow<\/p>\n<p>Grepping for context around &#8220;password&#8221; also shows up results, and grepping<br \/>\nfor portions of a Keychain password (differing from the login password)<br \/>\nwill also get results. It appears that loginwindow is one of the apps involved,<br \/>\nI haven&#8217;t investigated what else is involved. The amount of memory and usage<br \/>\npatterns of the machine will affect what gets swapped, though loginwindow seems<br \/>\nlikely to get swapped early since it is seldom used after login.<\/p>\n<p>Obviously this is only of interest if an attacker has root (or physical)<br \/>\naccess to a machine, however it does make FileVault or Keychain encryption<br \/>\nfairly useless. It appears that the swapfiles are removed on shutdown or<br \/>\nstartup, though not wiped &#8211; pulling the power from a sleeping machine, and\/or<br \/>\nbooting from CD, would quite easily retrieve the password(s).<\/p>\n<p>Reported to Apple on 21 June, I haven&#8217;t had any response. It&#8217;d be nice if<br \/>\nthey at least said &#8220;we&#8217;re taking a look if it&#8217;s an issue&#8221;.<\/p>\n<p>found by Matt<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac OS X stores login\/Keychain\/FileVault passwords on disk<\/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-191","post","type-post","status-publish","format-standard","hentry","category-apple"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4bBYZ-35","_links":{"self":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/191","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=191"}],"version-history":[{"count":0,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"wp:attachment":[{"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deepquest.code511.com\/blog\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}