http:// presentation on on def con nine, july 13 th - 15 th, 2001 alexis park in las vegas, nevada...

20
http://www. elcomsoft .com esentation on on DEF CON Nine, July 13 th - 15 th , 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Upload: briana-weaver

Post on 18-Dec-2015

220 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

http://www.elcomsoft.com

Presentation on on DEF CON Nine, July 13th - 15th, 2001 Alexis Park in Las Vegas, Nevada USA

eBooks security - theory and practice

Page 2: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

eBooks security - theory and practiceeBooks security - theory and practice

1. Foreword1. Foreword

2. PDF encryption2. PDF encryption

3. Standard security handler3. Standard security handler

4. Rot13 handler4. Rot13 handler

5. FileOpen handler5. FileOpen handler

6. SoftLock handler6. SoftLock handler

7. Adobe Web Buy handler (PDF Merchant)7. Adobe Web Buy handler (PDF Merchant)

8. Acrobat eBook Reader EBX handler (formerly GlassBook)8. Acrobat eBook Reader EBX handler (formerly GlassBook)

http://www.elcomsoft.com

9. Arbitrary handler (obtaining encryption key from PDF viewer)9. Arbitrary handler (obtaining encryption key from PDF viewer)

10. Security flaw in Acrobat plug-ins certification10. Security flaw in Acrobat plug-ins certification

Page 3: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Advantages:

Lower overhead publication and distribution costAbility of instant worldwide distribution over the internetMany books in little physical volumeAbility to search, highlight, underline, add annotations, bookmarksHyperlinks

Advantages:

Lower overhead publication and distribution costAbility of instant worldwide distribution over the internetMany books in little physical volumeAbility to search, highlight, underline, add annotations, bookmarksHyperlinks

Disadvantages:

Formats incompatibility Information in electronic form could be duplicated and transmitted, and there is no reliable way to take control over that processes.

Disadvantages:

Formats incompatibility Information in electronic form could be duplicated and transmitted, and there is no reliable way to take control over that processes.

http://www.elcomsoft.com

Electronic PublishingElectronic Publishing

Page 4: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Electronic Publishing/Reading SolutionsElectronic Publishing/Reading Solutions

Software eBook Compilers/Readers

Activ E-BookE-Publisher GoldeBook Pro CompilerHTML2EXEE-Book Publishing WizardeBook Generator Infinite Press PublisherWinEbook...

Software eBook Compilers/Readers

Activ E-BookE-Publisher GoldeBook Pro CompilerHTML2EXEE-Book Publishing WizardeBook Generator Infinite Press PublisherWinEbook...

Dedicated reading devices

RocketBookeBookMan Reader

Dedicated reading devices

RocketBookeBookMan Reader

Related Internet resources:http://www.ebookcompilers.com/

Related Internet resources:http://www.ebookcompilers.com/

http://www.elcomsoft.com

Software eBook leaders

Adobe Acrobat PDFMicrosoft Reader LIT

Software eBook leaders

Adobe Acrobat PDFMicrosoft Reader LIT

Page 5: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

eBook Pro compilereBook Pro compiler

Short description (taken from www.ebookpro.com)

"eBook Pro", the only software in the universe that makes your information virtually 100% burglarproof! It comes with a lifetime, money-back guarantee

"At Last, You Can Sell Information Online (And Make Thousands Of Sales Per Day) - Without The Danger Of Having Your Information Stolen And Resold By Others»

Short description (taken from www.ebookpro.com)

"eBook Pro", the only software in the universe that makes your information virtually 100% burglarproof! It comes with a lifetime, money-back guarantee

"At Last, You Can Sell Information Online (And Make Thousands Of Sales Per Day) - Without The Danger Of Having Your Information Stolen And Resold By Others»

http://www.elcomsoft.com

Related Internet resources:http://www.ebookpro.com/

Related Internet resources:http://www.ebookpro.com/

Actual features

All HTML pages and supplementary files are compressed with deflate algorithm from ZLIB

Compressed data are encrypted by XOR-ing each byte with every byte of the string “encrypted”, which is the same as XOR with constant byte

Actual features

All HTML pages and supplementary files are compressed with deflate algorithm from ZLIB

Compressed data are encrypted by XOR-ing each byte with every byte of the string “encrypted”, which is the same as XOR with constant byte

Page 6: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

PDF file structurePDF file structure

http://www.elcomsoft.com

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Basic data types ExampleBoolean trueNumeric 3.1415926Object reference 23 0 RName /ProcSetString (Contents) *Stream {binary data} ** - data could be encrypted

Basic data types ExampleBoolean trueNumeric 3.1415926Object reference 23 0 RName /ProcSetString (Contents) *Stream {binary data} ** - data could be encrypted

<PDF file> ::= <header> <body> <cross-reference table> <trailer><body> ::= <object> {<object>}<object> :: <objectID> (<data> | <stream dictionary> <stream>)

<PDF file> ::= <header> <body> <cross-reference table> <trailer><body> ::= <object> {<object>}<object> :: <objectID> (<data> | <stream dictionary> <stream>)

Complex data types ExampleArray [23 0 R /XYZ null]Dictionary <</Name1 (Val1) /Name2 /Val2>>

Complex data types ExampleArray [23 0 R /XYZ null]Dictionary <</Name1 (Val1) /Name2 /Val2>>

Page 7: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

PDF file encryptionPDF file encryption

PDF Document

<Encrypted Content>

<<Encryption Dictionary>>

Contains security handler name and supplementary information necessary to obtain encryption key

PDF Document

<Encrypted Content>

<<Encryption Dictionary>>

Contains security handler name and supplementary information necessary to obtain encryption key

http://www.elcomsoft.com

Security handler

Takes information from Encryption Dictionary, calculates document encryption key and passes it to PDF Viewer

Security handler

Takes information from Encryption Dictionary, calculates document encryption key and passes it to PDF Viewer

PDF Viewer

Takes document encryption key, decrypts PDF document and display it on the screen

PDF Viewer

Takes document encryption key, decrypts PDF document and display it on the screenScreenScreen

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Page 8: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Object encryption key calculationObject encryption key calculation

Document encryption keyDocument encryption key

http://www.elcomsoft.com

Object ID + GenerationObject ID + Generation

MD5HASH

algorithm

MD5HASH

algorithmObject encryption keyObject encryption key

Document encryption keyDocument encryption key

ScrambledObject ID + Generation

ScrambledObject ID + Generation

MD5HASH

algorithm

MD5HASH

algorithmObject encryption keyObject encryption key

‘sAlT’ string‘sAlT’ string

Algorithm ver.1,2

Algorithm ver.3

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Page 9: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Standard security handlerStandard security handler

Two passwords are supported:User (open) password – to open the document (with some restriction)Owner (security) password – to change security settingsKnowing either password is sufficient to decrypt the document

Two passwords are supported:User (open) password – to open the document (with some restriction)Owner (security) password – to change security settingsKnowing either password is sufficient to decrypt the document

http://www.elcomsoft.com

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Modifying the document’s contentsCopying text and graphics from the documentAdding or modifying text annotations and interactive form fieldsPrinting the document

Modifying the document’s contentsCopying text and graphics from the documentAdding or modifying text annotations and interactive form fieldsPrinting the document

New User password restriction, introduced in Acrobat 5:

Form fill-in and sign documentText inspection and accessibilityPage insertion, rotation,and deletion. Creation of bookmarks and thumbnailsLow-quality printing only

Form fill-in and sign documentText inspection and accessibilityPage insertion, rotation,and deletion. Creation of bookmarks and thumbnailsLow-quality printing only

Possible restrictions, when opened with User password:

Page 10: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

PCs \ total HDD 0 GB 128 GB 256 GB 384 GB 512 GB

1 960 hr 480 hr 240 hr 120 hr 60 hr

2 480 hr 240 hr 120 hr 60 hr 30 hr

3 320 hr 160 hr 80 hr 40 hr 20 hr

4 240 hr 120 hr 60 hr 30 hr 15 hr

Standard security handlerStandard security handler

http://www.elcomsoft.com

Related Internet resources:http://www.elcomsoft.com/apdfpr.html

Related Internet resources:http://www.elcomsoft.com/apdfpr.html

Time necessary for complete key enumeration (40 bits key) on PIII-450

Handler type \ Password type User Owner

Standard security handler 2 190,0001MD5 + 1RC4

100,0002MD5 + 2RC4

Standard security handler 3 3,25051MD5 + 20RC4

1,610102MD5 + 40RC4

Passwords per second on 450MHz Pentium III

Page 11: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Rot13 security handlerRot13 security handler

Short description

Used by New Paradigm Resource Group (www.nprg.com)Protected documents costs about $3000 per copyRequires hardware dongle to operate

Short description

Used by New Paradigm Resource Group (www.nprg.com)Protected documents costs about $3000 per copyRequires hardware dongle to operate

http://www.elcomsoft.com

Related Internet resources:http://www.nprg.com/

Related Internet resources:http://www.nprg.com/

Actual features

Clone of the “Rot13” sample plug-in, which supplied with Acrobat 4 SDKUses fixed encryption key for all documentsKey could be easily found as text string in the body of plug-in

Actual features

Clone of the “Rot13” sample plug-in, which supplied with Acrobat 4 SDKUses fixed encryption key for all documentsKey could be easily found as text string in the body of plug-in

Page 12: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

FileOpen security handlerFileOpen security handler

Short description (taken from www.fileopen.com)

Developed by FileOpen SystemsSupports pass-along prevention, document expiration, and controlled printing Adobe Selects FileOpen to Be An Acrobat 5 Security PartnerPublisher’s license costs $2500FileOpen and Acrobat 5.0 provide a complete, secure e-publishing solution

Short description (taken from www.fileopen.com)

Developed by FileOpen SystemsSupports pass-along prevention, document expiration, and controlled printing Adobe Selects FileOpen to Be An Acrobat 5 Security PartnerPublisher’s license costs $2500FileOpen and Acrobat 5.0 provide a complete, secure e-publishing solution

http://www.elcomsoft.com

Related Internet resources:http://www.fileopen.com/

Related Internet resources:http://www.fileopen.com/

Actual features

FileOpen Publisher 2.3 encrypts ALL documents with one fixed keyFileOpen Publisher 2.4 uses variant keys, but encrypted document itself contains all necessary information to instantly calculate encryption key

Actual features

FileOpen Publisher 2.3 encrypts ALL documents with one fixed keyFileOpen Publisher 2.4 uses variant keys, but encrypted document itself contains all necessary information to instantly calculate encryption key

Page 13: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

SoftLock security handlerSoftLock security handler

Short description

Developed by SoftLock Services, Inc. (www.softlock.com)Calculates unique SoftlockID Number based on HDD volume IDRequires password which matches SoftlockID to open the documentPassword is used in document key calculation

Short description

Developed by SoftLock Services, Inc. (www.softlock.com)Calculates unique SoftlockID Number based on HDD volume IDRequires password which matches SoftlockID to open the documentPassword is used in document key calculation

http://www.elcomsoft.com

Related Internet resources:http://www.softlock.com/

Related Internet resources:http://www.softlock.com/

Actual features

Unlocking password is exactly 8 charactersEach character converted to one hexadecimal digitTwo characters are used for integrity checkingEffective password length is only 24 bitsCorrect password could be found by calling not optimized checking routine in 30 hours on 450 MHz CPU

Actual features

Unlocking password is exactly 8 charactersEach character converted to one hexadecimal digitTwo characters are used for integrity checkingEffective password length is only 24 bitsCorrect password could be found by calling not optimized checking routine in 30 hours on 450 MHz CPU

Page 14: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Adobe WebBuy (PDF Merchant)Adobe WebBuy (PDF Merchant)

Short description

License (.RMF file) is required to open the documentLicense consist of:

•Signed certificate with Publisher’s RSA Public key•One or more pairs of some ID (like CPU ID, USER ID, UTC, …) and encrypted document key, associated with that ID. Different pairs are combined with “AND” and “OR” operators•Document permissions•Data to check license validity

Two RSA Public keys owned by Adobe (1024 bit and 912 bit in length) are involved in license verification and document key calculationIt is impossible to generate valid certificate without having access to RSA Private keys, owned by AdobeIt is possible to calculate document key and decrypt the document if both PDF and matching RMF file are available

Short description

License (.RMF file) is required to open the documentLicense consist of:

•Signed certificate with Publisher’s RSA Public key•One or more pairs of some ID (like CPU ID, USER ID, UTC, …) and encrypted document key, associated with that ID. Different pairs are combined with “AND” and “OR” operators•Document permissions•Data to check license validity

Two RSA Public keys owned by Adobe (1024 bit and 912 bit in length) are involved in license verification and document key calculationIt is impossible to generate valid certificate without having access to RSA Private keys, owned by AdobeIt is possible to calculate document key and decrypt the document if both PDF and matching RMF file are available

http://www.elcomsoft.com

Related Internet resources:http://pdfmerchant.adobe.com/

Related Internet resources:http://pdfmerchant.adobe.com/

Page 15: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Adobe’s Acrobat eBookReader (formerly GlassBook)Adobe’s Acrobat eBookReader (formerly GlassBook)

Short description

Implements Electronic Book Exchange (EBX) protocolRSA keys pair is generated during activationPublic key is registered on content server, while Private is retained by ReaderDocument key encrypted by Public key and stored in VoucherVoucher contains information about document permissions, expiration, …Voucher is signed with HMAC protocol

Short description

Implements Electronic Book Exchange (EBX) protocolRSA keys pair is generated during activationPublic key is registered on content server, while Private is retained by ReaderDocument key encrypted by Public key and stored in VoucherVoucher contains information about document permissions, expiration, …Voucher is signed with HMAC protocol

http://www.elcomsoft.com

Related Internet resources:http://www.ebxwg.org/

http://www.adobe.com/products/contentserver/main.html

Related Internet resources:http://www.ebxwg.org/

http://www.adobe.com/products/contentserver/main.html

Brief analysis

Voucher could not be falsified without knowing the Document keyDocument key could not be calculated without knowing the Private keyPrivate key is stored somewhere on local computerAfter obtaining the Document key it is very easy to create Voucher with any permissions and for any computer

Brief analysis

Voucher could not be falsified without knowing the Document keyDocument key could not be calculated without knowing the Private keyPrivate key is stored somewhere on local computerAfter obtaining the Document key it is very easy to create Voucher with any permissions and for any computer

Page 16: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Adobe’s Acrobat eBookReader (formerly GlassBook)Adobe’s Acrobat eBookReader (formerly GlassBook)

http://www.elcomsoft.com

Related Internet resources:http://www.adobe.com/products/contentserver/main.html

Related Internet resources:http://www.adobe.com/products/contentserver/main.html

Interim key calculationfrom hardware IDs

CPU ID+Volume ID

CPU ID+Volume ID SHA1SHA1

mor.dat filemor.dat file

son.dat fileson.dat file

VoucherVoucher

RC5Decrypt

RC5Decrypt

RSADecrypt

RSADecrypt

PrivateRSA key

PrivateRSA key

Documentkey

Documentkey

Interimkey

Interimkey

Interimkey

Interimkey

RC5Decrypt

RC5Decrypt

Fixedkey

Fixedkey

Interimkey

Interimkey

Interim key calculationfrom hidden copy

Document key calculation

Page 17: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Object encryption key calculationObject encryption key calculation

Document encryption keyDocument encryption key

http://www.elcomsoft.com

Object ID + GenerationObject ID + Generation

MD5HASH

algorithm

MD5HASH

algorithmObject encryption keyObject encryption key

Document encryption keyDocument encryption key

ScrambledObject ID + Generation

ScrambledObject ID + Generation

MD5HASH

algorithm

MD5HASH

algorithmObject encryption keyObject encryption key

‘sAlT’ string‘sAlT’ string

Algorithm ver.1,2

Algorithm ver.3

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Related Internet resources:http://www.adobe.com/products/acrobat/adobepdf.html

Page 18: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Application name Code encryption Debugger detection

Code integrity checking

Acrobat 4 No No No

Acrobat 5 No In DocBox plug-in No

eBook Reader PACE InterLok PACE InterLok No

Obtaining encryption key from PDF viewerObtaining encryption key from PDF viewer

http://www.elcomsoft.com

MD5_Update function resides not far from MD5_Init function, which uses constants 0x67452301, 0xEFCDAB89, 0x98BADCFE and 0x10325476MD5_Update often called just after call to MD5_Init functionMD5_Update or some function called from MD5_Update uses 64 constants defined in MD5 specification

MD5_Update function resides not far from MD5_Init function, which uses constants 0x67452301, 0xEFCDAB89, 0x98BADCFE and 0x10325476MD5_Update often called just after call to MD5_Init functionMD5_Update or some function called from MD5_Update uses 64 constants defined in MD5 specification

Anti reverse-engineering measures in PDF viewers

How to find code of MD5 functions

Page 19: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

Security flaw Acrobat plug-ins certification mechanismSecurity flaw Acrobat plug-ins certification mechanism

http://www.elcomsoft.com

Sign Reader Integration Key License Agreement with AdobePay $100 to obtain Reader Certification digital certificate from AdobeUse this certificate to Reader-certify any plug-in

Sign Reader Integration Key License Agreement with AdobePay $100 to obtain Reader Certification digital certificate from AdobeUse this certificate to Reader-certify any plug-in

Only certified plug-ins will be loaded by Acrobat ReaderIn some cases (e.g. when opening document protected with WebBuy or DocBox) only plug-ins certified by Adobe are permitted to be loaded

Only certified plug-ins will be loaded by Acrobat ReaderIn some cases (e.g. when opening document protected with WebBuy or DocBox) only plug-ins certified by Adobe are permitted to be loaded

How to certify plug-in

Why to certify plug-in

Only data from PE Header is used for checkingOnly data from PE Header is used for checking

How certificate validity is checked

Modify code of any plug-in certified by Adobe to load non-certified plug-in and pass control to it. Take care to not modify data in PE header

Modify code of any plug-in certified by Adobe to load non-certified plug-in and pass control to it. Take care to not modify data in PE header

How to bypass plug-ins certificate checking

Page 20: Http:// Presentation on on DEF CON Nine, July 13 th - 15 th, 2001 Alexis Park in Las Vegas, Nevada USA eBooks security - theory and practice

http://www.elcomsoft.com

Presentation on on DEF CON Nine, July 13th - 15th, 2001 Alexis Park in Las Vegas, Nevada USA

eBooks security - theory and practice