User Tools

Site Tools


windowsdlls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windowsdlls [2009/05/05 07:39] – moved info to subpages megadiscmanwindowsdlls [2010/04/29 14:48] (current) megadiscman
Line 124: Line 124:
  
 </code> </code>
 +===== OpenMG Secure Module - Implementation Architecture =====
 +
 +* References: 
 +Sony Patent EP1 496 439 A1, Fig.6 there is a diagram illustrating the functional structure of the client.
 +
 +Note: Patent diagram says following:
 +
 +Security Module:
 +
 +[0047] A security module 53 performs processing relating
 +to data security, such as encryption of the modules.
 +A request for the security-related processing generated
 +in the modules is sent to the security module 53,
 +and the security module 53 performs encryption or the like
 +in response to the request.
 +
 +DRM Module:
 +
 +[0043] Fig. 6 shows an example of the functional
 +structure of the client 1. A DRM (Digital Right Management)
 +module 51 communicates the content, right data,
 +etc., or manages the right data.
 +
 +Comparision with the implementation:
 +
 +Playback module, write module, read module, lcm module all communicate directly to
 +the DRM module or Security Module. These modules would be OmgNetMD.dll, MemStick.dll, omgconv2.dll etc, they have connectors to pfcom/salwrap using DLL linkage.
 +
 +Modules in the plugin-layer at the top would communicate with these "Content using" modules. In the implementation
 +they never directly communicate with salwrap/pfcom. Plug-in modules uses these modules using COM.
 +There are tough, exceptions, a couple of functions can be used in pfcom trough COM. Its also possible to use SAL (salExec0) using COM (omgmisc.dll DLL link to salwrap.dll salExec0).
 +
 +<code>
 +.................................................................................................... + UI
 + SonicStage                                                              omgjukebox.exe
 +....................................................................................................
 + ^    ^
 + |    |
 + | COM    | COM
 + v    v
 +.................................................................................................... Plug-in layer (AVLib)
 +     + CheckOut +Playback     + PlayBack
 +     + CheckIn +Convert     + Convert
 + ---------------------     ------------------------ ------------------------
 +  NetMD.dll        |     | OpcOmg.dll   |          OpcWMA.dll      |
 + ---------------------    ------------------------     ------------------------
 + ---------------------
 +    NetMDAPI.dll
 + ---------------------
 + ---------------------
 +    NetMDUSB.dll
 + ---------------------
 +.................................................................................................... OpenMG
 +     ^
 +     | COM
 + DLL     v                 DLL
 +-----------------------     -----------------------    --------------------------------------------
 +    pfcom.dll       | <->     OmgNetMD.dll       <->  |    salwrap.dll
 +       |     -----------------------    |
 +       |    -----------------------     - EkbCapabilityTable
 + createInstanceForMp3 | <->     omgconv2.dll          <->  |  - OmgEkb
 +          |    -----------------------    |
 +       |    -----------------------     - salExec0
 +        | <->     MemStick.dll          <->  |      ----------------------
 +       |    -----------------------             SAL VM
 +                      |         ----------------------
 +-----------------------        --------------------------------------------
 + ^
 +        |
 + v
 +   +++++++++++++++++++++++++++++++++++++   +++++++++++++++++++++++++++++++  +++++++++++++++++++++++++++++++++++
 +   License repository/Management Area      song file storage section              icv.dat
 +                                                                                  maclist1.dat, maclist2.dat
 +    [License information]                   [header | music data ]                ekb\version.ekb
 +                                                                                  OMGKEY\salomgid.dat
 +    <OMGDIR>\procfile\                      <APPDATA DIR>\Sonicstage           OMGRIGHT\<value>.icv               
 +   +++++++++++++++++++++++++++++++++++++   +++++++++++++++++++++++++++++++  +++++++++++++++++++++++++++++++++++
 +
 +
 +.................................................................................................... Secure Applications
 + ------------------  ----------------- -------------------  ------------------  ------------------
 +   device.sal init.ocm    netmd.ocm icv.ocm      maclist.ocm             ...
 + ------------------  -----------------   -------------------  ------------------  ------------------
 +
 + -------------------
 +  SAL Runtime
 + -------------------
 +
 +....................................................................................................
 +</code>
 + 
 + 
  
 ===== The ocm-files ===== ===== The ocm-files =====
Line 131: Line 223:
   * [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/ocm.tgz]]   * [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/ocm.tgz]]
   * [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/dis-09-02-01.rar]] - latest version as of May, 2nd 2009   * [[http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/dis-09-02-01.rar]] - latest version as of May, 2nd 2009
 +
 +OCM handling code is stored in a private git repository (run using [[http://eagain.net/gitweb/?p=gitosis.git|gitosis]]). Access is only possible by ssh with public key authentication. To get access, your need to have your ssh public key (either a role-specific one or your standard personal key, doesn't matter) added into the list of authorized keys, just ask in the IRC channel. When your key is added, and you use a role-specific key, add something like this to your .ssh/config
 +
 +<code>
 +Hostname z6.physik.fu-berlin.de
 +    IdentityFile ~/.ssh/id-rsa-minidisc
 +</code>
 +
 +After that, you can clone the repo by using
 +<code>
 +git-clone gitosis@z6.physik.fu-berlin.de:/ocm
 +</code>
  
 The OCM files (except for init.ocm which contains an extra layer of packing) are interpreted as [[OCMBytecode]] The OCM files (except for init.ocm which contains an extra layer of packing) are interpreted as [[OCMBytecode]]
  
-Here is a decode for native code blocks from OCM files. It is severe works-for-me-quality, having at least the following issues:+Here is a decoder for native code blocks from OCM files. It is severe works-for-me-quality, having at least the following issues:
   * It does not name imports from salwrap, it just puts offsets into the import table into a generic name. Check here for some name [[OCMSalwrapExports]]   * It does not name imports from salwrap, it just puts offsets into the import table into a generic name. Check here for some name [[OCMSalwrapExports]]
   * It is unable to parse named exports   * It is unable to parse named exports
Line 141: Line 245:
 The output of the program is an assembler source file (completely unreadable) that is intended to be compiled by the GNU assembler (Win32 port or cross-assembler in linux) and then loaded into a good disassembler, like IDA 4.9 Freeware for example. The output of the program is an assembler source file (completely unreadable) that is intended to be compiled by the GNU assembler (Win32 port or cross-assembler in linux) and then loaded into a good disassembler, like IDA 4.9 Freeware for example.
  
-[[codeblockparser]]+[[codeblockparser]] (the format of the codeblocks is in [[codeblockformat]])
  
 Some info about analysing an OCM file can be found in this part of chat log: Some info about analysing an OCM file can be found in this part of chat log:
Line 151: Line 255:
   * Netmd.ocm: [[netmdocm]]   * Netmd.ocm: [[netmdocm]]
   * Device.sal: [[devicesal]]   * Device.sal: [[devicesal]]
 +  * Trkinf: [[trkinfocm]]
 +
 +===== Links =====
  
 +  * [[http://newgre.net/antire]] - Anti-Reverse Engineering Techniques in DRM Code
windowsdlls.1241509186.txt.gz · Last modified: 2009/05/05 07:39 by megadiscman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki