Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. PE File Format (Document is now Office 2007)

PE File Format (Document is now Office 2007)

Scheduled Pinned Locked Moved The Lounge
com
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeffrey Walton
    wrote on last edited by
    #1

    It seems Microsoft is pushing developers to the Office 2007 document format. The Microsoft Portable Executable and Common Object File Format Specification[^], which was updated in the end of March, is now sporting a *.docx extension.

    S J M 3 Replies Last reply
    0
    • J Jeffrey Walton

      It seems Microsoft is pushing developers to the Office 2007 document format. The Microsoft Portable Executable and Common Object File Format Specification[^], which was updated in the end of March, is now sporting a *.docx extension.

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Heh. Whenever i find spec documents online in Word format (or any other word-processor format...) my first thought is, "can't make the HTML converter work either, eh?" :rolleyes:

      Citizen 20.1.01

      'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

      1 Reply Last reply
      0
      • J Jeffrey Walton

        It seems Microsoft is pushing developers to the Office 2007 document format. The Microsoft Portable Executable and Common Object File Format Specification[^], which was updated in the end of March, is now sporting a *.docx extension.

        J Offline
        J Offline
        Jorgen Sigvardsson
        wrote on last edited by
        #3

        Yeah, I read through it last week. Due to (idiotic) security settings on a code signing server, I couldn't verify signed files using signtool.exe. The real pain was that I didn't even need to know if the signature was valid or not, I only needed to know whether it was present or it. Mailing the admininstrator about it didn't help - I never even got a response! Bloody bastard operator from hell... So I read through the spec, and started writing a tool for checking signatures. After a while, I learned something very valuable (again): always read the entire spec first before you implement anything. As I was working my way towards the signature, I found a reference to the Imagehlp function library. My 3 hours of work was shot to pieces by the paraphrase "instead of writing your own shitty code to investigate signatures and certificates in PE files, you can use the function ImageEnumerateCertificates()". :doh:

        -- Kein Mitleid Für Die Mehrheit

        J 1 Reply Last reply
        0
        • J Jorgen Sigvardsson

          Yeah, I read through it last week. Due to (idiotic) security settings on a code signing server, I couldn't verify signed files using signtool.exe. The real pain was that I didn't even need to know if the signature was valid or not, I only needed to know whether it was present or it. Mailing the admininstrator about it didn't help - I never even got a response! Bloody bastard operator from hell... So I read through the spec, and started writing a tool for checking signatures. After a while, I learned something very valuable (again): always read the entire spec first before you implement anything. As I was working my way towards the signature, I found a reference to the Imagehlp function library. My 3 hours of work was shot to pieces by the paraphrase "instead of writing your own shitty code to investigate signatures and certificates in PE files, you can use the function ImageEnumerateCertificates()". :doh:

          -- Kein Mitleid Für Die Mehrheit

          J Offline
          J Offline
          Jeffrey Walton
          wrote on last edited by
          #4

          Hi Jörgen,

          Jörgen Sigvardsson wrote:

          Due to (idiotic) security settings on a code signing server

          Can you forward me a URL (noloader, gmail)? I'd like to take a look. I've written certicate parsers. I've found the worst to be some early Slovakian certicates (this even considers the mess that certificate profiles have caused).

          Jörgen Sigvardsson wrote:

          Mailing the admininstrator about it didn't help - I never even got a response!

          Sounds like service I'd expect from Symantec or Adobe.

          Jörgen Sigvardsson wrote:

          I found a reference to the Imagehlp function library.

          There are lots of goodies in there. I find I use it to cross check a lot of my stuff.

          Jörgen Sigvardsson wrote:

          use the function ImageEnumerateCertificates

          If you are looking for a signature on the PE (without the X.509 overhead), there is an easier solution: latch on to the public key's OID through byte scanning the Certificate (located in the .security section), and then parse the key. Create the signature as specified in the PE specification. Finally, verify the signature. It's a nice exercise in PE parsing and basic crypto without the walking of a certifcate chain. Jeff

          J 1 Reply Last reply
          0
          • J Jeffrey Walton

            Hi Jörgen,

            Jörgen Sigvardsson wrote:

            Due to (idiotic) security settings on a code signing server

            Can you forward me a URL (noloader, gmail)? I'd like to take a look. I've written certicate parsers. I've found the worst to be some early Slovakian certicates (this even considers the mess that certificate profiles have caused).

            Jörgen Sigvardsson wrote:

            Mailing the admininstrator about it didn't help - I never even got a response!

            Sounds like service I'd expect from Symantec or Adobe.

            Jörgen Sigvardsson wrote:

            I found a reference to the Imagehlp function library.

            There are lots of goodies in there. I find I use it to cross check a lot of my stuff.

            Jörgen Sigvardsson wrote:

            use the function ImageEnumerateCertificates

            If you are looking for a signature on the PE (without the X.509 overhead), there is an easier solution: latch on to the public key's OID through byte scanning the Certificate (located in the .security section), and then parse the key. Create the signature as specified in the PE specification. Finally, verify the signature. It's a nice exercise in PE parsing and basic crypto without the walking of a certifcate chain. Jeff

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #5

            Jeffrey Walton wrote:

            Can you forward me a URL (noloader, gmail)? I'd like to take a look. I've written certicate parsers. I've found the worst to be some early Slovakian certicates (this even considers the mess that certificate profiles have caused).

            The certificates were Microsoft's own, more specifically C:\Windows\Microsoft.Net\Framework\NETFXSBS10.exe (that's the reference file I used). If I right click a file, choose properties, and select the digital signatures tab, there's no problem. It's when I use signtool (on this particular Windows 2003 machine), it freaks out. I can't remember the configuration error, but it was apparently a common problem for people. I think it was some kind of trust parameter.

            Jeffrey Walton wrote:

            Sounds like service I'd expect from Symantec or Adobe.

            We're talking people from within my own organisation...

            -- Kein Mitleid Für Die Mehrheit

            1 Reply Last reply
            0
            • J Jeffrey Walton

              It seems Microsoft is pushing developers to the Office 2007 document format. The Microsoft Portable Executable and Common Object File Format Specification[^], which was updated in the end of March, is now sporting a *.docx extension.

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              That's Microsoft's normal MO, they assume every developer will jump to the next version of C++/C#/Office/Whatever the instant it ships.

              --Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups