<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Haiders WebSpace</title>
	<atom:link href="http://blog.creativeitp.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.creativeitp.com</link>
	<description>Let&#039;s talk about IT</description>
	<lastBuildDate>Fri, 10 May 2013 21:49:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Determining IP Ranges and Subnet Mask from CIDR Notations</title>
		<link>http://blog.creativeitp.com/posts-and-articles/networking/determining-ip-ranges-and-subnet-mask-from-cidr-notations/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/networking/determining-ip-ranges-and-subnet-mask-from-cidr-notations/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 01:42:02 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[CIDR]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=1042</guid>
		<description><![CDATA[Classless Inter-Domain Routing (CIDR) allocates address space on any bit boundary, instead of on 8-bit segments as in Classful addressing. The following example demonstrates how to determine possible networks, IP ranges and subnet mask from a CIDR Notation. Considering the following CIDR notation value: 193.56.132.0/26 we may determine the following Subnet Mask A CIDR notation [...]]]></description>
				<content:encoded><![CDATA[<p>Classless Inter-Domain Routing (CIDR) allocates address space on any bit boundary, instead of on 8-bit segments as in Classful addressing. The following example demonstrates how to determine possible networks, IP ranges and subnet mask from a CIDR Notation.</p>
<p>Considering the following CIDR notation value: <strong>193.56.132.0/26</strong><br />
we may determine the following</p>
<ul>
<li><strong>Subnet Mask</strong>
<p>A CIDR notation is constructed from an IP address and a prefix size equivalent to the number of leading 1 bits in the subnet mask. Considering the CIDR notation above, the number of bits in the mask is 26. This can then be represented as:</p>
<p>11111111.11111111.11111111.11000000</p>
<p>If we convert this number to Decimal, we get the following subnet mask: <strong><font color=red>255.255.255.192</font></strong><br />
<span id="more-1042"></span></p>
<li><strong>Possible Subnetworks</strong>
<p>From above, the IP: 193.56.132.0 Mask: 255.255.255.192<br />
In binary this is:</p>
<p>11000001.00111000.10000100.<strong><font color=blue>00</font><font color=green>000000</font></strong> (IP)<br />
11111111.11111111.11111111.11000000 (Subnet Mask)</p>
<p>and since this is a class C address, only the last 8 bits are used to create sub networks (subnets) AND host IPs. The Subnet Mask assigns two bits (highlighted in blue) to be used for the subnets while the remaining 6 (highlighted in green) can be used then for the hosts (as a host ID).</p>
<p>The number of possible networks can be calculated using <strong>2^n</strong> where n is the number of bits. Hence, we can have 2^2 = 4 possible networks as follows:</p>
<p>11000001.00111000.10000100.<strong><font color=blue>00</font><font color=green>000000</font></strong> (193.56.132.0)<br />
11000001.00111000.10000100.<strong><font color=blue>01</font><font color=green>000000</font></strong> (193.56.132.64)<br />
11000001.00111000.10000100.<strong><font color=blue>10</font><font color=green>000000</font></strong> (193.56.132.128)<br />
11000001.00111000.10000100.<strong><font color=blue>11</font><font color=green>000000</font></strong> (193.56.132.192)</p>
<p>Now, the first and last subnets are <em>special</em>. The first one is reffered to as <strong>subnet zero</strong> (because all its assigned bits are zeros) while the last one is an example of <strong>all-ones subnet</strong> (all its bits are ones). Traditionally, these two special subnets are excluded because they are not supported by legacy network devices. As such, usable networks will be</p>
<p><strong><del datetime="2013-02-03T02:15:12+00:00">193.56.132.0</del></strong><br />
<strong><font color=red>193.56.132.64</font></strong><br />
<strong><font color=red>193.56.132.128</font></strong><br />
<strong><del datetime="2013-02-03T02:15:12+00:00">193.56.132.192</del></strong></p>
<p>which changes the formula to calculate the number of possible subnets to: <strong>2^n-2</strong>. Unless, you are dealing with a modern network which would ideally support these two types of subnets.  </p>
<li><strong>IP Ranges and usable IPs</strong>
<p>For each usable subnet we have 6 bits reserved for the hosts. Hence, the number of all possible IPs is<br />
2^6 = 64 IP address. </p>
<p>We can determine the range of IP addresses as well. The first IP address of the first usable subnet (193.56.132.64) will simply have the all host&#8217;s bits as zeros while the last IP will have all the host&#8217;s bits as ones. Hence, the rage of all IPs will be</p>
<p>11000001.00111000.10000100.<strong><font color=blue>01</font><font color=green>000000</font></strong> (193.56.132.64)<br />
11000001.00111000.10000100.<strong><font color=blue>01</font><font color=green>000001</font></strong> (193.56.132.65)<br />
11000001.00111000.10000100.<strong><font color=blue>01</font><font color=green>000010</font></strong> (193.56.132.66)<br />
.<br />
.<br />
11000001.00111000.10000100.<strong><font color=blue>01</font><font color=green>111110</font></strong> (193.56.132.126)<br />
11000001.00111000.10000100.<strong><font color=blue>01</font><font color=green>111111</font></strong> (193.56.132.127)</p>
<p>That is <font color=red><strong>193.56.132.64 to 193.56.132.127</strong></font>. However, while this is the range of all possible IPs which is equal to 2^6 = 64. The number of USABLE IPs always excludes the first IP (Host ID all zeros) because it represents the network itself and last IP (Host ID all ones) because it will be used as the broadcast IP for that subnet.</p>
<p>As such, range of usable IPs for subnet <strong>193.56.132.64/26</strong> is <font color=red><strong>193.56.132.65 to 193.56.132.126</strong></font>.</p>
<p>Similarly, range of usable IPs for the second usable subnet <strong>193.56.132.128/26</strong> is <font color=red><strong>193.56.132.129 to 193.56.132.190</strong></font>.
</ul>
<p>Hope this was helpful!<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/networking/determining-ip-ranges-and-subnet-mask-from-cidr-notations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introduction to The Volatility Framework</title>
		<link>http://blog.creativeitp.com/posts-and-articles/volatile-memory/introduction-to-the-volatility-framework/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/volatile-memory/introduction-to-the-volatility-framework/#comments</comments>
		<pubDate>Sun, 09 Dec 2012 15:19:36 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Volatile Memory]]></category>
		<category><![CDATA[Computer Forensics]]></category>
		<category><![CDATA[The Volatility Framework]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=1019</guid>
		<description><![CDATA[The Volatility Framework is an advanced memory forensics framework. This post aims to introduce it with a number of examples. The framework supports RAM dumps from 32 and 64-bit windows, linux, mac, and android systems. My demonstration will take place on a Windows machine, hence I downloaded the standalone executable which comes packaged with Python [...]]]></description>
				<content:encoded><![CDATA[<p>The Volatility Framework is an advanced memory forensics framework. This post aims to introduce it with a number of examples. The framework supports RAM dumps from 32 and 64-bit windows, linux, mac, and android systems.</p>
<p>My demonstration will take place on a Windows machine, hence I downloaded the standalone executable which comes packaged with Python and all required dependencies from:<br />
 <a href="https://www.volatilesystems.com/default/volatility" target="_blank">https://www.volatilesystems.com/default/volatility</a>. </p>
<p>To organise my work environment, I created a folder called &#8216;volatility&#8217; in my standard Download folder and moved the stand alone executable to it, in my case its name was volatility-2.1.standalone.exe. </p>
<p><em>P.S. The standalone executable is portable and can be run from removable media e.g. USB.</em></p>
<p>To use it, let us first list all possible options and included plugins. This need to be done using the Command Prompt in Windows</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">volatility-<span style="color: #000000;">2.1</span>.standalone.exe <span style="color: #660033;">-h</span></pre></td></tr></table></div>

<p>This is demonstrated in the following figure (click to enlarge)</p>
<div id="attachment_1021" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility01.png" target="_blank"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility01-300x253.png" alt="" title="The Volatility Framework: list options and supported plugins" width="300" height="253" class="size-medium wp-image-1021" /></a><p class="wp-caption-text">The Volatility Framework: list options and supported plugins</p></div>
<p><span id="more-1019"></span></p>
<p>Volatility is used for analysis, as such I selected <strong>DumpIt</strong> to obtain a raw file containing a full dump of one of my machines&#8217; RAM. For more information about this tool (and others) read the following post: <a href="http://blog.creativeitp.com/?s=Acquisition+of+volatile+memory+in+Windows+and+Linux&#038;search=Search">Acquisition of volatile memory in Windows and Linux</a>.</p>
<p>Using DumpIt I have now a raw file of my RAM called: <strong>H-HP-20121209-120703.raw</strong></p>
<p>Using Volatility requires defining the correct Operating System&#8217;s profile from which the dump file was taken. This information and other can be extracted using the following command</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">volatility.exe imageinfo <span style="color: #660033;">-f</span> H-HP-<span style="color: #000000;">20121209</span>-<span style="color: #000000;">120703</span>.raw</pre></td></tr></table></div>

<p>please now that I have renamed the executable file from volatility-2.1.standalone.exe to volatility.exe to shorten the name. Otherwise, option <strong>-f</strong> is used to indicate that the consequent line is a file location of the memory dump. <strong>imageinfo</strong> is a tool to extract information about the image (memory dump) being examine. This process is demonstrated in the following figure</p>
<div id="attachment_1022" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility02.png" target="_blank"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility02-300x98.png" alt="" title="The Volatility Framework: imageinfo" width="300" height="98" class="size-medium wp-image-1022" /></a><p class="wp-caption-text">The Volatility Framework: imageinfo</p></div>
<p>From the figure, we now have a number of suggested profiles which we can analyse the image with. Other tools within Volatility requires this profile. For instance, to list all processes from that RAM use the following</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">volatility.exe <span style="color: #660033;">-f</span> H-HP-<span style="color: #000000;">20121209</span>-<span style="color: #000000;">120703</span>.raw <span style="color: #660033;">--profile</span>=Win7SP1x64 pslist</pre></td></tr></table></div>

<p>as you can see, I have now defined a profile and used the <strong>pslist</strong> command. This is shown in the following figure</p>
<div id="attachment_1023" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility03.png" target="_blank"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility03-300x166.png" alt="" title="The Volatility Framework: pslist" width="300" height="166" class="size-medium wp-image-1023" /></a><p class="wp-caption-text">The Volatility Framework: pslist</p></div>
<p>At this point, you will need to have a look at all available commands, I have found a good list in the following Volatility wiki:<br />
<a href="https://code.google.com/p/volatility/wiki/CommandReference23" target="_blank">https://code.google.com/p/volatility/wiki/CommandReference23</a><br />
You should then study their capabilities and check if a command is supported by the profile you are using. For instance, to extract some networking relevant information, the command <strong>connections</strong> is not supported by the profile I am using (Win7SP1x64) while <strong>netscan</strong> is supported as demonstrated bellow</p>
<div id="attachment_1024" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility04.png" target="_blank"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility04-300x84.png" alt="" title="The Volatility Framework: connections and netscan" width="300" height="84" class="size-medium wp-image-1024" /></a><p class="wp-caption-text">The Volatility Framework: connections and netscan</p></div>
<p>Registry data can also be extracted using this framework. I will use <strong>hivelist</strong> to print virtual addresses of registry hives in memory. Shown in the following figure</p>
<div id="attachment_1025" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility05.png" target="_blank"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/volatility05-300x82.png" alt="" title="The Volatility Framework: hivelist" width="300" height="82" class="size-medium wp-image-1025" /></a><p class="wp-caption-text">The Volatility Framework: hivelist</p></div>
<p>Now, how will this information can be very useful? one way is by copying the virtual address of the SYSTEM and the SAM file (in my example these were 0xfffff8a000024010 and 0xfffff8a001506420 accordignly) and then use them with the <strong>hashdump</strong> command to extract Windows password&#8217;s hashes as in</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">volatility.exe <span style="color: #660033;">-f</span> H-HP-<span style="color: #000000;">20121209</span>-<span style="color: #000000;">120703</span>.raw <span style="color: #660033;">--profile</span>=Win7SP1x64 hashdump <span style="color: #660033;">-y</span> 0xfffff8a00d932010 <span style="color: #660033;">-s</span> 0xfffff8a001506420 <span style="color: #000000; font-weight: bold;">&gt;</span> syshashes.txt</pre></td></tr></table></div>

<p>where <strong>-y</strong> is for the system&#8217;s virtual address and <strong>-s</strong> for SAM. The result is then outputed to a file called syshashed.txt. However, please note that this technique does not work on all platforms. For example, it is not possible with Windows 7 64-bit but it is possible with Windows XP.<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/volatile-memory/introduction-to-the-volatility-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just another NetCat tutorial</title>
		<link>http://blog.creativeitp.com/posts-and-articles/windows/just-another-netcat-tutorial/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/windows/just-another-netcat-tutorial/#comments</comments>
		<pubDate>Sun, 02 Dec 2012 18:54:54 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Computer Forensics]]></category>
		<category><![CDATA[NetCat]]></category>
		<category><![CDATA[Remote Access]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=993</guid>
		<description><![CDATA[Netcat (nc) is critical for many tasks you attempt to use over a network. It can either use TCP or UDP to establish a connection for you to send files to another computer, pipe the output of a software over the network, scan for ports or just chat! This article will demonstrate NetCat through a [...]]]></description>
				<content:encoded><![CDATA[<p>Netcat (nc) is critical for many tasks you attempt to use over a network. It can either use TCP or UDP to establish a connection for you to send files to another computer, pipe the output of a software over the network, scan for ports or just chat!</p>
<p>This article will demonstrate NetCat through a number of practical examples using a linux box (BackTrack) and a Windows XP machine. While nc is shipped with BackTrack, you will need to <a href="https://www.google.co.uk/search?q=download+netcat+windows" target="_blank">search</a> and download the right version for your Windows or just use another Linux box. In my windows machine, all I need is the <strong>nc.exe</strong> file, I moved it to <strong>C:\WINDOWS</strong> so that it can be recognised easily by my Command Prompt. For this example please note that the IP of my Windows XP is 192.168.7.131 and BT is 192.168.7.133.</p>
<ul>
<li><strong>Chat over the network!</strong>. I used the following command to put my Windows machine in listen-mode (option -l for listen) on port 2222 (-p for port). I also used -v to display information about the connection, v for verbose, you may add another v as in (-vv).

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-lvp</span> <span style="color: #000000;">2222</span></pre></td></tr></table></div>

<p>To connect, using the other machine, type</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc 192.168.7.131 <span style="color: #000000;">2222</span></pre></td></tr></table></div>

<p>whatever you type now, on any machine, will show on both! as in the following figure
</ul>
<div id="attachment_995" class="wp-caption aligncenter" style="width: 480px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/netcat-chat.png" alt="" title="NetCat chat" width="470" height="257" class="size-full wp-image-995" /><p class="wp-caption-text">NetCat chat</p></div>
<p><span id="more-993"></span></p>
<ul>
<li><strong>Send a file over the network</strong>. For that, while opening a listen-mode, we could output what we receive into a file called file.txt

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-lvp</span> <span style="color: #000000;">2222</span> <span style="color: #000000; font-weight: bold;">&gt;</span> file.txt</pre></td></tr></table></div>

<p>and on the sending machine, you can send an existing file using</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc 192.168.7.131 <span style="color: #000000;">2222</span> <span style="color: #000000; font-weight: bold;">&lt;</span> somefile.txt</pre></td></tr></table></div>

<p>or via a pipe</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> somefile.txt <span style="color: #000000; font-weight: bold;">|</span> nc 192.168.7.131 <span style="color: #000000;">2222</span></pre></td></tr></table></div>

<p><em>P.S. you could as well connect as in the first chat-example. Then, whatever you type in will be stored in file.txt</em>
</ul>
<ul>
<li> <strong>Imaging file systems over the network using dd (dd over nc)</strong>. dd is used to perform byte-by-byte copy of storage. An example for dd to copy the first 6 sectors of a HDD:

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda <span style="color: #007800;">count</span>=<span style="color: #000000;">6</span> <span style="color: #007800;">bs</span>=<span style="color: #000000;">512</span> <span style="color: #007800;">of</span>=disk.img</pre></td></tr></table></div>

<p>Possible options for dd are:<br />
if = input file<br />
of = output file<br />
bs = byte size (block size in bytes, default is 512)<br />
ibs = input block size<br />
obs = output block size<br />
count = number of blocks to copy<br />
skip = number of blocks to skip at a start input<br />
seek = number of blocks to skip at start of output<br />
conv = conversion</p>
<p>While dd is a linux tool, you can use <strong>dd for Windows</strong> (I got one from <a href="http://www.chrysocome.net/dd" target="_blank">here</a>, and moved dd.exe to my Windows folder) to enable connecting between the two systems.</p>
<p>dd can be piped to nc to send its output over a network. On the listening machine type</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-lvp</span> <span style="color: #000000;">2222</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">of</span>=disk.img</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda <span style="color: #007800;">count</span>=<span style="color: #000000;">6</span> <span style="color: #007800;">bs</span>=<span style="color: #000000;">512</span> <span style="color: #000000; font-weight: bold;">|</span> nc <span style="color: #660033;">-q</span> <span style="color: #000000;">1</span> 192.168.7.131 <span style="color: #000000;">2222</span></pre></td></tr></table></div>

<p><strong>-q 1</strong> means, wait 1 second after the end of file then terminate process.
</ul>
<ul>
<li> <strong>Remote shell</strong>. NetCat enables you to control a remote machine via the -e option (used to execute a file right after a connection is established). If the machine you want to control remotely is Linux then type

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-lvp</span> <span style="color: #000000;">2222</span> <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span></pre></td></tr></table></div>

<p>else, to control a windows machine type</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-lvp</span> <span style="color: #000000;">2222</span> <span style="color: #660033;">-e</span> cmd.exe</pre></td></tr></table></div>

<p>Now, connect to it and type a command such as <em>ls</em> or <em>dir</em> to view directory list of the remote machine.</p>
<p>Nonetheless, you may reverse the shell i.e. provide access to your machine for a remote listening machine, type</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> 192.168.7.131 <span style="color: #000000;">2222</span></pre></td></tr></table></div>

</ul>
<ul>
<li><strong>Connect to HTTP servers</strong>. NetCat can be used to connect to a web server such as google.com and download its homepage HTML code

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc google.com <span style="color: #000000;">80</span>
GET HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span></pre></td></tr></table></div>

</ul>
<ul>
<li><strong>Port Scanning</strong>. If NetCat is all you have, you can even use it to port scan your remote machine. For instance, the following command scans ports 1 to 999 of my Windows XP machine.

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">nc <span style="color: #660033;">-v</span> 192.168.7.131 <span style="color: #000000;">1</span>-<span style="color: #000000;">999</span>
GET HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span></pre></td></tr></table></div>

</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/windows/just-another-netcat-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acquisition of volatile memory in Windows and Linux</title>
		<link>http://blog.creativeitp.com/posts-and-articles/windows/acquisition-of-volatile-memory-in-windows-and-linux/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/windows/acquisition-of-volatile-memory-in-windows-and-linux/#comments</comments>
		<pubDate>Sat, 01 Dec 2012 00:55:02 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Volatile Memory]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Computer Forensics]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=955</guid>
		<description><![CDATA[Volatile memory (or volatile storage) is computer memory whose contents are maintained while the power is on and erased/lost every time the power-supply is turned off or interrupted. The Random Access Memory (RAM) is a traditional example of a volatile memory. It allows fast CPU read/write access to data compared to non-volatile memory such as [...]]]></description>
				<content:encoded><![CDATA[<p>Volatile memory (or volatile storage) is computer memory whose contents are maintained while the power is on and erased/lost every time the power-supply is turned off or interrupted. The Random Access Memory (RAM) is a traditional example of a volatile memory. It allows fast CPU read/write access to data compared to non-volatile memory such as HDDs where data originally reside. Hence, data-bytes are always moved from volatile memory to non-volatile memory for processing. </p>
<p>Computer volatile memory is acquired for different purposes. For instance, Windows can be configured to dump it to a file called Memory.DMP to serve as part of a recovery procedure in the case of system failure (e.g. BSoD). Nevertheless, in computer forensics, volatile memory is acquired as an evidence to be analysed.</p>
<p>This article will demonstrate a number of automated tools used for the acquisition of volatile memory in Windows and Linux systems. Memory can either be captured in full by some tools while others require a process ID (PID) to acquire a memory dump for an identified process. In Linux, PID can be listed using &#8216;<strong>ps -af</strong>&#8216;. If the list is found to be long it can be combined with grep. For example, you can locate FireFox process using</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-af</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> firefox</pre></td></tr></table></div>

<p>In windows, this can be done with the Task Manager or the &#8216;<strong>tasklist</strong>&#8216; command.<br />
<span id="more-955"></span></p>
<p>At this point, let&#8217;s start demonstrating the tools</p>
<ul>
<li> <strong>Process Dumper (pd)</strong> (from <a href="http://www.trapkit.de/research/forensic/pd/index.html" target="_blank">http://www.trapkit.de/research/forensic/pd/index.html</a>) is a tool able to make a memory dump of a running process in either Windows or Linux.
<p>In Linux, this is how I installed and used &#8216;pd&#8217;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.trapkit.de<span style="color: #000000; font-weight: bold;">/</span>research<span style="color: #000000; font-weight: bold;">/</span>forensic<span style="color: #000000; font-weight: bold;">/</span>pd<span style="color: #000000; font-weight: bold;">/</span>pd_v1.1_lnx.bz2
<span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">mv</span> pd_v1.1_lnx.bz2 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">bunzip2</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>pd_v1.1_lnx.bz2</pre></td></tr></table></div>

<p>and then make the extracted file executable with the following command</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>pd_v1.1_lnx</pre></td></tr></table></div>

<p>now, assuming that the PID you want to acquire is 2873. Use the following command to create a memory dump. The 2873.dmp file will be created containing the memory dump for the identified process!</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">root@bt:~# </span><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>pd_v1.1_lnx <span style="color: #660033;">-p</span> <span style="color: #000000;">2873</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2873</span>.dmp</pre></td></tr></table></div>

<p>In Windows, pd can be started and used quite similarly with the command prompt as shown in the following figure.<br />
<div id="attachment_965" class="wp-caption aligncenter" style="width: 395px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/12/pd_v1.1_win.png" alt="" title="pd v1.1  for Windows" width="385" height="211" class="size-full wp-image-965" /><p class="wp-caption-text">pd v1.1  for Windows</p></div>
</ul>
<ul>
<li><strong>PMDump</strong> (from <a href="http://ntsecurity.nu/toolbox/pmdump/" target="_blank">http://ntsecurity.nu/toolbox/pmdump/</a>) is another tool that lets you dump the memory contents of a process. It supports Windows NT 4.0, 2000, XP, 2003 and Vista (My test using v1.2 worked well on Windows 7 too).
<p>To use the tool, access it from the command prompt typing its name &#8216;<strong>pmdump</strong>&#8216; followed by &#8216;<strong>-list</strong>&#8216; to display all processes. More important, to create memory dump use pmdump followed by PID followed by a file name e.g.<br />
<strong>pmdump 2873 2873.txt</strong>
</ul>
<ul>
<li> <strong>ProcDump</strong> from (from <a href="http://technet.microsoft.com/en-US/sysinternals/" target="_blank">http://technet.microsoft.com/en-US/sysinternals/</a>) This very powerful tool is for Windows OSs. It is well documented on the following link from Microsoft, so there is no need to repeat what has already been posted there:<br />
<a href="http://technet.microsoft.com/en-us/sysinternals/dd996900" target="_blank">http://technet.microsoft.com/en-us/sysinternals/dd996900</a>
</ul>
<ul>
<li><strong>LiME (Linux Memory Extractor)</strong> (from <a href="http://code.google.com/p/lime-forensics/" target="_blank">http://code.google.com/p/lime-forensics/</a>) can be used in the acquisition of volatile memory from Linux and Linux-based devices, such as those powered by Android. Next bash commands demonstrate how LiME was installed at the time.

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">root@bt:~# </span><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>lime-forensics.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>files<span style="color: #000000; font-weight: bold;">/</span>lime-forensics-<span style="color: #000000;">1.1</span>-r14.tar.gz
<span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">tar</span> zxfv lime-forensics-<span style="color: #000000;">1.1</span>-r14.tar.gz
<span style="color: #666666;">root@bt:~# </span><span style="color: #7a0874; font-weight: bold;">cd</span> src
<span style="color: #666666;">root@bt:~# </span><span style="color: #c20cb9; font-weight: bold;">make</span>
...
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>tcp.o
CC <span style="color: #7a0874; font-weight: bold;">&#91;</span>M<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>disk.o
...
<span style="color: #666666;">root@bt:~#</span></pre></td></tr></table></div>

<p>The following bash command is what I used to dump memory. At this point you may want to check the documentation of LiME to decide the output format of the memory dump; they can be raw, padded or lime as specified by the developers. For this tutorial I will select lime because the Volatility address space was developed to support this format (as I am willing to publish posts about the <a href="https://www.volatilesystems.com/default/volatility" target="_blank">Volatility Framework</a>). Lime format is described in LiME documentation as &#8216;Each range is prepended with a fixed-sized header which contains address space information&#8217;.</p>
<p>The path can either be a filename to write on the local system, SD card (useful for an Android device) or tcp port. I choose to save it as a file called <strong>mmry.lime</strong> in <strong>/usr/local/src/</strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">root@bt:~# </span>insmod lime-3.2.6.ko <span style="color: #ff0000;">&quot;path=/usr/local/src/mmry.lime format=lime&quot;</span></pre></td></tr></table></div>

<p>Since LiME is a Loadable Kernel Module (LKM) insmod is used to link it into the running kernel.
</ul>
<ul>
<li> <strong>DumpIt</strong> from (from <a href="http://www.moonsols.com/2011/07/18/moonsols-dumpit-goes-mainstream/" target="_blank">http://www.moonsols.com/2011/07/18/moonsols-dumpit-goes-mainstream/</a>) is another very tool to dump Windows memory. It has no argument and would do the work for both 32 and 64 machine after a single double-click. The output is a faw file and will be located in the same folder as the DumpIt executable (make sure you have enough space if you run it from a USB stick).
</ul>
<p>This article aimed at putting together and demonstrating a number of volatile memory dump tools. Hence, I will attempt to revise and update this post in the future whenever I get time! so I would appreciate your comments and suggestions. For the time being, it will only make sense to look into analysis tools to extract useful information from these dump files. I will cover this topic with examples in my coming posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/windows/acquisition-of-volatile-memory-in-windows-and-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convenient WordPress backup using phpMyAdmin</title>
		<link>http://blog.creativeitp.com/posts-and-articles/wordpress/convenient-wordpress-backup-using-phpmyadmin/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/wordpress/convenient-wordpress-backup-using-phpmyadmin/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 01:45:59 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=937</guid>
		<description><![CDATA[This blog is powered by WordPress as indicated in the footer of these pages and I -of course- take regular backups. Hence, I found it suitable to create this small post to highlight few simple but important issues to consider during WordPress backups using the famous phpMyAdmin. Empty your SPAM folder. If you also have [...]]]></description>
				<content:encoded><![CDATA[<p>This blog is powered by WordPress as indicated in the footer of these pages and I -of course- take regular backups. Hence, I found it suitable to create this small post to highlight few simple but important issues to consider during WordPress backups using the famous phpMyAdmin. </p>
<ol>
<li> <strong>Empty your SPAM folder</strong>. If you also have a SPAM problem (and I think you are) and rely on some sort of SPAM and Trackback filtering technology such as <a href="http://akismet.com" target="_blank">Akismet</a> (this is what I use), make sure you empty your spam folder. This wouldn&#8217;t affect the size of your backup file if you have few SPAM messages, but the last time I checked, there was over 4000 different SPAM messages sent to my blog! I can not be happy to have this in my backup file.
<li> <strong>Consider deleting revisions</strong>. Revisions are copies of your WordPress posts, each time you edit a post and save your work a new version of this post is saved along with the older one. While it is possible to turn this feature OFF, I personally prefer to make use of it but simply run the following SQL command before I take full backups to delete all of them.

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> wp_posts <span style="color: #993333; font-weight: bold;">WHERE</span> post_type <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;revision&quot;</span>;</pre></td></tr></table></div>

<li> <strong>Optimize your tables</strong>. Deleting rows will not refresh information such as table sizes. Nevertheless, optimizing your tables would improve the efficiency of data retrieval and processing. You can either do that by ticking all your WordPress DB tables using phpMyAdmin and select <em>Optimize</em> from the drop-down box at the buttom or you might chose to optimize a single table at a time using the following SQL command example

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">OPTIMIZE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> wp_posts;</pre></td></tr></table></div>

</ol>
<p>Each time I follow this simple procedure I significantly reduce the size of my backup file. For the sake of this post, I compared the result before and after I performed these steps and I saw that my SQL backup file was reduced from 32 MB to about 3 MB only! &#8211;yes, my blog isn&#8217;t that big!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/wordpress/convenient-wordpress-backup-using-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Authorization Service is not running in Windows</title>
		<link>http://blog.creativeitp.com/posts-and-articles/windows/vmware-authorization-service-is-not-running-in-windows/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/windows/vmware-authorization-service-is-not-running-in-windows/#comments</comments>
		<pubDate>Sun, 18 Nov 2012 19:05:43 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=931</guid>
		<description><![CDATA[A solution for the &#8216;VMware Authorization Service is not running&#8216; alert message, which you might get while trying to Power On a virtual machine using VMware Workstation. Assuming that your installation is not damaged and the problem is with the service being stopped. Attempt to restart it without the need to reboot your computer. First, [...]]]></description>
				<content:encoded><![CDATA[<p>A solution for the &#8216;<strong>VMware Authorization Service is not running</strong>&#8216; alert message, which you might get while trying to Power On a virtual machine using VMware Workstation.</p>
<p>Assuming that your installation is not damaged and the problem is with the service being stopped. Attempt to restart it without the need to reboot your computer.</p>
<p>First, confirm that the service is included and ticked in the <em>Services</em> tab of <em>msconfig</em></p>
<ol>
<li> Start &#8211;> Run (or Windows-r)
<li> type <strong>msconfig</strong>
<li> click the Services tab
<li> locate &#8216;VMware Authorization Service&#8217;<br />
(P.S. you may hide all Microsoft services to reduce the list)
</ol>
<p>If you can find the service ticked, but its status is <em>Stopped</em>, then attempt to restart it with the following steps:</p>
<ol>
<li> Start &#8211;> Run (or Windows-r)
<li> type services.msc
<li> locate the &#8216;VMware Authorization Service&#8217;
<li> right-click and select <strong>Start</strong>
</ol>
<p>You should be able to Power On your VMware machines now!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/windows/vmware-authorization-service-is-not-running-in-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disk Analysis with fdisk, mmls, fsstat and fls</title>
		<link>http://blog.creativeitp.com/posts-and-articles/linux/disk-analysis-with-fdisk-mmls-fsstat-and-fls/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/linux/disk-analysis-with-fdisk-mmls-fsstat-and-fls/#comments</comments>
		<pubDate>Fri, 09 Nov 2012 19:00:54 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Non-Volatile Memory]]></category>
		<category><![CDATA[BackTrack]]></category>
		<category><![CDATA[Computer Forensics]]></category>
		<category><![CDATA[File Systems]]></category>
		<category><![CDATA[MBR]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=908</guid>
		<description><![CDATA[A previous post analysed the Master Boot Record using a hex editor to extract information about the different partitions in a Hard Disk Drive (HDD). This article will demonstrate a number of autoamated tools to extract detailed information. The tools are: fdisk, mmls, fsstat and fls. Ideally, this kind of investigation occur on an image [...]]]></description>
				<content:encoded><![CDATA[<p><em><br />
A <a href="http://blog.creativeitp.com/posts-and-articles/bios/analysing-the-master-boot-record-mbr-with-a-hex-editor-hex-workshop/">previous post</a> analysed the Master Boot Record using a hex editor to extract information about the different partitions in a Hard Disk Drive (HDD). This article will demonstrate a number of autoamated tools to extract detailed information. The tools are: fdisk, mmls, fsstat and fls.</em></p>
<p>Ideally, this kind of investigation occur on an image of the HDD. However, the objective of this article is to present these tools and not to demonstrate a professional computer forensic procedure.</p>
<p>For the test, I booted one of my computers using BackTrack from a USB stick and searched for the connected HDDs as in the following figure</p>
<div id="attachment_915" class="wp-caption aligncenter" style="width: 436px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/hd-doscovery.png" alt="" title="Connected HDDs" width="426" height="123" class="size-full wp-image-915" /><p class="wp-caption-text">Connected HDDs</p></div>
<p>In Linux, storage devices (and partitions) are located within the /dev directory. Naming takes place based on the following logic:</p>
<ul>
<li> <strong>/dev/hda</strong> ; is the first (master) PATA/IDE hard drive
<li> <strong>/dev/hdb</strong> ; is the second (slave) PATA/IDE hard drive
<li> <strong>/dev/hda1</strong> ; is partition 1 of the first (master) PATA/IDE hard drive
<li> <strong>/dev/sda</strong> ; is the first (master) SATA/SCSI hard drive
<li> <strong>/dev/sdb</strong> ; is the second (slave) SATA/SCSI hard drive
<li> <strong>/dev/sda3</strong> ; is partition 3 of the first (master) SATA/SCSI hard drive
</ul>
<p>As such, I&#8217;ve searched for hda* and sda* to locate HDDs and revealed 3 partitions for the main disk and a single partition for the second one (which is the USB stick I booted from).</p>
<p><span id="more-908"></span></p>
<p><strong>fdisk</strong></p>
<p>It can be used to locate partitions and reveal information such as their start and end sectors/CHS values, number of blocks, sector size, disk identifier, total disk sectors and identify the file systems in place. Check out the following figure</p>
<div id="attachment_910" class="wp-caption aligncenter" style="width: 478px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/fdisk.png" alt="" title="fdisk -lu" width="468" height="243" class="size-full wp-image-910" /><p class="wp-caption-text">fdisk -lu</p></div>
<p>In this scenario I typed <strong>fdisk -lu /dev/sda</strong> in which </p>
<ul>
<li>-l option is to list the partion tables for the specified device
<li>-u to give sizes in sectors instead of cylinders
</ul>
<p><strong>mmls</strong></p>
<p>Similarly, the mmls tool can be used to display the partition layout of a volume system. However, mmls can be different by showing which sectors are not being used so that those can be searched for hidden data. In addition, mmls display info in sectors by default and if no options are used to filter the result then all volumes will be listed.</p>
<p>To compare against fdisk, the following figure demonstrates the results gathered via both commands.</p>
<div id="attachment_911" class="wp-caption aligncenter" style="width: 478px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/fdisk_mmls.png" alt="" title="fdisk and mmls" width="468" height="433" class="size-full wp-image-911" /><p class="wp-caption-text">fdisk and mmls</p></div>
<p>The first two lines in mmls, numbered 00 and 01, are the MBR and the unused space between the main partition table (MBR) and first partition.</p>
<p>Nontheless, mmls can directly be applied on disk images rather than a connected hard drive. For example, assuming that DiskIMG.dd is an image of a HDD created with the dd command<br />
<strong>mmls DiskIMG.dd</strong> would provide information about the disk as if it was connected live.</p>
<p><strong>fsstat</strong></p>
<p>This tool is then used to display more detail about the layout of a particular file system. For example, to analyse /dev/sdb1 which is a FAT file system where I have my BackTrack booting from, I typed:</p>
<p><strong>fsstat /dev/sdb1 | less</strong></p>
<p>&#8220;| less&#8221; was added to display the results page by page. The following figure shows that fsstat helped to learn the total range of a file system, reserved area, boot sector, backup boot sector, FAT0, FAT1, data area, cluster area, root directory&#8230;</p>
<div id="attachment_914" class="wp-caption aligncenter" style="width: 325px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/fsstat_sdb1.png" alt="" title="fsstat (FAT32 partition)" width="315" height="480" class="size-full wp-image-914" /><p class="wp-caption-text">fsstat (FAT32 partition)</p></div>
<p>The result from a second example (about an NTFS partition) using <strong>fsstat /dev/sdb1 | less</strong> is in the following figure </p>
<div id="attachment_913" class="wp-caption aligncenter" style="width: 440px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/fsstat_sda2.png" alt="" title="fsstat (NTFS partition)" width="430" height="486" class="size-full wp-image-913" /><p class="wp-caption-text">fsstat (NTFS partition)</p></div>
<p>fsstat can be performed on a disk image as well:</p>
<p><strong>fsstat -o <start data from mmls> DiskIMG.dd</strong></p>
<p>where the &#8220;-o&#8221; is the offset where the file system starts in the image</p>
<p><strong>fls</strong></p>
<p>We could now use the fls command to list files and directory names in a file system and can also display file names of recently deleted files.</p>
<div id="attachment_912" class="wp-caption aligncenter" style="width: 349px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/fls_sda2.png" alt="" title="fls command on the sda2 partition" width="339" height="471" class="size-full wp-image-912" /><p class="wp-caption-text">fls command on the sda2 partition</p></div>
<p>It may also be applied on a disk image</p>
<p><strong>fls -o 2048 DiskIMG.dd</strong></p>
<p>where the &#8220;-o&#8221; offset is where the file system starts in the image and the 2048 value can be learned using the earlier tools such as the mmls. Other options include</p>
<p>-d display deleted entries only<br />
-D directories only<br />
-r overall files and directories in the system</p>
<p><strong>Conclusion</strong></p>
<p>fdisk and mmls are used to learn the main partitions of the system. fsstat can then be used to learn more detail about a selected file system followed by fls to investigate and list all files and directories. For more detail, always refer to the man pages of these commands.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/linux/disk-analysis-with-fdisk-mmls-fsstat-and-fls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analysing the Master Boot Record (MBR) with a hex editor (Hex Workshop)</title>
		<link>http://blog.creativeitp.com/posts-and-articles/bios/analysing-the-master-boot-record-mbr-with-a-hex-editor-hex-workshop/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/bios/analysing-the-master-boot-record-mbr-with-a-hex-editor-hex-workshop/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 15:49:47 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[BIOS]]></category>
		<category><![CDATA[Non-Volatile Memory]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Computer Forensics]]></category>
		<category><![CDATA[Hex Workshop]]></category>
		<category><![CDATA[MBR]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=851</guid>
		<description><![CDATA[This article will cover the structure of a generic Master Boot Record (MBR) structure and demonstrate how information about storage disks can be extracted and analysed manually using a hex editor such as Hex Workshop. The demonstration was performed on a Windows 7 machine. Hex Workshop It is irrelevant which hex editor you use as [...]]]></description>
				<content:encoded><![CDATA[<p><em>This article will cover the structure of a generic Master Boot Record (MBR) structure and demonstrate how information about storage disks can be extracted and analysed manually using a hex editor such as Hex Workshop. The demonstration was performed on a Windows 7 machine.</em></p>
<p><strong>Hex Workshop</strong></p>
<p>It is irrelevant which hex editor you use as long as it enables you to access the hard disk to analyse the selected sectors. I will brief the analysis process using Hex Workshop because: </p>
<ul>
<li> I think it is ideal to the objective of this article and few other which I am writing.
<li> It has a very rich set of hexadecimal development tools and you can edit, cut, copy, paste, insert, fill and delete binary data.
<li> More information (including download links) can be gathered from its <a href="http://www.hexworkshop.com" target="_blank">official website</a>.
</ul>
<p>To avoid damaging the system or unintentionally changing data, select the <em>Read Only</em> option. Nevertheless, make sure you open the Physical Disk drive rather than a partition to gain access to the whole disk to read areas such as the MBR.</p>
<div id="attachment_852" class="wp-caption aligncenter" style="width: 402px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR1.png" alt="" title="Hex Workshop: open drive in &#039;Read Only&#039;." width="392" height="250" class="size-full wp-image-852" /><p class="wp-caption-text">Hex Workshop: open drive in &#8216;Read Only&#8217;.</p></div>
<p><span id="more-851"></span></p>
<p>The MBR is usually invetigated because it contains information about the existing partitions in the system. After BIOS decides that no external bootable device (e.g. floppy, CD etc) exist, the control is passed to the MBR.</p>
<p>The MBR location starts with the very first sector of a physical disk. To be more precise, at the physical/absolute sector 0 (0&#215;00).</p>
<div id="attachment_853" class="wp-caption aligncenter" style="width: 310px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR2-300x282.png" alt="" title="Hex Workshop: locate the first sector." width="300" height="282" class="size-medium wp-image-853" /><p class="wp-caption-text">Hex Workshop: locate the first sector.</p></div>
<p><strong>Absolute vs Relative Sectors</strong></p>
<p>With Hex Workshop you can easily move between sectors. Remember, there is a difference between physical/absolute sector number and a logical sector number. To locate the MBR at the begining of your hard disk, you need to go to the actual first sector of the disk, the absolute sector 0.</p>
<p>Relative sector numbers apply when you open a logical drive or partition. In that case, sector 0, 1, 2 etc might actually be sectors 1024, 1025, 1026 etc on the actual disk.</p>
<p><strong>Structure of a generic MBR</strong></p>
<p>The following diagram, illustrates the main areas of a MBR, these are: </p>
<ol>
<li>The Bootstrap Code Area/Bootloader
<li>Partition Table
<li>Boot Record Signature/Magic Number</ol>
<div id="attachment_854" class="wp-caption aligncenter" style="width: 570px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR3.jpg" alt="" title="MBR: generic structure" width="560" height="120" class="size-full wp-image-854" /><p class="wp-caption-text">MBR: generic structure. Taken from [4]</p></div>
<p>The following table includes further detail about their location within the sector. This information is critical in order to correctly analyse the MBR.</p>
<div id="attachment_884" class="wp-caption aligncenter" style="width: 422px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR4.png" alt="" title="MBR structure in further detail" width="412" height="185" class="size-full wp-image-884" /><p class="wp-caption-text">MBR structure in further detail</p></div>
<p><strong>The Bootstrap Code Area</strong></p>
<p>Also called the Master Boot Code or the bootloader area. Bootstrapping is a simple process activating a more complicated system. The code is responsible for the following activities:</p>
<ol>
<li>Scans the partition table for the active partition.
<li>Finds the starting sector of the active partition.
<li>Loads a copy of the boot sector from the active partition into memory.
<li>Transfers control to the executable code in the boot sector.
</ol>
<p>If the master boot code cannot complete these functions, the system displays one of the following error messages:</p>
<ul>
<li>Invalid partition table
<li>Error loading operating system
<li>Missing operating system
</ul>
<p><strong>Boot Record Signature</strong></p>
<p>Also refered to as the Magic Number. Is a 2 bytes of code acting as a signature for the MBR. Located at offsets 1FEh and 1FFh and it&#8217;s values are: 55 AA in hex</p>
<p>To confirm the boot record signature in our system, read 2 bytes starting from offset 1FEh using the hex editor as in the following diagram</p>
<div id="attachment_887" class="wp-caption aligncenter" style="width: 341px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR5.png" alt="" title="MBR Signature" width="331" height="138" class="size-full wp-image-887" /><p class="wp-caption-text">MBR Signature</p></div>
<p><strong>Partition Table</strong></p>
<p>To investigate the master partition table, read between offset 1BEh and 1FDh taking the following structure of the generic partition table into consideration.</p>
<div id="attachment_888" class="wp-caption aligncenter" style="width: 400px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR6.png" alt="" title="MBR Partition Table" width="390" height="225" class="size-full wp-image-888" /><p class="wp-caption-text">MBR Partition Table</p></div>
<p>The standard partition table is limited to 4 partitions only. However, the last partition can be used as an extended partition table to include/support further partitioning. To investigate the partitions further, we can highlight them with a background colour for a better view. For instance, I highlighted the bytes between offsets 1BEh and 1CDh in blue, and applied a similar approach for the other three partitions.</p>
<div id="attachment_890" class="wp-caption aligncenter" style="width: 451px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR7.png" alt="" title="MBR - Partition Table Entries" width="441" height="101" class="size-full wp-image-890" /><p class="wp-caption-text">MBR &#8211; Partition Table Entries</p></div>
<p>The first entry for partition #1 will be analysed in this article, you can apply the same proceedure to analyse the other 3 entries (partitions). At this point, the structure of the 16-byte partition table entry is need:</p>
<div id="attachment_893" class="wp-caption aligncenter" style="width: 444px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR8.png" alt="" title="MBR - Partition Table Entry" width="434" height="200" class="size-full wp-image-893" /><p class="wp-caption-text">MBR &#8211; Partition Table Entry</p></div>
<p>Based on the structure above, I am now reformatting the hexadecimal values for each of the four entries I have found in the MBR as follows:</p>
<ul>
<li><FONT style="BACKGROUND-COLOR: red">80</font> <FONT style="BACKGROUND-COLOR: green">20 21 00</font> <FONT style="BACKGROUND-COLOR: aqua">07</font> <FONT style="BACKGROUND-COLOR: yellow">7E 25 19</font> <FONT style="BACKGROUND-COLOR: orange">00 08 00 00</font> <FONT style="BACKGROUND-COLOR: gray"> 00 38 06 00</font>
<li><FONT style="BACKGROUND-COLOR: red">00</font> <FONT style="BACKGROUND-COLOR: green">7E 26 19</font> <FONT style="BACKGROUND-COLOR: aqua">07</font> <FONT style="BACKGROUND-COLOR: yellow">FE FF FF</font> <FONT style="BACKGROUND-COLOR: orange">00 40 06 00</font> <FONT style="BACKGROUND-COLOR: gray">00 C0 D7 22</font>
<li><FONT style="BACKGROUND-COLOR: red">00</font> <FONT style="BACKGROUND-COLOR: green">FE FF FF</font> <FONT style="BACKGROUND-COLOR: aqua">07</font> <FONT style="BACKGROUND-COLOR: yellow">FE FF FF</font> <FONT style="BACKGROUND-COLOR: orange">00 00 DE 22</font> <FONT style="BACKGROUND-COLOR: gray">00 A8 61 02</font>
<li><FONT style="BACKGROUND-COLOR: red">00</font> <FONT style="BACKGROUND-COLOR: green">FE FF FF</font> <FONT style="BACKGROUND-COLOR: aqua">0C</font> <FONT style="BACKGROUND-COLOR: yellow">FE FF FF</font> <FONT style="BACKGROUND-COLOR: orange">00 A8 3F 25</font> <FONT style="BACKGROUND-COLOR: gray">B0 3A 03 00</font>
</ul>
<p>This would help me to distinguish between the different parts. I could now start analysing the first entry step by step</p>
<ul>
<li> <FONT style="BACKGROUND-COLOR: red">80</font> 20 21 00 07 7E 25 19 00 08 00 00 00 38 06 00
</ul>
<p>The value 80h indicated an Active Partition which is where the boot flag is set. An active partition indicates to a MS-DOS/MS Windows-type boot loader which partition to boot. In Windows, this is labelled as a SYSTEM partition. </p>
<p>Another value to expect is 00 which is an indication of a non-active partition.</p>
<ul>
<li> 80 <FONT style="BACKGROUND-COLOR: green">20 21 00</font> 07 7E 25 19 00 08 00 00 00 38 06 00
</ul>
<p>These bytes represent the partition’s starting sector in CHS (Cylinder-Head-Sector) values. They read 0, 21, 20 9 (hex) because they were stored on the disk in little-endian.</p>
<ul>
<li> 80 20 21 00 <FONT style="BACKGROUND-COLOR: aqua">07</font> 7E 25 19 00 08 00 00 00 38 06 00
</ul>
<p>This byte represent the partition’s file system. 07 is an indication for NTFS.</p>
<p>Information about MBR partition types can be found online:<br />
- <a href="http://www.win.tue.nl/~aeb/partitions/partition_types-1.html" target="_blank">http://www.win.tue.nl/~aeb/partitions/partition_types-1.html</a><br />
- <a href="http://en.wikipedia.org/wiki/Partition_type" target="_blank">http://en.wikipedia.org/wiki/Partition_type</a></p>
<p>Some MBR partition types such as 05h and 0Fh will indicate an extended partition. MBR bytes will only tell if an extended partition exist, and its size; Further detail must be extracted from each partition records directly. E.g. the extended partition table in the Extended Boot Records (EBRs). </p>
<p>With more EBRs linked to further EBR tables from its previous link, obtaining the complete layout of any hard disk requires an investigation of the data in the Extended partition tables of each EBR as well as the Master Partition Table!</p>
<ul>
<li> 80 20 21 00 07 <FONT style="BACKGROUND-COLOR: yellow">7E 25 19</font> 00 08 00 00 00 38 06 00
</ul>
<p>These bytes represent the partition’s ending sector in CHS (Cylinder-Head-Sector) values. They read 19, 25, 7E (hex) because they were stored on the disk in little-endian</p>
<ul>
<li> 80 20 21 00 07 7E 25 19 <FONT style="BACKGROUND-COLOR: orange">00 08 00 00</font> 00 38 06 00
</ul>
<p>Starting sector: 00 08 00 00 becomes 00 00 08 00 in hex because it was stored on disk in little-endian, which is 2048 in Decimal.</p>
<p>Using Hex Workshop this can be confirmed,  go to sector 800h</p>
<div id="attachment_898" class="wp-caption aligncenter" style="width: 368px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR9.png" alt="" title="MBR- Sector 800h" width="358" height="176" class="size-full wp-image-898" /><p class="wp-caption-text">MBR- Sector 800h</p></div>
<ul>
<li> 80 20 21 00 07 7E 25 19 00 08 00 00 <FONT style="BACKGROUND-COLOR: gray"> 00 38 06 00</font>
</ul>
<p>The size of the partition: 00 38 06 00 becomes 00 06 38 00 = 407552 sectors (by converting to Decimal) =  208666624 bytes = 199 MiB</p>
<p>For demonstration purposes, the information learned about partition #1 will be compared with that from the <em>Windows Disk Management</em>. Information learned so far include:</p>
<ul>
<li>Active Partition. In windows this can indicate a system partition.
<li>NTFS
<li>start at sector 2048
<li>Size: 407552 sectors = 199 MiB
</ul>
<div id="attachment_901" class="wp-caption aligncenter" style="width: 370px"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/11/MBR10.png" alt="" title="Partition Information using Windows Disk Management" width="360" height="157" class="size-full wp-image-901" /><p class="wp-caption-text">Partition Information using Windows Disk Management</p></div>
<p>Since the partition we covered turned out to be a System partition, I may conclude the article by discussing the differences between system partitions and boot partitions.</p>
<p>As stated by Microsoft tech notes, the system partition hosts the hardware-related files that tell a computer where to look to start Windows while a boot partition directly hosts the Windows operating system files, which are located in the Windows file folder. This is very useful when you have a multiboot computer.</p>
<p><strong>References</strong></p>
<p>[1] What are system partitions and boot partitions? [online]<br />
From http://windows.microsoft.com/is-IS/windows-vista/What-are-system-partitions-and-boot-partitions Last Accessed: 07/11/2012.</p>
<p>[2] Master Boot Record [online]<br />
From http://technet.microsoft.com/en-us/library/cc976786.aspx Last Accessed: 07/11/2012.</p>
<p>[3] How to develop your own Boot Loader [online]<br />
From http://www.codeproject.com/Articles/36907/How-to-develop-your-own-Boot-Loader Last Accessed: 07/11/2012.</p>
<p>[4] Joey Prestia (2008). Joey&#8217;s Notes: The Red Hat Linux Boot Process. [online]<br />
From http://linuxgazette.net/156/prestia.html Last Accessed: 07/11/2012.</p>
<p>[5] Daniel B. Sedory (2007) MBR/EBR Partition Tables [online]<br />
From http://thestarman.pcministry.com/asm/mbr/PartTables.htm Last Accessed: 07/11/2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/bios/analysing-the-master-boot-record-mbr-with-a-hex-editor-hex-workshop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Standard and composite RAID Technology explained with diagrams</title>
		<link>http://blog.creativeitp.com/posts-and-articles/non-volatile-memory/standard-and-composite-raid-technology-explained-with-diagrams/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/non-volatile-memory/standard-and-composite-raid-technology-explained-with-diagrams/#comments</comments>
		<pubDate>Sun, 28 Oct 2012 14:30:59 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Non-Volatile Memory]]></category>
		<category><![CDATA[RAID]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=822</guid>
		<description><![CDATA[The architecture of modern storage technologies is designed to maintain redundancy and performance in computerised systems. This objective can be achieved with the combination of multiple disks (or disk components) to work as a single virtual storage facility. The Redundant Array of Independent Disks (RAID) is being used as an umbrella term for virtual computer [...]]]></description>
				<content:encoded><![CDATA[<p>The architecture of modern storage technologies is designed to maintain redundancy and performance in computerised systems. This objective can be achieved with the combination of multiple disks (or disk components) to work as a single virtual storage facility. The Redundant Array of Independent Disks (RAID) is being used as an umbrella term for virtual computer data storage schemes.</p>
<p>There are different standard and composite RAID architectures that can strip and mirror data among multiple disks to achieve redundancy and/or performance. These are named by the word RAID followed by a number (e.g. RAID 0, RAID 1 etc) and each is referred to as a RAID level.  When RAID is used, the storage is virtually represented as a single unit and therefore accessed by an Operating System as a single device. </p>
<p>The architecture of each RAID level can be described by the way data is replicated (mirrored) and/or stripped at a particular level (bit level, byte level or block level which size is determined by a number of bytes i.e. larger than the other two levels). Parity data is also used in many schemes. These techniques are explained bellow:<br />
<span id="more-822"></span></p>
<ul>
<li><em>Stripping</em>: segmenting a file or a particular size of data into different logically sequential blocks and storing them on different storage devices. Hence, retrieving this data at a time becomes faster. This can be performed on the bit, byte of block level.</li>
<p></p>
<li><em>Mirroring</em>: real-time duplication of data into separate storage devices to maintain availability.</li>
<p></p>
<li><em>Parity</em>: is usually used for error detection. In RAID however, parity is used to reconstruct missing data and achieve redundancy (using the XOR function). To better understand parity, take the following simplified example:
<p>In a scheme consisting of 3 storage devices in RAID, assume that the following bits are stored in two disks:</p>
<p>Disk 1: <strong>01101101</strong><br />
Disk 2: <strong>11010100</strong><br />
Disk 3 will hold calculate parity data for the two disks above, an XOR is performed on their data:</p>
<pre>
        <strong>11001101</strong>
  XOR   <strong>10010110</strong>
_____________
Disk 3: <strong>01011011</strong>
</pre>
<p>Now, if any disk fails, its data can always be reconstructed through performing an XOR function using the bits from the remaining two disks. If mirroring was used, recovering these data would require 4 disks in total (two holding the data and another two duplication them) compared to the three disks used with parity as in our example above.
<li></ul>
<p></p>
<p><strong>RAID Levels</strong></p>
<p>It is not wise to describe a RAID level as good or bad, each is serving as a solution to a particular problem considering the resources made available and the significance of data. To further explain RAID, let’s take the following examples supported by diagrams:</p>
<ul>
<li><strong>RAID 0</strong>: is a block-level stripping with no parity or mirroring. Therefore, it improves performance but has no fault tolerance. RAID 0 requires a minimum of two disks.<br />
<div id="attachment_843" class="wp-caption aligncenter" style="width: 205px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/10/RAID_0.svg_.png"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/10/RAID_0.svg_-195x300.png" alt="RAID 0" title="RAID 0" width="195" height="300" class="size-medium wp-image-843" /></a><p class="wp-caption-text">RAID 0 with two disks (disk 0 and disk 1) over one logical volume A with odd blocks on disk 0 and even blocks on disk 1</p></div>
</li>
<p></p>
<li><strong>RAID 1</strong>: is mirroring in real-time backup mode but without parity or stripping. Therefore, a read request is served by either disk after considering seek-time and latency to retrieve the data. RAID 1 requires a minimum of two disks.<br />
<div id="attachment_836" class="wp-caption aligncenter" style="width: 205px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/10/325px-RAID_1.svg_.png"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/10/325px-RAID_1.svg_-195x300.png" alt="RAID 1" title="RAID 1" width="195" height="300" class="size-medium wp-image-836" /></a><p class="wp-caption-text">RAID 1 with two disks (disk 0 and disk 1) over one logical volume A with all blocks replicated/mirrored from drive 0 to drive 1</p></div>
</li>
<p></p>
<li><strong>RAID 3</strong>: is a byte-level stripping with dedicated parity. Hence, it required a minimum of 3 disks; two to hold the stripped data and one is dedicated for parity bytes.<br />
<div id="attachment_837" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/10/675px-RAID_3.svg_.png"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/10/675px-RAID_3.svg_-300x222.png" alt="RAID 3" title="RAID 3" width="300" height="222" class="size-medium wp-image-837" /></a><p class="wp-caption-text">RAID 3 with four disks (disk 0, 1, 2, and 3) two 6-byte blocks, A &#038; B, shown with their two bytes of parity on disk 3</p></div>
</li>
<p></p>
<li><strong>RAID 5</strong>: is a block-level stripping with distributed parity. As such, it also requires a minimum of 3 disks. This way, the data contained in an array is not lost by any single drive failure.<br />
<div id="attachment_840" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/10/RAID_5.svg_.png"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/10/RAID_5.svg_-300x222.png" alt="RAID 5" title="RAID 5" width="300" height="222" class="size-medium wp-image-840" /></a><p class="wp-caption-text">RAID 5 with these four disks (disk 0, 1, 2, and 3) and each group of blocks (orange, yellow, green, and blue) have a distributed parity block that is distributed across the four disks, which has no consequenses for other raids</p></div>
</li>
<p></p>
<li><strong>RAID 6</strong>: similar to RAID 5, is a block-level stripping but with dual distributed parity to support fault tolerance of two disks at a time. This design is very convenient for systems required to provide performance and high-availability.<br />
<div id="attachment_841" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.creativeitp.com/wp-content/uploads/2012/10/RAID_6.svg_.png"><img src="http://blog.creativeitp.com/wp-content/uploads/2012/10/RAID_6.svg_-300x176.png" alt="RAID 6" title="RAID 6" width="300" height="176" class="size-medium wp-image-841" /></a><p class="wp-caption-text">RAID 6 with five disks (disk 0, 1, 2, 3, and 4) and each group of blocks (orange, yellow, green, and blue) has two distributed parity blocks that are distributed across the five disks</p></div>
</li>
</ul>
<p>
The previous RAID levels are standard. In addition to these, a composite (also called nested or hybrid) RAID of the standard levels is possible as in the following two examples:</p>
<ul>
<li><strong>RAID 10</strong>: is a composite of RAID 1 and RAID 0, hence it is mirroring and then stripping. Requires 2 mirrors and each is then stripped into two, that is 4 disks at least.
</li>
<p></p>
<li><strong>RAID 01</strong>: is a composite of RAID 0 and RAID 1, hence data is stripped first across the primary disks and then mirrored. Requires 4 disks at least.</li>
<p>
</ul>
<p>RAID technology can be managed either by a dedicated computer hardware which is the ideal scenario or else by a software as part of the OS or the framework and drivers of a hardware RAID controller. Relying on a software implementation would affect and limit RAID&#8217;s performance and create a single point of failure.</p>
<p><strong>References</strong></p>
<p>[1] Samara Lynn (2010). RAID Levels Explained. Available from:<br />
<a href="http://www.pcmag.com/article2/0,2817,2370235,00.asp" target="_blank">http://www.pcmag.com/article2/0,2817,2370235,00.asp</a> Accessed: 28, Oct 2012.</p>
<p>[2] RAID Levels Explained. Available from: <a href="http://www.sohoconsult.ch/raid/raid.html" target=_blank">http://www.sohoconsult.ch/raid/raid.html</a><br />
Accessed: 28, Oct 2012.</p>
<p><strong>*</strong> <em>Diagrams used to support this article were taken from the Wikimedia Commons, which is a freely licensed media file repository.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/non-volatile-memory/standard-and-composite-raid-technology-explained-with-diagrams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to the File Allocation Table (FAT) File System</title>
		<link>http://blog.creativeitp.com/posts-and-articles/windows/introduction-to-the-file-allocation-table-fat-file-system/</link>
		<comments>http://blog.creativeitp.com/posts-and-articles/windows/introduction-to-the-file-allocation-table-fat-file-system/#comments</comments>
		<pubDate>Sun, 28 Oct 2012 01:12:23 +0000</pubDate>
		<dc:creator>Haider M. al-Khateeb</dc:creator>
				<category><![CDATA[Non-Volatile Memory]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Computer Forensics]]></category>
		<category><![CDATA[File Systems]]></category>

		<guid isPermaLink="false">http://blog.creativeitp.com/?p=785</guid>
		<description><![CDATA[It is the oldest file system for Windows and was mainly designed as a light-weight file system suitable for floppy disks less than 500 kB. FAT is supported by all Microsoft OSs since it was developed in 1977 for MS-DOS; to be more precise, FAT was used in DOS and Windows 9x (generic term for [...]]]></description>
				<content:encoded><![CDATA[<p>It is the oldest file system for Windows and was mainly designed as a light-weight file system suitable for floppy disks less than 500 kB. FAT is supported by all Microsoft OSs since it was developed in 1977 for MS-DOS; to be more precise, FAT was used in DOS and Windows 9x (generic term for Win95, Win98 &#038; ME which use the codebase of Win95 kernel and the earlier MS-DOS) and supported by the later Windows NT OSs (Windows 2000 onward) since they use NTFS instead.</p>
<p><strong>How does it work?</strong></p>
<p>The FAT volume is divided into the following areas</p>
<table border=1>
<tr>
<td>Boot sector</td>
<td>Reserved Area<br />
(optional)</td>
<td>FAT1</td>
<td>FAT2</td>
<td>Root directory<br />
(FAT12/16 only)</td>
<td>Data region<br />
(rest of disk)</td>
</tr>
</table>
<p><strong>The boot Record</strong></p>
<p>The boot record in the FAT file system contains critical information about the volume, the structure of the FAT file system itself, the OS to be booted, an executable code and other detail. Once the executable code is triggered, control is handed to the operating system loaded from the partition.<br />
The boot record area is always located at the beginning of the FAT system. It is contained in the first sector of FAT12 and FAT16 volumes or could take more space (3 sectors) as in a FAT32 volume.<br />
<span id="more-785"></span></p>
<p><strong>The File Allocation Tables (FAT1 &#038; FAT2)</strong></p>
<p>The FAT file system organises sectors (a sector is the smallest unit of a storage media, measures 512 bytes in HDDs) into clusters of a predefined size (cluster sizes typically range from 1 sector to 128 sectors which is 64 KiB). When storing a file, its data is written in a number of clusters and their addresses are logged in a File Allocation Table. To retrieve the file, the File Allocation Table helps to lookup these clusters and retrieve the data. Each entry contains a pointer to the consequent cluster containing the remaining data of the file. This process/lookup begins from the root directory where the address of the first cluster for a file is reserved.</p>
<p>Other possible entries in FAT include: unallocated, end of file and a bad cluster. These are defined with special values in the FAT structure (e.g. zero means the cluster is not in use).</p>
<p>Due to the critical rule of a FAT, it is usually mirrored for redundancy in the case of data corruption; these two tables are referred to as FAT1 and FAT2. This mirroring feature can be disabled as of FAT32 by editing the boot record of the partition in question.</p>
<p><strong>The root directory</strong></p>
<p>Each file or directory stored in the file system contains an entry here. This entry includes detail such as the file name, starting cluster number and file size. </p>
<p>When retrieving a file, the file system will load the starting cluster found in the root directory, lookup its offset in the FAT to find the address of the next cluster to load.</p>
<p>The root directory area is of fixed size in FAT12 and FAT16 and always comes after the FAT1 &#038; FAT2 areas. However, as of FAT32 it is merged with the Data Area and treated like any other chain of clusteres which gives it more flexibility when it comes to size.</p>
<p><strong>The Data Area</strong></p>
<p>This is where the files are actually stored. Hence, we could refer to the previous locations as the <em>System Area</em> in contrast.</p>
<p><strong>Conclusion&#8211; A file in the FAT file system</strong></p>
<p>Based on the information demonstrated so far, a file of a particular size in the FAT file system will have a root directory entry to define the file, a set of values in the FAT to lookup the clusters and finally a number of clusters containing the data for that file.</p>
<p><strong>FAT12, FAT16, FAT32 and exFAT</strong></p>
<p>The objective of this article was to provide a brief explanation of how the FAT file system works. More about the different versions of FATs is covered in <a href="http://blog.creativeitp.com/posts-and-articles/windows/the-fat-file-system-and-the-new-exfat-fat64/">another article here</a>.</p>
<p><b>References</b></p>
<p>[1] local file systems in windows, <a href="http://www.microsoft.com/whdc/device/storage/LocFileSys.mspx" target="_blank">http://www.microsoft.com/whdc/device/storage/LocFileSys.mspx</a> Accessed Oct, 2012.<br />
Alternatively, can be downloaded directly from my <a href='http://blog.creativeitp.com/wp-content/uploads/2010/01/LocFileSys.zip'>server</a>.<br />
[2] Examining the new FAT 32 system, <a href="http://technet.microsoft.com/en-us/library/cc751399.aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc751399.aspx</a> Accessed Oct, 2012.<br />
[3] FAT32 Hard Disk, <a href="http://myweb.tiscali.co.uk/bridip/recovery.htm" target="_blank">http://myweb.tiscali.co.uk/bridip/recovery.htm</a> Accessed Oct, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creativeitp.com/posts-and-articles/windows/introduction-to-the-file-allocation-table-fat-file-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
