Difference between pages "HFS+" and "Rekall"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
m (Category:Disk file systems)
 
m (Linux)
 
Line 1: Line 1:
HFS+, or Hierarchical File System Plus, is the file system designed by Apple Computer[http://www.apple.com] to supersede HFS. First introduced with Mac OS 8.1, one of the biggest differences was the lower allocation block size of 4kb, which increased performance and lowered fragmentation [http://developer.apple.com/technotes/tn/tn1121.html#HFSPlus]. It also implemented Unicode (rather than Mac proprietary formats) for naming files.
+
{{Infobox_Software |
 +
  name = Rekall |
 +
  maintainer = [[Michael Cohen]] |
 +
  os = {{Cross-platform}} |
 +
  genre = {{Memory analysis}}, {{Memory imaging}} |
 +
  license = {{GPL}} |
 +
  website = [https://code.google.com/p/rekall/ code.google.com/p/rekall/] |
 +
}}
  
There are structurally many differences between HFS and HFS+, which are listed below[http://developer.apple.com/technotes/tn/tn1150.html#HFSPlusBasics]:
+
Rekall is the stand-alone continuation of the [[Volatility]] Technology Preview (TP) version, aka the scudette branch.
<br><br>
+
<CENTER><TABLE Border=1 cellpadding=2 cellspacing=0 width=75%>
+
            <TR>
+
              <TD>
+
                  <P><B>Feature</B></p>
+
  
              </TD><TD>
+
One of Rekalls goals is to provide better integration with [[GRR]] by improved modularity of the framework and having memory acquisition capability.[http://docs.rekall.googlecode.com/git/overview.html#_history]
                  <P><B>HFS</B></p>
+
              </TD><TD>
+
                  <P><B>HFS Plus</B></p>
+
              </TD><TD>
+
                  <P><B>Benefit/Comment</B></p>
+
              </TD></TR>
+
  
            <TR>
+
== Memory acquisition drivers ==
              <TD>
+
                  <P>User visible name</p>
+
              </TD><TD>
+
                  <P>Mac OS Standard</p>
+
              </TD><TD>
+
                  <P>Mac OS Extended</p>
+
  
              </TD><TD>
+
The drivers can be found under:
                  <P></p>
+
<pre>
              </TD></TR>
+
rekall/tools/linux
            <TR>
+
rekall/tools/osx
              <TD>
+
rekall/tools/windows
                  <P>Number of allocation blocks</p>
+
</pre>
              </TD><TD>
+
                  <P>16 bits worth</p>
+
  
              </TD><TD>
+
=== Linux ===
                  <P>32 bits worth</p>
+
In rekall RC11 the advanced Linux acquisition tool (LMAP) was added. lmap allows to inject the pmem functionality into existing kernel modules to bypass having to build a pmem kernel module for every different kernel version. See the corresponding DFRWS EU 2014 paper for more information about LMAP.
              </TD><TD>
+
                  <P>Radical decrease in disk space used on large
+
                  volumes, and a larger number of files per volume.</p>
+
              </TD></TR>
+
            <TR>
+
              <TD>
+
                  <P>Long file names</p>
+
  
              </TD><TD>
+
To build the kernel module for the current kernel version, make sure you have a working build environment and the kernel headers installed. Change into this directory and run make:
                  <P>31 characters</p>
+
<pre>
              </TD><TD>
+
cd rekall/tools/linux/
                  <P>255 characters</p>
+
make
              </TD><TD>
+
</pre>
                  <P>Obvious user benefit; also improves
+
                  cross-platform compatibility</p>
+
              </TD></TR>
+
  
            <TR>
+
The acquisition driver is named pmem.ko.
              <TD>
+
                  <P>File name encoding</p>
+
              </TD><TD>
+
                  <P>MacRoman</p>
+
              </TD><TD>
+
                  <P>Unicode</p>
+
  
              </TD><TD>
+
To load the driver:
                  <P>Allows for international-friendly file names,
+
<pre>
                  including mixed script names</p>
+
sudo insmod pmem.ko
              </TD></TR>
+
</pre>
            <TR>
+
              <TD>
+
                  <P>File/folder attributes</p>
+
              </TD><TD>
+
                  <P>Support for fixed size attributes (FileInfo and
+
                  ExtendedFileInfo)</p>
+
  
              </TD><TD>
+
To check if the driver is running:
                  <P>Allows for future meta-data extensions</p>
+
<pre>
              </TD><TD>
+
sudo lsmod
                  <P>Future systems may use metadata for a richer
+
</pre>
                  Finder experience</p>
+
              </TD></TR>
+
            <TR>
+
              <TD>
+
                  <P>OS startup support</p>
+
  
              </TD><TD>
+
The driver create a device file named:
                  <P>System Folder ID</p>
+
<pre>
              </TD><TD>
+
/dev/pmem
                  <P>Also supports a dedicated startup file</p>
+
</pre>
              </TD><TD>
+
                  <P>May help non-Mac OS systems to boot from HFS
+
                  Plus volumes</p>
+
              </TD></TR>
+
  
            <TR>
+
To unload the driver:
              <TD>
+
<pre>
                  <P>catalog node size</p>
+
sudo rmmod pmem
              </TD><TD>
+
</pre>
                  <P>512 bytes</p>
+
              </TD><TD>
+
                  <P>4 KB</p>
+
  
              </TD><TD>
+
To read acquire the memory just read from the device file. e.g.
                  <P>Maintains efficiency in the face of the other
+
<pre>
                  changes. (This larger catalog node size is due to
+
dd if=/dev/pmem of=image.raw
                  the much longer file names [512 bytes as opposed to
+
</pre>
                  32 bytes], and larger catalog records (because of
+
                  more/larger fields)).</p>
+
              </TD></TR>
+
            <TR>
+
              <TD>
+
                  <P>Maximum file size</p>
+
              </TD><TD>
+
                  <P>2<SUP>31</SUP> bytes</p>
+
  
              </TD><TD>
+
For more information see:
                  <P>2<SUP>63</SUP> bytes</p>
+
<pre>
              </TD><TD>
+
rekall/tools/linux/README
                  <P>Obvious user benefit, especially for multimedia
+
</pre>
                  content creators.</p></td>
+
                  </tr>
+
</table></CENTER>
+
<br>
+
An HFS+ volume contains five special files:
+
<ol>
+
<li>
+
Catalog file - Describes the folder and file hierarchy of the volume. It is organized as a "balanced tree" for fast and efficient searches
+
</li>
+
<li>Extents overflow file - Additional extents (contiguous allocation blocks allocated to forks) are stored in a b-tree in this file
+
</li>
+
<li>
+
Allocation file - Specifies whether an allocation block is free (similar to $Bitmap in NTFS). This is stored in a bitmap, specifying a free allocation block with a "clear bit"
+
</li>
+
<li>Attributes file - Contains attribute information regarding files or folders
+
</li>
+
<li>
+
Startup file - Allows computers to boot that do have built in support for HFS+ file systems
+
</li>
+
</ol>
+
<br>
+
HFS+ also implements journaling, which allows fast recovery in the case of a crash or power outage. According to Apple, "The purpose of the journal is to ensure that when a group of related changes are being made, that either all of those changes are actually made, or none of them are made."[http://developer.apple.com/technotes/tn/tn1150.html#Journal]
+
  
Apple technical notes are available for the HFS+ file system from their [http://developer.apple.com/cgi-bin/search.pl?q=HFS+&num=10&site=default_collection website].
+
=== Mac OS X ===
  
[[Category:Disk file systems]]
+
For more information see:
 +
<pre>
 +
rekall/tools/osx/OSXPMem/README
 +
</pre>
 +
 
 +
=== Windows ===
 +
Since recent versions of Windows require a signed driver rekall comes with both pre-built (signed binary) and source versions of the driver.
 +
 
 +
Both the i386 and amd64 binary version of the driver can be found in the directory:
 +
<pre>
 +
rekall/tools/windows/winpmem/binaries
 +
</pre>
 +
 
 +
E.g.
 +
<pre>
 +
rekall/tools/winpmem/binaries/amd64/winpmem.sys
 +
</pre>
 +
 
 +
A standalone tool for imaging memory that uses an embedded copy of the pmem driver can be found as winpmem.exe in:
 +
<pre>
 +
rekall/tools/winpmem/executables/Release/
 +
</pre>
 +
 
 +
To load the driver:
 +
<pre>
 +
winpmem.exe -l
 +
</pre>
 +
 
 +
The device filename is (This can not be changed without recompiling):
 +
<pre>
 +
\\.\pmem
 +
</pre>
 +
 
 +
Note that running dd directly on this device file can crash the machine.
 +
Use the winpmem.exe tool instead because it handles protected memory regions.
 +
 
 +
To read and acquire the physical memory and write it to image.raw:
 +
<pre>
 +
winpmem.exe image.raw
 +
</pre>
 +
 
 +
To unload the driver:
 +
<pre>
 +
winpmem.exe -u
 +
</pre>
 +
 
 +
For more information see:
 +
<pre>
 +
rekall/tools/windows/README
 +
</pre>
 +
 
 +
== See Also ==
 +
* [[Memory analysis]]
 +
* [[Memory Imaging]]
 +
* [[Volatility]]
 +
 
 +
== External Links ==
 +
* [https://code.google.com/p/rekall/ Project site]
 +
* [http://docs.rekall.googlecode.com/git/index.html Project documentation]
 +
* [http://rekall-forensic.blogspot.com/ Rekall Memory Forensics blog]
 +
* [http://www.rekall-forensic.com/docs/References/Papers/DFRWS2013.html Anti-forensic resilient memory acquisition]] by [[Johannes Stüttgena]] [[Michael Cohen]], August 2013
 +
* [http://www.rekall-forensic.com/docs/References/Papers/DFRWS2014EU.html Robust Linux memory acquisition with minimal target impact], [[Johannes Stüttgena]] [[Michael Cohen]], May 2014

Revision as of 03:33, 25 June 2014

Rekall
Maintainer: Michael Cohen
OS: Cross-platform
Genre: Memory Analysis,Memory Imaging
License: GPL
Website: code.google.com/p/rekall/

Rekall is the stand-alone continuation of the Volatility Technology Preview (TP) version, aka the scudette branch.

One of Rekalls goals is to provide better integration with GRR by improved modularity of the framework and having memory acquisition capability.[1]

Memory acquisition drivers

The drivers can be found under:

rekall/tools/linux
rekall/tools/osx
rekall/tools/windows

Linux

In rekall RC11 the advanced Linux acquisition tool (LMAP) was added. lmap allows to inject the pmem functionality into existing kernel modules to bypass having to build a pmem kernel module for every different kernel version. See the corresponding DFRWS EU 2014 paper for more information about LMAP.

To build the kernel module for the current kernel version, make sure you have a working build environment and the kernel headers installed. Change into this directory and run make:

cd rekall/tools/linux/
make

The acquisition driver is named pmem.ko.

To load the driver:

sudo insmod pmem.ko

To check if the driver is running:

sudo lsmod

The driver create a device file named:

/dev/pmem

To unload the driver:

sudo rmmod pmem

To read acquire the memory just read from the device file. e.g.

dd if=/dev/pmem of=image.raw

For more information see:

rekall/tools/linux/README

Mac OS X

For more information see:

rekall/tools/osx/OSXPMem/README

Windows

Since recent versions of Windows require a signed driver rekall comes with both pre-built (signed binary) and source versions of the driver.

Both the i386 and amd64 binary version of the driver can be found in the directory:

rekall/tools/windows/winpmem/binaries

E.g.

rekall/tools/winpmem/binaries/amd64/winpmem.sys

A standalone tool for imaging memory that uses an embedded copy of the pmem driver can be found as winpmem.exe in:

rekall/tools/winpmem/executables/Release/

To load the driver:

winpmem.exe -l

The device filename is (This can not be changed without recompiling):

\\.\pmem

Note that running dd directly on this device file can crash the machine. Use the winpmem.exe tool instead because it handles protected memory regions.

To read and acquire the physical memory and write it to image.raw:

winpmem.exe image.raw

To unload the driver:

winpmem.exe -u 

For more information see:

rekall/tools/windows/README

See Also

External Links