how to detect AIP labelling in javascript?
William
25
Reputation points
hi, I need to, in Outlook web addin, tell whether a docx attachment is AIP labelled with encryption.
A few people on this website has asked this or similar question but got no reply, such as:
https://learn.microsoft.com/en-us/answers/questions/1663123/how-to-know-if-document-or-mail-configured-with-se (in the comment section)
In my limited test of a few files, they differ in the 44th bytes:
- for password protected only docx file, the 44th bytes is always "03"
- for AIP label with encryption, then the 44th bytes is always "04"
For example:
certutil -dump passwordYES_RMSNO.docx |more
0000 ...
5000
0000 d0 cf 11 e0 a1 b1 1a e1 00 00 00 00 00 00 00 00 ................
0010 00 00 00 00 00 00 00 00 3e 00 03 00 fe ff 09 00 ........>.......
0020 06 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 ................
certutil -dump passwordNO_RMSYES.docx |more
000000 ...
014e00
000000 d0 cf 11 e0 a1 b1 1a e1 00 00 00 00 00 00 00 00 ................
000010 00 00 00 00 00 00 00 00 3e 00 03 00 fe ff 09 00 ........>.......
000020 06 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 ................
BUT, the above is based on my test of only a few files of different contents, not sure if they are always true. Unless it has some reason?
Sign in to answer