-Nuke- schrieb:
Achja. Warum ein Passwort im RAM bleiben muss?
Weil es mit der Anmeldung nicht getan ist. Sonst könntest du gar nicht auf deine Daten, bzw. deine gespeicherten Kennwörter zugreifen. Außer du gibst alle 5 Sekunden dein Kennwort ein.
Das ist imho falsch.
Das (Klartext) Passwort brauchst du nur, wenn du es direkt mit einem anderen String (z.B. Klartext PW, gespeichert auf der Festplatte) vergleichen willst, was an sich schon ein Kardinalfehler ist.
Grundsätzlich sollten Passwörter
immer unmittelbar nach der Eingabe einem Kryptografischen Hash-Verfahren unterzogen werden, sodass anschließend für alle weiteren Zwecke nur noch mit dem Has-Wert gearbeitet werden muss.
Diese Kryptografischen Hash-Werte haben die Eigenschaft, dass man von ihnen nicht auf die Eingabe (Klartext Passwort) zurückschließen kann.
=> D.h., wenn ich den Hash-Wert kenne nützt mir das erstmal garnix, da ich ihn nicht in das System hereinbekomme, weil die Login-Routine das Klartext-Passwort und nicht einen Hash-Wert einliest.
Dieses System lässt sich dann nur durchbrechen, wenn die Login-Routine, die normalerweise das Passwort einliest und die Umwandlung in den Hash-Wert vornimmt, ausgetauscht wird durch eine, die man mit einem zuvor erbeuteten Hash-Wert füttern kann.
Auch wenn es keine absolute Sicherheit gibt und das persönliche Sicherheitsbedürfnis des Einzelnen durch ein Abwägen aus Bedrohungsgefühl, akzeptablen Unbequemlichkeiten und weiteren Faktoren ist, so sollte man doch
seit langem bekannte Standardfettnäpfchen (s.u.) vermeiden.
Insbesondere, wenn die Sicherheit der betroffenen Systemkomponente werblich besonders heraus gestellt wird.
[edit] Im übrigen betrifft dieses Problem nicht nur das FileVault Passwort.
Auch komplett verschlüsselte USB Disks könnten sich (auszugsweise) im Klartext im Swap-File finden, wenn man dies nicht explizit verhindert. [/edit]
Gruß,
?=?
PS.: "Login-Routine" ist bewusst undifferenziert ausgedrückt. Mir ist klar, dass es in "Wirklichkeit" um eine komplexe Kombination von (PAM-) Modulen innerhalb eines Login-Prozesses geht, was aber für die Betrachtung der Hash-Werte nebensächlich ist.
PPS.:
Auszug aus Phil Zimmermanns "Introduction to Cryptography" 1990-2000; eins von elf erwähnten "Standardfettnäpfchen".
Swap files or virtual memory
PGP was originally developed for MS-DOS, a primitive operating system by
today’s standards. But as it was ported to other more complex operating
systems, such as Microsoft Windows and the Macintosh OS, a new
vulnerability emerged. This vulnerability stems fromthe fact that these fancier
operating systems use a technique called virtual memory.
Virtual memory allows you to run huge programs on your computer that are
bigger than the space available in your computer’s semiconductor memory
chips. This is handy because software has become more and more bloated
since graphical user interfaces became the norm and users started running
several large applications at the same time. The operating system uses the hard
disk to store portions of your software that aren't being used at the moment.
This means that the operating system might, without your knowledge, write
out to disk some things that you thought were kept only in main
memory—things like keys, passphrases, and decrypted plaintext. PGP does
not keep that kind of sensitive data lying around in memory for longer than
necessary, but there is some chance that the operating system could write it
out to disk anyway.
The data is written out to some scratchpad area of the disk, known as a swap
file. Data is read back in fromthe swap file as needed, so that only part of your
program or data is in physical memory at any one time. All this activity is
invisible to the user, who just sees the disk chattering away. Microsoft
Windows swaps chunks of memory, called pages, using a Least RecentlyUsed
(LRU) page-replacement algorithm. This means pages that have not been
accessed for the longest period of time are the first ones to be swapped to the
disk. This approach suggests that in most cases the risk is fairly low that
sensitive data will be swapped out to disk, because PGP doesn’t leave it in
memory for very long. Also, where possible, we try to ask the operating
system to lock that data in memory and not allow it to be swapped. But we
don’t make any guarantees.
This swap file can be accessed by anyone who can get physical access to your
computer. If you are concerned about this problem, you may be able to solve
it by obtaining special software that overwrites your swap file. Another
possible cure is to turn off your operating system’s virtual memory feature.
Microsoft Windows allows this, and so does the Mac OS. Turning off virtual
memory may mean that you need to have more physical RAM chips installed
in order to fit everything in RAM.