<?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>Geek Republic &#187; Hacks</title>
	<atom:link href="http://www.geek-republic.com/topics/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geek-republic.com</link>
	<description>...in Geek we trust</description>
	<lastBuildDate>Thu, 02 Feb 2012 14:17:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Bypass Wikipedia SOPA Blackout</title>
		<link>http://www.geek-republic.com/2012/01/18/bypass-wikipedia-sopa-blackout/</link>
		<comments>http://www.geek-republic.com/2012/01/18/bypass-wikipedia-sopa-blackout/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 14:43:17 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[bypass]]></category>
		<category><![CDATA[get around]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[pipa]]></category>
		<category><![CDATA[sopa]]></category>
		<category><![CDATA[wiki]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=4050</guid>
		<description><![CDATA[While I agree that spreading the word about SOPA and PIPA is a great idea, I definitely do not agree with a complete blackout of the most widely used reference site. If I were running Wikipedia, I would have made it so users would have to click a button to continue to their information. Wikipedia [...]]]></description>
			<content:encoded><![CDATA[<p>While I agree that spreading the word about SOPA and PIPA is a great idea, I definitely do not agree with a complete blackout of the most widely used reference site. If I were running Wikipedia, I would have made it so users would have to click a button to continue to their information. Wikipedia itself has said that this is not a total blackout, as they are still making the site completely accessible to mobile users. Of course, who wants to look up that information on a tiny screen? (Unless you have a tablet of some sort.) Sort of changing information in Firefox to access the mobile version, I stumbled across a much easier way. I found it on a Dropbox users page and the site is <a href="http://dl.dropbox.com/u/57797808/index.html">HERE</a>. However, here is the jist of it. Wikipedia is just using some CSS to cover the page you need. With a little javascript, that CSS can be blocked. So you just drag the javascript link on the DropBox site into your booklet or bookmarks on Firefox, and when you get to the wiki with a SOPA/PIPA blackout, just click it and it takes care of the hard work for you!<br />
Enjoy, but do not forget the dreadful, evil thing that is hanging over our heads.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2012/01/18/bypass-wikipedia-sopa-blackout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stripping DRM from OverDrive Media Console EPUBs &#8211; Part 3 of 3</title>
		<link>http://www.geek-republic.com/2011/06/06/stripping-drm-overdrive-media-console-epubs-part-3/</link>
		<comments>http://www.geek-republic.com/2011/06/06/stripping-drm-overdrive-media-console-epubs-part-3/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 20:04:26 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ADEPT]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[overdrive]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=3275</guid>
		<description><![CDATA[Part 3: Further OverDrive Media Console Analysis and DRM Removal Automation In the previous article we identified a weakness within the OverDrive Media Console which allows direct access to EPUB data. However, application of public tools for the removal of the ADEPT DRM layer proved to be fruitless due to the specification noncompliant nature of [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.geek-republic.com/wp-content/uploads/2011/05/stripping_drm.jpg"><img class="aligncenter size-full wp-image-3300" title="stripping_drm" src="http://www.geek-republic.com/wp-content/uploads/2011/05/stripping_drm.jpg" alt="stripping_drm" width="400" height="444" /></a></p>
<p><strong>Part 3: Further OverDrive Media Console Analysis and DRM Removal Automation</strong></p>
<p>In  the previous article we identified a weakness within the OverDrive  Media Console which allows direct access to EPUB data. However,  application of public tools for the removal of the ADEPT DRM layer  proved to be fruitless due to the specification noncompliant nature of  the EPUB data. In this article we will further investigate the inner  workings of OverDrive Media Console and outline several vectors which  will allow the removal of the ADEPT DRM layer in an automated fashion.</p>
<p>From  inspection of the ineptepub tool we can see that the encrypted version  of the RSA certificate is stored in an XML tag titled encryptedKey. So  lets use our trusty grep tool again and see what we can turn up within  OverDrive Media Console’s program directory:</p>
<p><a href="http://www.geek-republic.com/wp-content/uploads/2011/05/find_encryptedKey.png"><img class="alignnone size-full wp-image-3277" src="http://www.geek-republic.com/wp-content/uploads/2011/05/find_encryptedKey.png" alt="" width="505" height="366" /></a></p>
<p>Very interesting. Apparently OverDrive Media Console stores some information in a <a href="http://en.wikipedia.org/wiki/SQLite">SQLite</a> database. Using SFTP lets copy this file to our host system and see  what goodies are contained within its binary walled garden.<br />
<a href="http://www.geek-republic.com/wp-content/uploads/2011/05/sql_tables.png"><img class="alignnone size-full wp-image-3276" src="http://www.geek-republic.com/wp-content/uploads/2011/05/sql_tables.png" alt="" width="516" height="289" /></a></p>
<p>While  most of the information contained within the database is not applicable  to our efforts the ZMEDIA and ZLICENSE tables contain some choice  information. Examining the contents of these tables we find some columns  of data that have the information relevant to our interests:</p>
<pre>
Table       Column                 Description
ZMEDIA    ZCONTENTID   Unique identifier for the fulfilled EPUB request.
ZMEDIA    ZTITLE           Title of the EPUB.
ZMEDIA    ZBASEURL       Download URL for the fulfilled EPUB request.
ZLICENSE  ZLICENSESTR  A mangled version of the ADEPT rights.xml info.
</pre>
<p>Jackpot!  Although there’s much more data to be investigated most of it has to do  with business logic associated with the OverDrive Media Console GUI  itself. In theory with this data we should be able to generate a  rights.xml file from the ZLICENSESTR column data using an XSLT or manual  transformation, package that file with the target EPUB file, and use  the ineptepub tool to decrypt the archive’s contents.</p>
<p>For  purposes of testing I have created just such an EPUB by extracting the  corresponding ZLICENSESTR data, converting it to a proper rights.xml  file, and archiving it with the test.epub file as test.rights.epub. Now,  when executing the ineptepub tool against the file we get the following  result:</p>
<p><a href="http://www.geek-republic.com/wp-content/uploads/2011/05/ineptepud-dumbsuccess.png"><img class="alignnone size-full wp-image-3278" src="http://www.geek-republic.com/wp-content/uploads/2011/05/ineptepud-dumbsuccess.png" alt="" width="631" height="520" /></a></p>
<p>Success!  If we extract the contents of this archive we find that the AES-128-CBC  encryption has been removed from the EPUB contents and the result is a  completely open standards compliant EPUB that can be loaded into any  compatible reader.</p>
<p>When  viewing the EPUB even though OverDrive Media Console will decrypt  several pages at once every 10 pages or so and cache the results to  improve the interaction with the document on the iPad or iPhone there is  a pause of up to a full minute while the next batch of pages are  decrypted. Now with this encryption layer removed and the EPUB loaded  into iBooks the response time is at least several order of magnitudes  faster and much more in line with the experience that a publisher would  want a customer to have with their product.</p>
<p>So  to recap we are able to strip the ADEPT security layer from the titles  downloaded through OverDrive Media Console by the following method:</p>
<ol>
<li>Copy the unarchived EPUB data from the device.</li>
<li>Copy the OverDrive.sqlite database from the device.</li>
<li>Extract the ZLICENSESTR data for the corresponding EPUB title.</li>
<li>Convert the ZLICENSESTR to the appropriate rights.xml format and create the file in the extracted EPUB’s META-INF directory.</li>
<li>Zip the extracted archive’s data into a new EPUB.</li>
<li>Execute the ineptepub tool on the newly created EPUB.</li>
</ol>
<p>While  this method works there should be a much easier way to utilize the data  from the OverDrive.sqlite database to automate the process.</p>
<p><strong>Developing Automated DRM Removal Tool</strong></p>
<p>To  begin our development it should be noted that every EPUB that is  downloaded to OverDrive Media Console is identified with a unique 32  character hexadecimal Content ID of the form:</p>
<pre class="brush: plain; highlight: [1]; light: true; title: ; toolbar: false; notranslate">01234567-9ABC-DEF0-1234-567890ABCDEF</pre>
<p>As  this ID is present in both the ZMEDIA and corresponsing ZLICENSE  entries of the database we should be able to consolidate this  information into a single data structure containing all necessary  information about the entries. Furthermore recall that there was a  ZBASEURL column in the ZMEDIA table that was described as containing a  download URL for the fulfilled EPUB request. The URL exists in the form:</p>
<pre class="brush: plain; highlight: [1,2]; html-script: false; light: true; title: ; toolbar: false; notranslate">http://acs.contentreserve.com/ACSStore1/
0123-4/567/89A/BC/{01234567-9ABC-DEF0-1234-567890ABCDEF}Fmt410.epub</pre>
<p>Note  that this URL exists per title within the Content Reserve system as the  data contained within the EPUB is encrypted with the same AES cipher  key for all requests. Also, from testing it can be seen that there is no  known user-agent checking or authentication associated with this URL so  any method may be used to retrieve the data including but not limited  to: regular browser request, cURL, download accelerator, or even a  custom download library. By utilizing this field we are negated from  having to transfer the uncompressed EPUB archive from our device.  Therefore the only transfer to the host system that should be necessary  is the OverDrive.sqlite file.</p>
<p>However,  there is still one more catch. As it exists the ineptepub tool requires  a rights.xml file to be present in the EPUB archive or it will throw an  invalid ADEPT EPUB exception. Therefore the proposed solution will  automatically modify the specification noncompliant ADEPT EPUB by adding  this rights.xml file effectively making a specification compliant ADEPT  EPUB and pass execution off to the ineptepub tool to finish the  processing.</p>
<p>Finally,  since Python is currently being used for execution of the ineptepub  tool the solution may as well also execute within the same Python  environment. With all these requirements in place we present to you:</p>
<p><a href="http://pastie.org/private/dj4ri9cqhqionc3uuunm1q"><strong>OverDrive Media Console DRM Stripper v1.1 (omcstrip.py)</strong></a></p>
<p>Simply  execute this tool passing in the path to your OverDrive.sqlite and  adeptkey.der files and the tool will print out a list of EPUBs ready to  be downloaded and stripped of the ADEPT DRM layer. Execute the tool  along with a desired Content ID and the EPUB will be automatically  downloaded from the server, insert the necessary rights.xml file, and  delegate the actual removal of the DRM to the ineptepub tool.</p>
<p><strong>OMCStrip Usage Information</strong></p>
<pre class="brush: plain; gutter: false; highlight: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]; title: ; toolbar: false; notranslate">
python ./omcstrip.py --help

OverDrive Media Console DRM Stripper

Usage: omcstrip.py [OPTION]...

Startup:
-h, --help    print this help
-l, --list    list available files for processing and exit
-i, --id      content id of the asset to be processed.
-a, --all     process all available assets
-d, --debug   print debug information
-v, --version print script version and exit
Input:
-s, --sqlfile  OverDrive SQLite database (Default: OverDrive.sqlite)
-k, --keyfile  Extracted Abode ADEPT DER key file (Default: adeptkey.der)
</pre>
<pre class="brush: plain; gutter: false; highlight: [1,2,3,4,5]; title: ; toolbar: false; notranslate">
python ./omcstrip.py --list

Content ID                        Title
----------                        ------------
01234567-9ABC-DEF0-1234-567890ABCDEF    Test EPUB
</pre>
<p><strong>Example OMCStrip Excution</strong></p>
<pre class="brush: plain; gutter: false; highlight: [1,2,3,4,5,6,7,8,9,10,11]; title: ; toolbar: false; notranslate">
python ./omcstrip.py --id 01234567-9ABC-DEF0-1234-567890ABCDEF

Content ID                        Title
----------                        ------------
01234567-9ABC-DEF0-1234-567890ABCDEF    Test EPUB

Downloading 01234567-9ABC-DEF0-1234-567890ABCDEF.epub (12345678 bytes)
Downloading complete.
Injecting rights.xml
Stripping Adobe ADAPT DRM from 01234567-9ABC-DEF0-1234-567890ABCDEF.epub
Saving ePub as 01234567-9ABC-DEF0-1234-567890ABCDEF.decoded.epub
</pre>
<p><strong>Conclusion</strong></p>
<p>While  the ADEPT DRM scheme provides excellent content protection in  accordance with the EPUB specification its use as a rights management  tool is architecturally flawed. Furthermore, OverDrive Media Console’s  unencrypted and trivially obfuscated implementation of its own standard  can be easily leveraged to repackage the content into a specification  compliant format which can be used in conjunction with existing tools  for easy decryption.</p>
<p>[Thanks to Armin Tamzarian]<br />
<a href="http://www.geek-republic.com/wp-content/uploads/2011/05/ccby.png"><img class="alignnone size-full wp-image-3265" src="http://www.geek-republic.com/wp-content/uploads/2011/05/ccby.png" alt="" width="80" height="15" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2011/06/06/stripping-drm-overdrive-media-console-epubs-part-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Stripping DRM from OverDrive Media Console EPUBs &#8211; Part 2 of 3</title>
		<link>http://www.geek-republic.com/2011/06/01/stripping-drm-overdrive-media-console-epubs-part-2/</link>
		<comments>http://www.geek-republic.com/2011/06/01/stripping-drm-overdrive-media-console-epubs-part-2/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 16:00:08 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ADEPT]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[overdrive]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=3264</guid>
		<description><![CDATA[OverDrive Media Console Analysis In the previous article we investigated the background and technologies surrounding the DRM process used by the OverDrive Media Console. In this article we will turn our attention to the OverDrive Media Console itself in order to locate any mechanism which we can manipulate for our advantage. Before we begin with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.geek-republic.com/wp-content/uploads/2011/05/stripping_drm.jpg"><img class="aligncenter size-full wp-image-3300" title="stripping_drm" src="http://www.geek-republic.com/wp-content/uploads/2011/05/stripping_drm.jpg" alt="stripping_drm" width="400" height="444" /></a></p>
<p><strong>OverDrive Media Console Analysis</strong></p>
<p>In  the previous article we investigated the background and technologies  surrounding the DRM process used by the OverDrive Media Console. In this  article we will turn our attention to the OverDrive Media Console itself in order to locate any mechanism which we can manipulate for our advantage.</p>
<p>Before  we begin with the analysis of the OverDrive Media Console application  it should be noted that there are some prerequisites to enable proper  analysis:</p>
<ul>
<li>A  jailbroken iDevice (For demonstration purposes an iPad and iPhone will  be used). I have not had a chance to look into Android or Blackberry  installations of OverDrive Media Console, but with file system access  similar result may be achieved.</li>
<li>An Adobe ID</li>
<li>An installation of Adobe Digital Editions</li>
<li>A system capable of running Python</li>
<li><a href="http://pastie.org/1030386">inpetkey</a></li>
<li><a href="http://pastie.org/1032773">ineptepub</a></li>
</ul>
<p>Firstly  SSH or otherwise gain command line access to your device and locate the  installation of OverDrive Media Console. As an example, on the iPad the  program was found at following location:</p>
<pre class="brush: plain; highlight: [1]; light: true; title: ; toolbar: false; notranslate">/private/var/mobile/Applications/EB126631-4B6C-40E5-8430-4F6B9ABC403C</pre>
<p>If you’re having trouble the execute from the root (/ not /root) directory:</p>
<p>find * | grep OverDrive</p>
<p>Inspecting  the program directory it can be seen that the EPUBs that have been  downloaded are stored in an uncompressed format under:</p>
<pre class="brush: plain; light: true; title: ; toolbar: false; notranslate">
[OverDrive Media Console Root]
- /Documents
-- /eBooks
--- /ePubs
---- /{EPUBID}.epub
----- ...
---- /{EPUBID}.epub
----- ...
---- /{EPUBID}.epub
----- ...
</pre>
<p>From  this listing it can be seen that when one chooses to download an EPUB  title through the OverDrive Media Console application the EPUB data is  effectively fetched from the content server and stored locally. This  functionality is what allows the program to operate in an offline mode.  However, even though the content is stored locally it is still encrypted  utilizing the AES-CBC-128 cipher as noted in each EPUB’s  META-INF/encryption.xml file.</p>
<p>So  now with all of this information one should be able to ZIP up the EPUB  directory to create a specification-compliant EPUB file and use the  available ineptkey and ineptepub tools to decrypt the file. However,  let’s see how these tools work and verify their functionality with our  newly created EPUBs.</p>
<p>First,  since we have already installed completed the process of creating an  Adobe ID, installing Adobe Digital Editions, and authenticating with our  Adobe ID we will use the ineptkey tool to retrieve our private RSA  cipher key.</p>
<p><a href="http://www.geek-republic.com/wp-content/uploads/2011/05/ineptkey.py_.png"><img class="size-full wp-image-3267 alignnone" src="http://www.geek-republic.com/wp-content/uploads/2011/05/ineptkey.py_.png" alt="" width="505" height="366" /></a></p>
<p>The  RSA cipher key was saved as adeptkey.der which includes the private  cipher key in a x.509 certificate utilizing ASN.1 DER encoding. Now in  theory all we have to do is use the ineptepub tool in conjunction with  this certificate to extract the AES cipher key and decrypt the target  EPUB content.<br />
<a href="http://www.geek-republic.com/wp-content/uploads/2011/05/ineptepub.py-failure.png"><img class="alignnone size-full wp-image-3266" src="http://www.geek-republic.com/wp-content/uploads/2011/05/ineptepub.py-failure.png" alt="" width="505" height="366" /></a></p>
<p>Strange.  We get a failure, and the only message is that our file is not a valid  ADEPT EPUB. So what situation can cause this error to be thrown?  Examining the source we find the following logic statement:</p>
<pre class="brush: plain; highlight: [1,2,3]; light: true; title: ; toolbar: false; notranslate">
if 'META-INF/rights.xml' not in namelist or \
'META-INF/encryption.xml' not in namelist:
raise ADEPTError('%s: not an ADEPT EPUB' % (inpath,))
</pre>
<p>So  essentially if the EPUB does not contain a rights.xml or encryption.xml  file in the archive’s META-INF subdirectory the document is assumed to  not be a valid ADEPT archive. Indeed, upon further inspection of the  archive this fact is confirmed insomuch that although there exists the  required META-INF/encryption.xml document there is no  META-INF/rights.xml document which contains the information needed to  ultimately decrypt the document’s contents.</p>
<p>What  does this mean? In essence, either Adobe (through their Adobe Content  Server product) or OverDrive Inc (through their Content Reserve system)  are apparently transmitting EPUBs in some sort of format that is not  compliant with the ADEPT standard that they themselves created. To wit,  does this mean that we’ve hit a brick wall in our analysis of the  OverDrive Media Console Software? Hardly. Since the software can operate  in an offline mode there must exist a method by which the information  originally contained within the rights.xml is stored and retrieved  locally.</p>
<p>In  our next article we will delve even further into the inner workings of  the OverDrive Media Console and bring to light several failures of the  system and its architecture that allow for full automation of the DRM  removal process with minimal effort.</p>
<p>[Thanks to Armin Tamzarian]<br />
<a href="http://www.geek-republic.com/wp-content/uploads/2011/05/ccby.png"><img class="alignnone size-full wp-image-3265" src="http://www.geek-republic.com/wp-content/uploads/2011/05/ccby.png" alt="" width="80" height="15" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2011/06/01/stripping-drm-overdrive-media-console-epubs-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stripping DRM from OverDrive Media Console EPUBs &#8211; Part 1 of 3</title>
		<link>http://www.geek-republic.com/2011/05/31/stripping-drm-overdrive-media-console-epubs-part-1/</link>
		<comments>http://www.geek-republic.com/2011/05/31/stripping-drm-overdrive-media-console-epubs-part-1/#comments</comments>
		<pubDate>Tue, 31 May 2011 16:41:05 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ADEPT]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[overdrive]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=3262</guid>
		<description><![CDATA[An Introduction to EPUBs, OverDrive Media Console, and Adobe ADEPT Many libraries are finally entering the technology age and have started offering the ability to lend digital media to patrons including eBooks for use on compatible devices. While there are many companies which offer the services and infrastructure for your local library to enable this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geek-republic.com/wp-content/uploads/2011/05/stripping_drm.jpg"><img class="aligncenter size-full wp-image-3300" title="stripping_drm" src="http://www.geek-republic.com/wp-content/uploads/2011/05/stripping_drm.jpg" alt="stripping_drm" width="400" height="444" /></a><strong></strong></p>
<p><strong>An Introduction to EPUBs, OverDrive Media Console, and Adobe ADEPT</strong></p>
<p>Many  libraries are finally entering the technology age and have started  offering the ability to lend digital media to patrons including eBooks  for use on compatible devices. While there are many companies which  offer the services and infrastructure for your local library to enable  this service one of the largest is <a href="http://www.overdrive.com/">OverDrive, Inc</a>. with its <a href="http://www.contentreserve.com/">Content Reserve</a> system. Content Reserve is built on <a href="http://www.adobe.com/products/contentserver/">Adobe Content Server</a>, and in order to enforce content protection where applicable OverDrive implements the ADEPT digital rights management scheme.</p>
<p>In order to view the protected content the Content Reserve system requires the use of <a href="http://www.overdrive.com/Software/omc/">OverDrive Media Console</a> on a compatible device. This software allows the user to download a  reserved title and view it for a library-defined loan period before  revoking access and requiring the user to reserve the book again.  However, how does one view these titles on an incompatible device or  utilize otherwise non-approved software? In order to answer this  question let’s break down the problem into its individual components and  see if there is a way to work around the limits of the content  protections.</p>
<p><strong>EPUB Format</strong></p>
<p>The EPUB (short for Electronic PUBlication) format is a free and open eBook standard managed by the <a href="http://www.idpf.org/">International Digital Publishing Forum</a>. The current <a href="http://idpf.org/epub/201">2.0.1</a> version of the EPUB standard defines three specifications:</p>
<ul>
<li><a href="http://idpf.org/epub/20/spec/OPS_2.0.1_draft.htm">Open Publication Structure</a> (OPS)</li>
<li><a href="http://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm">Open Packaging Format </a>(OPF)</li>
<li><a href="http://idpf.org/epub/20/spec/OCF_2.0.1_draft.doc">Open Container Format</a> (OCF)</li>
</ul>
<p>Although  this separation of the standard may be confusing just know that any  EPUB file that you may find is likely packaged in the OCF format which  in turns uses the OPS and OPF specifications to define its internal data  structure. In reality the OCF format is simply a <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">ZIP</a> archive of the documents adhering to an internal structure as defined  by the OPS and OPF standards. Therefore if you’re a curious individual  you can take most EPUB files, process them with an UnZIP utility, and  view contents on the files.</p>
<p>Of  note to us regarding the OCF specification is the optional support of a  digital rights management (DRM) layer. When the DRM layer is present on  an EPUB a rights.xml file must exist in the internal file structure  within the META-INF directory. Additionally the OCF specification allows  for the encryption of its content, but when present, an encryption.xml  file must exist in the internal file structure also within the META-INF  directory.</p>
<p><strong>OverDrive Media Console</strong></p>
<p>OverDrive  Media Console is a freeware program distributed by OverDrive Inc. which  enables end users to view digital media distributed through the Content  Reserve system. While it is available for many platforms only the  versions available for Android, Blackberry, and iOS support the EPUB  formats.</p>
<p>For  reasons which will become clear later in this article the workflow for  checking out an EPUB document from the Content Reserve system and  viewing it in the OverDrive Media Console is as follows:</p>
<ol>
<li>Create an Adobe ID.</li>
<li>Install <a href="http://www.adobe.com/products/digitaleditions/">Adobe Digital Editions</a> and activate the software with your Adobe ID.</li>
<li>Install OverDrive Media Console and activate the software with your Adobe ID.</li>
<li>Browse content at your library’s website and check out the desired EPUB title.</li>
<li>Download  the EPUB with the provided URL that initiates a connection to the  OverDrive Media Console to begin the download process.</li>
<li>Download the title to the OverDrive Media Console.</li>
<li>Open the title.</li>
</ol>
<p>While  quite the lengthy process every step has a very specific purpose. The  reason for the tight coupling between the OverDrive software and Adobe  is due to the fact that media downloaded through the Content Reserve  system is protected using the ADEPT DRM scheme.</p>
<p>Of  note to us is the fact that the OverDrive Media Console actually  downloads the EPUB document to the device for viewing in offline mode.  Additionally, a user is not require to authenticate with their Adobe ID  ever time they open a title in the OverDrive Media Console.</p>
<p><strong>ADEPT</strong></p>
<p>ADEPT  (Adobe Digital Experience Protection Technology) is a digital rights  management scheme developed by Adobe and OverDrive Inc. While there is  not much information publicly available concerning the technical  implementation the author of the <a href="http://i-u2665-cabbages.blogspot.com/2009/02/circumventing-adobe-adept-drm-for-epub.html">I♥CABBAGES</a> blog was able to successfully reverse engineer the functionality of the system in early 2009.</p>
<p>ADEPT  relies on the DRM and encryption layers as defined by the EPUB OCF  standard. Specifically the EPUB content is encrypted using the <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Advanced Encryption Standard</a> (AES) cipher operating in <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29">Cipher-Block Chaining</a> (CBC) mode with a per-book 128-bit cipher key and a randomized <a href="http://en.wikipedia.org/wiki/Initialization_vector">Initialization Vector</a> (IV). The stated AES cipher key is included in the distributed archive after being encrypted with a per-user <a href="http://en.wikipedia.org/wiki/Rsa">RSA</a> encryption key utilizing <a href="http://tools.ietf.org/html/rfc2313">PKCS #1 v1.5</a> padding.</p>
<p>When  an end user requests fulfillment of a title it is the job of the Adobe  Content Server to retrieve the user’s encryption credentials from the  ADEPT server and generate the rights.xml file to be included with the  EPUB title according to the specification.</p>
<p>As  noted by the author of the I♥CABBAGES blog the ADEPT system outlines a  very good encryption scheme for content protection. By including the RSA  encrypted AES cipher key as a part of the EPUB distributable itself the  rights management of the scheme and more appropriately the entirety of  the content protection scheme is effectively compromised.</p>
<p>In  our next article we will begin our analysis of the OverDrive Media  Console software itself and attempt to identify any available methods  for accessing the EPUB content and a process for stripping any relevant  DRM from the content.</p>
<p>[Thanks to Armin Tamzarian]<br />
<img src="https://lh4.googleusercontent.com/kvCM2VXnrBUdwl20d07qbuoSwxeN4oAEsG2pXkVaktY6CvgHn_KGExp1ePyhOUOR3IenAirfqIooKi_LOZzW2waJvmVVWe2yB3U5IhhRjBeTbVgWID0" alt="" width="80px;" height="15px;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2011/05/31/stripping-drm-overdrive-media-console-epubs-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Build &#8211; DIY Adjustable Mic Stand</title>
		<link>http://www.geek-republic.com/2011/04/12/quick-build-diy-adjustable-mic-stand/</link>
		<comments>http://www.geek-republic.com/2011/04/12/quick-build-diy-adjustable-mic-stand/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 13:32:26 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[adjustable]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[ikea]]></category>
		<category><![CDATA[instructables]]></category>
		<category><![CDATA[mic]]></category>
		<category><![CDATA[stand]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=2998</guid>
		<description><![CDATA[For a while now, I&#8217;ve been wanting to use an adjustable arm  to build a mic stand.  It wasn&#8217;t until Lifehacker posted a build from Ikea Hackers that I decided to go full bore.  The clincher was the fact that Lifehacker also posted a link to Instructables on how to build a suspension mount. The [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now, I&#8217;ve been wanting to use an adjustable arm  to build a mic stand.  It wasn&#8217;t until Lifehacker posted a <a href="http://lifehacker.com/#!5790102/make-an-adjustable-diy-mic-stand-out-of-an-ikea-lamp">build</a> from <a href="http://www.ikeahackers.net/2011/04/tertial-lamp-into-microphone-stand.html">Ikea Hackers</a> that I decided to go full bore.  The clincher was the fact that Lifehacker also posted a link to Instructables on <a href="http://www.instructables.com/id/Microphone-Suspension-Mount/">how to build a suspension mount.</a> The mounting is the reason I had not built one sooner, I just couldn&#8217;t figure out what to use to hold my <em>Rock Band</em> microphone in place.</p>
<p><a href="http://www.geek-republic.com/wp-content/uploads/2011/04/lamp.jpg"><img class="alignleft size-medium wp-image-2999" src="http://www.geek-republic.com/wp-content/uploads/2011/04/lamp-300x300.jpg" alt="" width="89" height="89" /></a>After some quick perusing at a local Goodwill, I was able to find a nice lamp for $5 ready for me to modify. It&#8217;s not quite the same as what the article shows.  There are no springs holding this in place, only clamps at the joints to limit movement.  However the price was right and it was coming home with me.  Once in the car I started to pull the lamp off the mounting to see what I would need to put the shockmount in place.  The lamp had a basic plastic shaft clamped in place.</p>
<p>My next  stop was my local hardware store, after all I would need to at least get a pvc coupler.  I chose a basic white 3&#8243; pvc coupler for $1.69.  Moving towards the Hillman section (Nuts and bolts for those with different suppliers, but Hillman is the best!) I set about trying to find a piece of threaded rod that was about the same size as the plastic shaft.  Bingo, 5/16&#8243; threaded rod at 2&#8243; in length is a perfect fit.  Added to this I purchased: 1 wing nut, 1 stop nut, 1 washer, and 1 lock washer.  My idea was to simply drill a hole in the pvc, put a stop nut on the inside along with a washer and then use a lock washer and wing nut on the outside to hold it in place.</p>
<p>Following the instructable, I cut four notches across the top and bottom of the pvc, and then following my own steps, I drilled a hold slightly off to the back of the pvc in between where two notches would be.  This way I could account for the weight of the microphone and for the path of the binders.  After the notches were set, I raided my fiancee&#8217;s drawer to steal 4 black hair binders and put them in place to make sure the depth of the notches was enough to hold them in place.  Success!  Nobody likes the white color of pvc, so I took the piece outside (now free of burrs and sitckers) and coated it with a nice black coat of H20 spray paint. (I find the product best for spraying on plastics.) This was probably the longest part of the build as the paint takes about an hour until it can be handled.</p>
<p><a href="http://www.geek-republic.com/wp-content/uploads/2011/04/IMG_20110411_2023441.jpg"><img class="alignleft size-medium wp-image-2996" src="http://www.geek-republic.com/wp-content/uploads/2011/04/IMG_20110411_2023441-225x300.jpg" alt="" width="225" height="300" /></a>Now for the results, the arm looks and works great.  I&#8217;ve placed it on a cheap riser I use for my monitors, and it seems to hold in place nicely.  I&#8217;m able to lower it and pull it out far enough to be able to sit comfortably while talking into the mic.  Now all I need is a mic cover to dampen breathing noises (I was told an athletic sock works perfectly and have tested it during the 20 Sides of Nerd podcast I was on.)  so I might have to make something that fits in with the arm, both space wise and color wise.</p>
<p>So what do you think?  This is a sub $8 adjustable mic stand fit for podcasters everywhere.  Also, it just happens to be Ikea free, but if you need to; Ikea has an adjustable lamp for $8 and Walmart Online has one for $14.  Best of all, I no longer need to lean really far in speak into the mic while it is taped to my desk lamp!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2011/04/12/quick-build-diy-adjustable-mic-stand/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick Links</title>
		<link>http://www.geek-republic.com/2011/02/14/quick-links-2/</link>
		<comments>http://www.geek-republic.com/2011/02/14/quick-links-2/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 20:13:21 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[hackaday]]></category>
		<category><![CDATA[quick links]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=2830</guid>
		<description><![CDATA[Here are just a few more quick links that you might enjoy: Need to conceal the door to your secret lair, or simply want to build a sweet light switch? Check out this Batman-inspired hidden light switch! Looking for a unique gift for that Nintendo fanboy (or girl) in your life? Check out this SNES [...]]]></description>
			<content:encoded><![CDATA[<p>Here are just a few more quick links that you might enjoy:</p>
<ul>
<li>Need to conceal the door to your secret lair, or simply want to build a sweet light switch?  Check out this <a href="http://hackaday.com/2011/02/14/batman-inspired-hidden-light-switch/">Batman-inspired hidden light switch</a>!</li>
<li>Looking for a unique gift for that Nintendo fanboy (or girl) in your life?  Check out this <a href="http://hackaday.com/2011/02/14/recordable-snes-belt-buckle/">SNES controller belt buckle</a> that can record and play back sound.</li>
<li>Did you forget it was Valentine&#8217;s Day?  Do you need a last minute gift? <a href="http://hackaday.com/2011/02/14/valentines-day-love-song-machine/">Compose a song for your loved one</a> over at Tellart&#8217;s web site, then send him/her the video of it being performed.  Who said I never gave you anything cool?</li>
</ul>
<p>Be sure to Digg &#8216;em if you like &#8216;em!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2011/02/14/quick-links-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two Quick Links</title>
		<link>http://www.geek-republic.com/2011/02/11/quick-links/</link>
		<comments>http://www.geek-republic.com/2011/02/11/quick-links/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 20:52:27 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Geeky Stuff]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[hackaday]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=2821</guid>
		<description><![CDATA[As most of you are likely not aware, I also write for Hack-a-Day. Today I posted two items that will likely interest a good portion of our audience. The first is an NES hack that allows for the system to &#8220;play itself&#8221; and use a speed-run script of sorts to beat Super Mario Brothers autonomously. [...]]]></description>
			<content:encoded><![CDATA[<p>As most of you are likely not aware, <a href="http://hackaday.com/author/mikenathanathackaday/">I also write for Hack-a-Day</a>. Today I posted two items that will likely interest a good portion of our audience.</p>
<p>The first is an <a href="http://hackaday.com/2011/02/11/nesbot-video-game-automation/">NES hack</a> that allows for the system to &#8220;play itself&#8221; and use a speed-run script of sorts to beat Super Mario Brothers autonomously.</p>
<p>The second is a video of a <a href="http://hackaday.com/2011/02/11/thermic-lance-made-from-spaghetti/">thermic lance made from spaghetti.</a> (Don&#8217;t worry about Googling to see what a thermic lance is, just click it)</p>
<p>That&#8217;s all, just a pair of time wasters to round out your Friday afternoon.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2011/02/11/quick-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nook, DRM, and You.</title>
		<link>http://www.geek-republic.com/2010/10/04/nook-drm-you/</link>
		<comments>http://www.geek-republic.com/2010/10/04/nook-drm-you/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 20:44:52 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[eBook]]></category>
		<category><![CDATA[Nook]]></category>

		<guid isPermaLink="false">http://www.geek-republic.com/?p=2246</guid>
		<description><![CDATA[OK, you hate DRM &#8211; Who doesn&#8217;t? Let&#8217;s say you purchased some books through Barnes and Noble, but you want to view them wherever you want &#8211; whenever you want, because technically you own them. If you are a terrible person who has just downloaded NOOKstudy and are using the free 7 day download pass [...]]]></description>
			<content:encoded><![CDATA[<p>OK, you hate DRM &#8211; Who doesn&#8217;t?</p>
<p>Let&#8217;s say you purchased some books through Barnes and Noble, but you want to view them wherever you want &#8211; whenever you want, because technically you own them.</p>
<p>If you are a terrible person who has just downloaded NOOKstudy and are using the free 7 day download pass to gorge yourself on books, I have neigh but contempt for you.</p>
<p>Either way here&#8217;s how you can strip off Barnes and Noble&#8217;s DRM to enjoy your literature however you please:<br />
<span id="more-2246"></span></p>
<h4>Required Software</h4>
<ul>
<li><strong>Python 2.7 32-bit Installer</strong> &#8211; <a href="http://python.org/download/releases/2.7/" target="_blank">http://python.org/download/releases/2.7/</a></li>
<li><strong>Nook Python Modules (Choose any one of the following)</strong></li>
<ul>
<li>MegaUpload &#8211; <a href="http://www.megaupload.com/?d=KA6RD5X3" target="_blank">http://www.megaupload.com/?d=KA6RD5X3</a></li>
<li>RapidShare &#8211; <a href="http://rapidshare.com/files/423130604/nook_key_retrieval.zip" target="_blank">http://rapidshare.com/files/423130604/nook_key_retrieval.zip</a></li>
<li>MediaFire &#8211; <a href="http://www.mediafire.com/?xd4ao9dizgwx78l" target="_blank">http://www.mediafire.com/?xd4ao9dizgwx78l</a></li>
</ul>
<li><strong>Pycrypto 2.1.0 Binaries</strong> &#8211; <a href="http://www.voidspace.org.uk/python/modules.shtml#pycrypto" target="_blank">http://www.voidspace.org.uk/python/modules.shtml#pycrypto</a></li>
</ul>
<h4>Process</h4>
<ol>
<li>Download and install Python, followed by Pycrypto.</li>
<p><br/></p>
<li>Create a folder on your computer somewhere in the root of the C:\ drive for the sake of simplicity, then extract the Nook Python Modules there.  My folder is located at C:\NookBooks.</li>
<p><br/></p>
<li>Copy your eBook to the folder you created in step 2.  Your eBooks can be found in your My Documents folder under the <strong>My Barnes &#038; Noble eBooks</strong> folder.</li>
<p><br/></p>
<li>Add the eBook to your NOOKstudy library through the <strong>Add File</strong> dialog.  Open the file for viewing.</li>
<p><br/></p>
<li>Once it has been opened, double-click the BNKeyretrieval.py file to run it &#8211; you should receive a message that the key has successfully been retrieved and written to a file named <strong>adeptkey.der</strong>.</li>
<p><br/></p>
<li>Double-click the ineptpdf2.pyw file.  In the program window, select the encrypted PDF you opened in NOOKstudy as the Input file, and then select your output file.  Be sure not to use the same name as the input file.</li>
<p><br/><br />
<a href="http://www.geek-republic.com/wp-content/uploads/2010/10/inept_pdf.jpg"><img src="http://www.geek-republic.com/wp-content/uploads/2010/10/inept_pdf.jpg" alt="Decrypting a DRM-Crippled Nook File" title="Inept PDF Decrypter" width="316" height="173" class="aligncenter size-full wp-image-2267" /></a><br />
<br/></p>
<li>Click Decrypt and wait a few minutes &#8211; the process can take quite a bit of time to complete, depending on the length of the book</li>
<p><br/></p>
<p>That&#8217;s it, now you can read your DRM-less eBooks anywhere you wish.  It is up to you to use this only on books you own.</p>
<p>As a side note, the key exported to adeptkey.der can be used to decrypt subsequent eBooks downloaded with your Nook account, so there is no need to obtain the key each time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2010/10/04/nook-drm-you/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Recover/Gain Administrator Credentials in Windows</title>
		<link>http://www.geek-republic.com/2010/04/19/recovergain-administrator-credentials-in-windows/</link>
		<comments>http://www.geek-republic.com/2010/04/19/recovergain-administrator-credentials-in-windows/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 20:56:20 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[pwn]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.teamhackaday.com/?p=58</guid>
		<description><![CDATA[Forum member RaZ0R put together a little tutorial to demonstrate how one would gain Administrator privileges on a Windows machine from within a limited user account. In a few easy to understand steps, you can go from a limited account to power user in minutes.  This can be helpful if your administrator profile happens to [...]]]></description>
			<content:encoded><![CDATA[<p>Forum member <a href="http://geek-republic.com/forum/memberlist.php?mode=viewprofile&amp;u=2879">RaZ0R</a> put<a href="http://geek-republic.com/forum/viewtopic.php?f=3&amp;t=3384&amp;start=0"> together a little tutorial to demonstrate how one would gain Administrator privileges on a Windows machine from within a limited user account</a>.</p>
<p>In a few easy to understand steps, you can go from a limited account to power user in minutes.  This can be helpful if your administrator profile happens to be come corrupted, or if you just need to quickly get administrator access, for whatever reason.</p>
<p>Obviously, use this on computers that you own, on which you are permitted to have administrator access!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2010/04/19/recovergain-administrator-credentials-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MyVu Personal Video Viewer Hacked to Allow Input From Any Video Device</title>
		<link>http://www.geek-republic.com/2008/08/19/myvu-personal-video-viewer-hacked-to-allow-input-from-any-video-device/</link>
		<comments>http://www.geek-republic.com/2008/08/19/myvu-personal-video-viewer-hacked-to-allow-input-from-any-video-device/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 15:03:32 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[myvu]]></category>

		<guid isPermaLink="false">http://www.teamhackaday.com/?p=40</guid>
		<description><![CDATA[For those of you unfamiliar with the MyVu Personal Video Device, it resembles a set of sunglasses with video screens and a pair of headphones built in.  It&#8217;s a great little product, but forum member RetroPlayer did not like the fact that his MyVu was tethered only to his iPod.  He decided he wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you unfamiliar with the MyVu Personal Video Device, it resembles a set of sunglasses with video screens and a pair of headphones built in.  It&#8217;s a great little product, but forum member RetroPlayer did not like the fact that his MyVu was tethered only to his iPod.  He decided he wanted to liberate the mini-theater to allow it the ability to connect to any video player with a standard CINCH/AV output, aka an &#8220;RCA Output&#8221;.</p>
<p>He poked around for a bit, then finally ended up calling MyVu in order to try talking to an engineer.  Surprisingly, he was put through to one, and the engineer was quite accommodating.  He gave RetroPlayer a ton of information, which helped him overcome some issues he was having.</p>
<p>The hack works well, but isn&#8217;t quite complete yet.  <a href="http://geek-republic.com/forum/viewtopic.php?f=2&amp;t=2955">RetroPlayer has posted schematics and all the details of his project</a>, but has stated that he will continue working on it, taking it from the breadboard to an actual adapter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geek-republic.com/2008/08/19/myvu-personal-video-viewer-hacked-to-allow-input-from-any-video-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

