windows 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917
  1. #------------------------------------------------------------------------------
  2. # $File: windows,v 1.67 2024/11/09 22:43:01 christos Exp $
  3. # windows: file(1) magic for Microsoft Windows
  4. #
  5. # This file is mainly reserved for files where programs
  6. # using them are run almost always on MS Windows 3.x or
  7. # above, or files only used exclusively in Windows OS,
  8. # where there is no better category to allocate for.
  9. # For example, even though WinZIP almost run on Windows
  10. # only, it is better to treat them as "archive" instead.
  11. # For format usable in DOS, such as generic executable
  12. # format, please specify under "msdos" file.
  13. #
  14. # Summary: Outlook Express DBX file
  15. # Created by: Christophe Monniez
  16. # Update: Joerg Jenderek
  17. # URL: http://fileformats.archiveteam.org/wiki/Outlook_Express_Database
  18. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/dbx.trid.xml
  19. # https://sourceforge.net/projects/ol2mbox/files/LibDBX/
  20. # v1.0.4/libdbx_1.0.4.tar.gz/FILE-FORMAT
  21. # Note: called "Outlook Express Database" by TrID and DROID via PUID fmt/838 fmt/839
  22. # and partly verified by `undbx --verbosity 4 Posteingang.dbx`
  23. 0 string \xCF\xAD\x12\xFE
  24. # skip DROID fmt-838-signature-id-1193.dbx fmt-839-signature-id-1194.dbx by check for valid file size
  25. >0x7C ulelong >0 MS Outlook Express DBX file
  26. #!:mime application/octet-stream
  27. #!:mime application/vnd.ms-outlook
  28. !:mime application/x-ms-dbx
  29. !:ext dbx
  30. >>4 byte =0xC5 \b, message database
  31. >>4 byte =0xC6 \b, folder database
  32. >>4 byte =0xC7 \b, account information
  33. >>4 byte =0x30 \b, offline database
  34. # version like: 5.2 5.5 (typical)
  35. >>20 ulequad !0x0000000500000005 \b, version
  36. # major version
  37. >>>24 ulelong x %u
  38. # minor version
  39. >>>20 ulelong x \b.%u
  40. # CLSID: 6F74FDC5-E366-11d1-9A4E-00C04FA309D4~Message 6F74FDC6-E366-11D1-9A4E-00C04FA309D4~Folder
  41. # 26FE9D30-1A8F-11D2-AABF-006097D474C4~offline
  42. #>>4 guid x \b, CLSID %s
  43. # file size; total size of file; sometimes real size a little bit higher
  44. >>0x7C ulelong x \b, ~ %u bytes
  45. # highest Email ID; the next email will have a number one higher than this
  46. >>0x5c ulelong x \b, highest ID %#x
  47. # item count; number of items stored in this DBX file
  48. >>0xC4 ulelong x \b, %u item
  49. # plural s
  50. >>0xC4 ulelong !1 \bs
  51. # index pointer; file offset pointing to a page of Data Indexes
  52. >>0xE4 ulelong >0 \b, index pointer %#x
  53. # From: Joerg Jenderek
  54. # URL: http://fileformats.archiveteam.org/wiki/Nickfile
  55. # https://www.nirsoft.net/utils/outlook_nk2_edit.html
  56. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/n/nk2.trid.xml
  57. # https://github.com/libyal/libnk2/blob/main/documentation
  58. # Nickfile%20(NK2)%20format.asciidoc
  59. # Note: called "Outlook Nickfile" by TrID & TestDisk and
  60. # "Outlook Nickname File" by Microsoft Outlook and
  61. # "Outlook AutoComplete File" by Nirsoft NK2Edit
  62. # partly verfied by NK2Edit Raw Text Edit Mode
  63. 0 ubelong 0x0DF0ADBA MS Outlook Nickfile
  64. #!:mime application/octet-stream
  65. #!:mime application/vnd.ms-outlook
  66. !:mime application/x-ms-nickfile
  67. !:ext nk2/dat/bak
  68. # nick is used by "older" Outlook; dat is used by "newer" Outlook (probably 2010 - 2016); bak is used for backup
  69. #!:ext nick/nk2/dat/bak
  70. # Unknown; probably a version indicator like: 0000000Ah 0000000Ch
  71. >4 ulelong x \b, probably version %u
  72. # Unknown2; probably a version indicator like: 1 0
  73. >8 ulelong x \b.%u
  74. # number of rows (nickname or alias items) in file
  75. >12 ulelong x \b, %u items
  76. # number of item entries/columns/properties value like: 17h
  77. >16 ulelong x \b, %u entries
  78. # value type/property tag: 001Fh~4 bytes for data size of UTF-16 LE string
  79. >20 uleshort x \b, value type %#4.4x
  80. # entry type/property identifier: 6001h~PR_DOTSTUFF_STATE/PR_NICK_NAME_W
  81. >22 uleshort x \b, entry type %#4.4x
  82. # Reserved like: 0013FD90h
  83. #>24 ulelong x \b, reserved %#8.8x
  84. # value data array/Irrelevant Union like: 0000000004E31A80h
  85. #>28 ulequad x \b, data %#16.16llx
  86. # UTF-16
  87. >20 uleshort =0x001F
  88. # unicode string bytes like: 2Ch
  89. >>36 ulelong x \b, %u bytes
  90. # unicode string value PT_UNICODE like: janesmith@contoso.org
  91. >>40 lestring16 x "%s"
  92. # Summary: Windows crash dump
  93. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  94. # https://web.archive.org/web/20101125060849/https://computer.forensikblog.de/en/2008/02/64bit_magic.html
  95. # Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
  96. # Modified by (2): Joerg Jenderek (addtional fields, extension, URL)
  97. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/dmp.trid.xml
  98. # https://gitlab.com/qemu-project/qemu/-/blob/master/include/qemu/win_dump_defs.h
  99. # Note: called "Windows memory dump" by TrID
  100. # and verified by like Windows Kit `Dumpchk.exe 043022-18703-01.dmp`
  101. # and partly by NirSoft `BlueScreenView.exe 043022-18703-01.dmp`
  102. # char Signature[4]
  103. 0 string PAGE
  104. # char ValidDump[4]
  105. >4 string DUMP MS Windows 32bit crash dump
  106. #!:mime application/octet-stream
  107. !:mime application/x-ms-dmp
  108. # like: Mini111013-01.dmp
  109. !:ext dmp
  110. # major version like: 15
  111. >>8 ulelong x \b, version %u
  112. # minor version like: 2600
  113. >>12 ulelong x \b.%u
  114. # DirectoryTableBase like: 709000
  115. #>>16 ulelong x \b, DirectoryTableBase %#x
  116. # PfnDatabase like: 805620c8
  117. #>>20 ulelong x \b, PfnDatabase %#x
  118. # PsLoadedModuleList like: 8055d720
  119. #>>24 ulelong x \b, PsLoadedModuleList %#x
  120. # PsActiveProcessHead like:805638b8
  121. #>>28 ulelong x \b, PsActiveProcessHead %#x
  122. # MachineImageType like: 14c (intel x86)
  123. >>32 ulelong !0x14c \b, MachineImageType %#x
  124. # NumberProcessors like: 2
  125. >>36 ulelong x \b, %u processors
  126. # BugcheckCode like: e2
  127. #>>40 ulelong x \b, BugcheckCode %#x
  128. # BugcheckParameter1 like: 0
  129. #>>44 ulelong x \b, BugcheckParameter1 %#x
  130. # BugcheckParameter2 like: 0
  131. #>>48 ulelong x \b, BugcheckParameter2 %#x
  132. # BugcheckParameter3 like: 0
  133. #>>52 ulelong x \b, BugcheckParameter3 %#x
  134. # BugcheckParameter4 like: 0
  135. #>>56 ulelong x \b, BugcheckParameter4 %#x
  136. # VersionUser[32]; like "PAGEPAGEPAGEPAGEPAGEPAGEPAGEPAGE" ""
  137. #>>60 string x \b, VersionUser "%.32s"
  138. # uint32_t reserved0 like: 45474101
  139. #>>92 ulelong x \b, reserved0 %#x
  140. >>0x05c byte 0 \b, no PAE
  141. >>0x05c byte 1 \b, PAE
  142. # KdDebuggerDataBlock like: 8054d2e0
  143. #>>96 ulelong x \b, KdDebuggerDataBlock %#x
  144. # uint8_t PhysicalMemoryBlockBuffer[700]
  145. # WinDumpPhyMemDesc32 NumberOfRuns like: 45474150
  146. #>>100 ulelong x \b, NumberOfRuns %#x
  147. # WinDumpPhyMemDesc32 uint32_t NumberOfPages like: 1162297680
  148. #>>104 ulelong x \b, NumberOfPages %#x
  149. # WinDumpPhyMemRun32 Run[86]; 688 bytes
  150. #>>108 ulelong x \b, BasePage %#x
  151. #>>112 ulelong x \b, PageCount %#x
  152. # uint8_t reserved1[3200]
  153. #>>800 string x \b, reserved "%s"
  154. #>>4000 ulelong x \b, RequiredDumpSpace %#x
  155. # uint8_t reserved2[92];
  156. #>>4004 string x \b, reserved2 "%s"
  157. >>0xf88 lelong 1 \b, full dump
  158. >>0xf88 lelong 2 \b, kernel dump
  159. >>0xf88 lelong 3 \b, small dump
  160. # like: 4
  161. >>0xf88 lelong >3 \b, dump type (%#x)
  162. # WinDumpPhyMemDesc32 uint32_t NumberOfPages like: 1162297680
  163. # GRR: IS THIS TRUE? VALUE IS SOMETIMES VERY HIGH!
  164. #>>104 ulelong x \b, NumberOfPages %#x
  165. >>0x068 lelong x \b, %d pages
  166. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/dmp-64.trid.xml113o
  167. # Note: called "Windows 64bit Memory Dump" by TrID
  168. # char ValidDump[4]
  169. >4 string DU64 MS Windows 64bit crash dump
  170. #!:mime application/octet-stream
  171. !:mime application/x-ms-dmp
  172. # like: c:\Windows\Minidump\020322-18890-01.dmp c:\Windows\MEMORY.DMP
  173. !:ext dmp
  174. # major version like: 15
  175. >>8 ulelong x \b, version %u
  176. # minor version like: 9600 19041 22621
  177. >>12 ulelong x \b.%u
  178. # DirectoryTableBase like: 001ab000
  179. #>>16 ulequad x \b, DirectoryTableBase %#llx
  180. # PfnDatabase like: fffffa8000000000
  181. #>>24 ulequad x \b, PfnDatabase %#llx
  182. # PsLoadedModuleList like: fffff800c553f650
  183. #>>32 ulequad x \b, PsLoadedModuleList %#llx
  184. # PsActiveProcessHead like: fffff800c5525400
  185. #>>40 ulequad x \b, PsActiveProcessHead %#llx
  186. # MachineImageType like: 00008664
  187. >>48 ulelong !0x8664 \b, MachineImageType %#x
  188. # NumberProcessors like: 2 4
  189. >>52 ulelong x \b, %u processors
  190. # BugcheckCode like: 1000007e
  191. #>>56 ulelong x \b, BugcheckCode %#x
  192. # unused0
  193. #>>60 ulelong x \b, unused0 %#x
  194. # BugcheckParameter1 like: ffffffffc0000005
  195. #>>64 ulequad x \b, BugcheckParameter1 %#llx
  196. # BugcheckParameter2 like: fffff801abb2158f
  197. #>>72 ulequad x \b, BugcheckParameter2 %#llx
  198. # BugcheckParameter3 like: ffffd000290d4288
  199. #>>80 ulequad x \b, BugcheckParameter3 %#llx
  200. # BugcheckParameter4 like: ffffd000290d3aa0
  201. #>>88 ulequad x \b, BugcheckParameter4 %#llx
  202. # VersionUser[32]; like "" "PAGEPAGEPAGEPAGEPAGEPAGEPAGEPAGE" ""
  203. #>>96 string x \b, VersionUser "%.32s"
  204. # KdDebuggerDataBlock like: fffff800c550c530
  205. #>>128 ulequad x \b, KdDebuggerDataBlock %#llx
  206. # uint8_t PhysicalMemoryBlockBuffer[704]
  207. # WinDumpPhyMemDesc64 NumberOfRuns like: 6 7 0x45474150
  208. #>>136 ulelong x \b, NumberOfRuns %#x
  209. # WinDumpPhyMemDesc64 unused like: 0 0x45474150
  210. #>>140 ulelong x \b, unused %#x
  211. # WinDumpPhyMemRun64 Run[43] BasePage like: 1
  212. #>>152 ulequad x \b, BasePage %#llx
  213. # WinDumpPhyMemRun64 Run[43] PageCount like: 57h
  214. #>>160 ulequad x \b, PageCount %#llx
  215. # uint8_t ContextBuffer[3000] like: "" "\001" "\0207J\266\001\340\377\377&8\007\312"
  216. #>>840 string x \b, ContextBuffer "%s"
  217. # WinDumpExceptionRecord ExceptionCode
  218. #>>3840 ulelong x \b, ExceptionCode %#x
  219. # WinDumpExceptionRecord ExceptionFlags
  220. #>>3844 ulelong x \b, ExceptionFlags %#x
  221. # WinDumpExceptionRecord ExceptionRecord
  222. #>>3848 ulequad x \b, ExceptionRecord %#llx
  223. # WinDumpExceptionRecord ExceptionAddress
  224. #>>3856 ulequad x \b, ExceptionAddress %#llx
  225. # WinDumpExceptionRecord NumberParameters
  226. #>>3864 ulelong x \b, NumberParameters %#x
  227. # WinDumpExceptionRecord unused
  228. #>>3868 ulelong x \b, unsed %#x
  229. # WinDumpExceptionRecord ExceptionInformation[15]
  230. #>>3872 ulequad x \b, ExceptionInformation[0] %#llx
  231. # https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/memory-dump-file-options
  232. # but DumpType like: 4~small 5~full (MEMORY.DMP) 6~kernel (MEMORY.DMP)
  233. >>0xf98 ulelong x \b,
  234. >>>0xf98 lelong 5 full dump
  235. >>>0xf98 lelong 6 kernel dump
  236. >>>0xf98 lelong 4 small dump
  237. # This probably never occur
  238. >>>0xf98 default x DumpType
  239. >>>>0xf98 ulelong x (%#x)
  240. # WinDumpPhyMemDesc64 uint64_t NumberOfPages like: 3142425 8341923 8366500 1162297680 4992030524978970960
  241. # GRR: IS THIS TRUE? VALUE IS SOMETIMES VERY HIGH!
  242. >>0x090 lequad x \b, %lld pages
  243. # Summary: Vista Event Log
  244. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  245. # Update: Joerg Jenderek
  246. # URL: https://github.com/libyal/libevtx/blob/main/documentation/Windows%20XML%20Event%20Log%20(EVTX).asciidoc
  247. # Reference (1): https://web.archive.org/web/20110803085000/
  248. # https://computer.forensikblog.de/en/2007/05/some_magic.html
  249. # http://mark0.net/download/triddefs_xml.7z/defs/e/evtx.trid.xml
  250. # Note: called "Vista Event Log" by TrID and "Event Log" by Windows
  251. # verified partly by `wevtutil.exe gli /lf:true dumpfile.evtx`
  252. 0 string ElfFile\0 MS Windows
  253. #!:mime application/octet-stream
  254. !:mime application/x-ms-evtx
  255. !:ext evtx
  256. # Major+Minor format version: 3.1~Vista and later 3.2~Windows 10 (2004) and later
  257. >0x24 ulelong =0x00030001 Vista-8.1 Event Log
  258. >0x24 ulelong !0x00030001 10-11 Event Log, version
  259. >>0x26 uleshort x %u
  260. >>0x24 uleshort x \b.%u
  261. >0x2a leshort x \b, %d chunks
  262. >>0x10 lelong x \b (no. %d in use)
  263. >0x18 lelong >1 \b, next record no. %d
  264. >0x18 lelong =1 \b, empty
  265. >0x78 lelong &1 \b, DIRTY
  266. >0x78 lelong &2 \b, FULL
  267. # Summary: Windows Event Trace Log
  268. # From: Joerg Jenderek
  269. # URL: http://fileformats.archiveteam.org/wiki/ETL
  270. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/e/etl.trid.xml
  271. # https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/etw/tracelog/trace_logfile_header.htm
  272. # Note: called "Window tracing/diagnostic binary log" by TrID
  273. # verified by `tracerpt.EXE Wifi.etl -of EVTX`
  274. # and by etl-parser `etl2xml --input AMSITrace.etl --output AMSITrace.xml`
  275. # Every ETL file begins with a WMI_BUFFER_HEADER, a SYSTEM_TRACE_HEADER and a TRACE_LOGFILE_HEADER
  276. 0 ubyte 0
  277. # look for corresponding encoded as UTF-16 file name extension like in: boot_BASE+CSWITCH_1.etl
  278. >0 search/0x699087/b .\0e\0t\0l\0\0\0
  279. # GRR: line above only works if in ../../src/file.h FILE_BYTES_MAX is raised above 699086h (6,59 MiB)
  280. >>0 use trace-etl
  281. # display information of Windows Performance Analyzer Trace File (file name)
  282. 0 name trace-etl
  283. >0 ubyte x Windows Event Trace Log
  284. #!:mime application/x-ms-etl
  285. # http://extension.nirsoft.net/etl
  286. !:mime application/etl
  287. !:ext etl
  288. # look for DOS drive letter part of log file name like: PhotosAppTracing_startedInBGMode.etl
  289. >0 search/0x2b4/sb :\0\x5c\0
  290. # like: "c:\Windows\Logs\NetSetup\service.0.etl" "C:\Windows\System32\LogFiles\WMI\Wifi.etl"
  291. >>&-2 lestring16 x "%s"
  292. # Summary: Windows System Deployment Image
  293. # Created by: Joerg Jenderek
  294. # URL: http://en.wikipedia.org/wiki/System_Deployment_Image
  295. # Reference: http://skolk.livejournal.com/1320.html
  296. 0 string $SDI
  297. >4 string 0001 System Deployment Image
  298. !:mime application/x-ms-sdi
  299. #!:mime application/octet-stream
  300. # \Boot\boot.sdi
  301. !:ext sdi
  302. # MDBtype: 0~Unspecified 1~RAM 2~ROM
  303. >>8 ulequad !0 \b, MDBtype %#llx
  304. # BootCodeOffset
  305. >>16 ulequad !0 \b, BootCodeOffset %#llx
  306. # BootCodeSize
  307. >>24 ulequad !0 \b, BootCodeSize %#llx
  308. # VendorID
  309. >>32 ulequad !0 \b, VendorID %#llx
  310. # DeviceID
  311. >>40 ulequad !0 \b, DeviceID %#llx
  312. # DeviceModel
  313. >>48 ulequad !0 \b, DeviceModel %#llx
  314. >>>56 ulequad !0 \b%llx
  315. # DeviceRole
  316. >>64 ulequad !0 \b, DeviceRole %#llx
  317. # Reserved1; reserved fields and gaps between BLOBs are padded with \0
  318. #>>72 ulequad !0 \b, Reserved1 %#llx
  319. # RuntimeGUID
  320. >>80 ulequad !0 \b, RuntimeGUID %#llx
  321. >>>88 ulequad !0 \b%llx
  322. # RuntimeOEMrev
  323. >>96 ulequad !0 \b, RuntimeOEMrev %#llx
  324. # Reserved2
  325. #>>104 ulequad !0 \b, Reserved2 %#llx
  326. # BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
  327. >>112 ulequad !0 \b, PageAlignment %llu
  328. # Reserved3[48]
  329. #>>120 ulequad !0 \b, Reserved3 %#llx
  330. # SDI checksum 39h
  331. >>0x1f8 ulequad x \b, checksum %#llx
  332. # BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
  333. >>0x400 string >\0 \b, type %-3.8s
  334. # 0~non-filesystem 7~NTFS 6~BIGFAT
  335. >>>0x420 ulequad !0 (%#llx)
  336. # ATTRibutes
  337. >>>0x408 ulequad !0 %#llx attributes
  338. # Offset
  339. >>>0x410 ulequad x at %#llx
  340. # print 1 space after size and then handles NTFS boot sector by ./filesystems
  341. >>>0x418 ulequad >0 %llu bytes
  342. >>>>(0x410.l) indirect x
  343. # 2nd BLOB: WIM
  344. >>0x440 string >\0 \b, type %-3.8s
  345. >>>0x428 ulequad !0 (%#llx)
  346. # ATTRibutes
  347. >>>0x448 ulequad !0 %#llx attributes
  348. # Offset
  349. >>>0x450 ulequad x at %#llx
  350. >>>0x458 ulequad >0 %llu bytes
  351. >>>>(0x450.l) indirect x
  352. # 3rd BLOB
  353. >>0x480 string >\0 \b, type %-3.8s
  354. # Summary: Windows boot status log BOOTSTAT.DAT
  355. # From: Joerg Jenderek
  356. # Reference: https://www.geoffchappell.com/notes/windows/boot/bsd.htm
  357. # Note: mainly refers to older Windows Vista, sometimes
  358. # BOOTSTAT.DAT only contains nulls or invalid data
  359. # checking for valid version below 5
  360. 0 ulelong <5
  361. # skip many ISO images by checking for valid 64 KiB file size
  362. >8 ulelong =0x00010000
  363. >>0 use bootstat-dat
  364. # display information of BOOTSTAT.DAT
  365. 0 name bootstat-dat
  366. >0 ulelong x Windows boot log
  367. #!:mime application/octet-stream
  368. !:mime application/x-ms-dat
  369. # BOOTSTAT.DAT in BOOT subdirectory
  370. !:ext dat
  371. # apparently a version number: 2 for older like Vista, 3, 4 Windows 10
  372. >0 ulelong >2 \b, version %u
  373. # apparently the size of the header: often 10h in older Windows, 14h, 18h
  374. >4 ulelong !0x10 \b, header size %#x
  375. #>4 ulelong !0x10 \b, header size %u
  376. # apparently the size of the file: always 0x00010000~64KiB
  377. # the file is acceptable to BOOTMGR only if it is exactly 64 KiB
  378. >8 ulelong !0x00010000 \b, file size %#x
  379. # size of valid data, in bytes: C8h 50h 172h 5D5Ch
  380. >0xc ulelong x \b, %#x valid bytes
  381. # skip header and jump to first bootstat entry and display information
  382. >(0x4.l-1) ubyte x
  383. >>&0 use bootstat-entry
  384. # jump to first entry again because pointer are bad after "use"
  385. >(0x4.l-1) ubyte x
  386. # by 1st entry size jump to 2nd entry and display information
  387. >>&(&0x18.l-1) ubyte x
  388. >>>&0 use bootstat-entry
  389. # jump to possible 3rd boot entry and display information
  390. # >(0x4.l-1) ubyte x
  391. # >>&(&0x18.l-1) ubyte x
  392. # >>>&(&0x18.l-1) ubyte x
  393. # >>>>&0 use bootstat-entry
  394. # display BOOTSTAT.DAT entry
  395. 0 name bootstat-entry
  396. #>0x00 ubequad x \b, ENTRY %16.16llx
  397. # size of entry, in bytes: 40h(init) 78h(launced) 9Ch
  398. #>0x18 ulelong x \b; entry size %u
  399. >0x18 ulelong x \b; entry size %#x
  400. # time stamp, in seconds
  401. >0x00 ulelong x \b, %#x seconds
  402. # always zero, significance unknown
  403. >0x04 ulelong !0 \b, not null %u
  404. # GUID of event source; but empty if event source is BOOTMGR
  405. >0x08 ubequad !0 \b, GUID %#16.16llx
  406. >>0x10 ubequad x \b%16.16llx
  407. # severity code: 1~informational 3~errors
  408. >0x1C ulelong !1 \b, severity %#x
  409. # apparently a version number: 2
  410. >0x20 ulelong !2 \b, version %u
  411. # event identifier 1~log file initialised 11h~boot application launched
  412. #>0x24 ulelong x \b, event %#x
  413. >0x24 ulelong !1
  414. >>0x24 ulelong !0x11 \b, event %#x
  415. # entry data; size depends on event identifier
  416. #>0x28 ubequad x \b, data %#16.16llx
  417. >0x24 ulelong =0x1 \b, Init
  418. # always 0, significance unknown
  419. >>0x34 uleshort !0 \b, not null %u
  420. # always 7, significance unknown
  421. >>0x36 uleshort !7 \b, not seven %u
  422. # year
  423. >>0x28 uleshort x %u
  424. # month
  425. >>0x2A uleshort x \b-%u
  426. # day
  427. >>0x2C uleshort x \b-%u
  428. # hour
  429. >>0x2E uleshort x %u
  430. # minute
  431. >>0x30 uleshort x \b:%u
  432. # second
  433. >>0x32 uleshort x \b:%u
  434. # boot application launched
  435. >0x24 ulelong =0x11 \b, launched
  436. # type of start: 0 normally, 1 or 2 maybe in a recovery sequence
  437. >>0x38 uleshort !0 \b, type %u
  438. # pathname of boot application, as null-terminated Unicode string; typically
  439. # \Windows\system32\winload.exe \Windows\system32\winload.efi
  440. >>0x3C lestring16 x %s
  441. # Summary: Windows Error Report text files
  442. # URL: https://en.wikipedia.org/wiki/Windows_Error_Reporting
  443. # Reference: https://www.nirsoft.net/utils/app_crash_view.html
  444. # Created by: Joerg Jenderek
  445. # Note: in directories %ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  446. # %LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  447. 0 lestring16 Version=
  448. >22 lestring16 EventType Windows Error Report
  449. !:mime text/plain
  450. # Report.wer
  451. !:ext wer
  452. # Summary: Windows 3.1 group files
  453. # Extension: .grp
  454. # Created by: unknown
  455. 0 string \120\115\103\103 MS Windows 3.1 group files
  456. # Summary: Old format help files
  457. # URL: https://en.wikipedia.org/wiki/WinHelp
  458. # Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
  459. # Update: Joerg Jenderek
  460. # Created by: Dirk Jagdmann <doj@cubic.org>
  461. #
  462. # check and then display version and date inside MS Windows HeLP file fragment
  463. 0 name help-ver-date
  464. # look for Magic of SYSTEMHEADER
  465. >0 leshort 0x036C
  466. # version Major 1 for right file fragment
  467. >>4 leshort 1 Windows
  468. # print non empty string above to avoid error message
  469. # Warning: Current entry does not yet have a description for adding a MIME type
  470. # not officially registered at IANA
  471. #!:mime application/winhelp
  472. #!:mime application/winhlp
  473. !:mime application/x-winhelp
  474. # version Minor of help file format is hint for windows version
  475. # HC30 Windows 3.0 help file
  476. >>>2 leshort 15 3.0
  477. # HC31 Windows 3.1 help file
  478. >>>2 leshort 21 3.1
  479. # WMVC/MMVC media view file
  480. >>>2 leshort 27
  481. # MVC or HCW 4.00 Windows 95
  482. >>>2 leshort 33 95
  483. # next line should not happen
  484. >>>2 default x y.z
  485. >>>>2 leshort x %#x
  486. # to complete message string like "MS Windows 3.x help file"
  487. >>>2 leshort !27
  488. # HLP or few MVB like NOTEPLAY.MVB
  489. >>>>2 leshort x help
  490. !:ext hlp
  491. # URL: http://fileformats.archiveteam.org/wiki/Multimedia_Viewer_Book
  492. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mvb.trid.xml
  493. # Note: called "Multimedia Viewer Book" by TrID and by DROID via PUID fmt/1800
  494. >>>2 leshort =27 Multimedia Viewer Book
  495. !:ext mvb
  496. # GenDate often older than file creation date
  497. >>>6 ldate x \b, %s
  498. # flags determine the compression
  499. #>>>10 uleshort x \b, flags %#x
  500. >>>2 leshort <17
  501. # HelpFileTitle
  502. >>>>12 string x \b, title "%s"
  503. >>>2 leshort >16
  504. # SYSTEMREC[].RecordType type of data in record; 1~help file title 2~COPYRIGHT 3~TOPICOFFSET Contents 4~Macro 5~*.ICO 6~HPJ-structure
  505. #>>>>12 uleshort x \b, RecordType %u
  506. # DataSize size of data
  507. #>>>>14 uleshort x \b, DataSize %u
  508. >>>>12 uleshort 1
  509. >>>>>14 pstring/h >\0 \b, title "%s"
  510. # Magic for HeLP files
  511. # URL: http://fileformats.archiveteam.org/wiki/HLP_(WinHelp)
  512. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hlp.trid.xml
  513. # Note: called "Windows HELP File" by TrID, "Windows Help File" by DROID via PUID fmt/474 and
  514. # "WinHelp help file" by shared MIME-info database from freedesktop.org
  515. 0 lelong 0x00035f3f
  516. # ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
  517. # file header magic 0x293B at DirectoryStart+9
  518. >(4.l+9) uleshort 0x293B MS
  519. # URL: http://fileformats.archiveteam.org/wiki/WinHelp_annotation
  520. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/ann.trid.xml
  521. # look for @VERSION bmf.. like IBMAVW.ANN
  522. >>0xD4 string =\x62\x6D\x66\x01\x00 Windows help annotation
  523. !:mime application/x-winhelp
  524. !:ext ann
  525. >>0xD4 string !\x62\x6D\x66\x01\x00
  526. # "GID Help index" by TrID by gid.trid.xml
  527. # sometimes at little higher offset like in corelap.GID
  528. >>>(4.l+0x65) search/26 |Pete Windows help Global Index
  529. !:mime application/x-winhelp
  530. !:ext gid
  531. # HeLP Bookmark or
  532. # Multimedia_Viewer_Book or
  533. # "Windows HELP File" by TrID by hlp.trid.xml
  534. >>>(4.l+0x65) default x
  535. # maybe there exist a cleaner way to detect HeLP fragments
  536. # brute search for Magic 0x036C with matching Major maximal 13 iterations
  537. # https://sembiance.com/fileFormatSamples/document/multimediaViewerBook/viewerht.mvb
  538. >>>>16 search/0x1bbc370/s \x6c\x03
  539. >>>>>&0 use help-ver-date
  540. >>>>>&4 leshort !1
  541. # viewerht.mvb
  542. >>>>>>&-2 search/0x1c4b6f0/s \x6c\x03
  543. >>>>>>>&0 use help-ver-date
  544. >>>>>>>&4 leshort !1
  545. # https://sembiance.com/fileFormatSamples/document/multimediaViewerBook/clarkhow.mvb
  546. >>>>>>>>&0 search/0x34ab80/s \x6c\x03
  547. >>>>>>>>>&0 use help-ver-date
  548. >>>>>>>>>&4 leshort !1
  549. >>>>>>>>>>&0 search/0x473ab0/s \x6c\x03
  550. >>>>>>>>>>>&0 use help-ver-date
  551. >>>>>>>>>>>&4 leshort !1
  552. >>>>>>>>>>>>&0 search/0x739680/s \x6c\x03
  553. >>>>>>>>>>>>>&0 use help-ver-date
  554. >>>>>>>>>>>>>&4 leshort !1
  555. >>>>>>>>>>>>>>&0 search/0x76c030/s \x6c\x03
  556. >>>>>>>>>>>>>>>&0 use help-ver-date
  557. >>>>>>>>>>>>>>>&4 leshort !1
  558. >>>>>>>>>>>>>>>>&0 search/0x805c80/s \x6c\x03
  559. # GCC.HLP is detected after 7 iterations
  560. >>>>>>>>>>>>>>>>>&0 use help-ver-date
  561. >>>>>>>>>>>>>>>>>&4 leshort !1
  562. >>>>>>>>>>>>>>>>>>&0 search/0x805c80/s \x6c\x03
  563. >>>>>>>>>>>>>>>>>>>&0 use help-ver-date
  564. >>>>>>>>>>>>>>>>>>>&4 leshort !1
  565. >>>>>>>>>>>>>>>>>>>>&0 search/0xb63480/s \x6c\x03
  566. >>>>>>>>>>>>>>>>>>>>>&0 use help-ver-date
  567. >>>>>>>>>>>>>>>>>>>>>&4 leshort !1
  568. >>>>>>>>>>>>>>>>>>>>>>&0 search/0xb7fe80/s \x6c\x03
  569. >>>>>>>>>>>>>>>>>>>>>>>&0 use help-ver-date
  570. >>>>>>>>>>>>>>>>>>>>>>>&4 leshort !1
  571. >>>>>>>>>>>>>>>>>>>>>>>>&0 search/0xb8ade0/s \x6c\x03
  572. >>>>>>>>>>>>>>>>>>>>>>>>>&0 use help-ver-date
  573. >>>>>>>>>>>>>>>>>>>>>>>>>&4 leshort !1
  574. >>>>>>>>>>>>>>>>>>>>>>>>>>&0 search/0x371d4/s \x6c\x03
  575. >>>>>>>>>>>>>>>>>>>>>>>>>>>&0 use help-ver-date
  576. >>>>>>>>>>>>>>>>>>>>>>>>>>>&4 leshort !1
  577. >>>>>>>>>>>>>>>>>>>>>>>>>>>>&0 search/0x371d4/s \x6c\x03
  578. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>&0 use help-ver-date
  579. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>&4 leshort !1
  580. # https://sembiance.com/fileFormatSamples/document/multimediaViewerBook/arivideo.mvb
  581. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>8 lelong !0xFFffFFff Windows Multimedia Viewer Book
  582. !:mime application/x-winhelp
  583. !:ext mvb
  584. # repeat search again or following default line does not work
  585. >>>>16 search/0x49AF/s \x6c\x03
  586. # remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 7 8.1 64-bit)
  587. # typically found inside directory %LOCALAPPDATA%\Help
  588. >>>>16 default x Windows help Bookmark
  589. !:mime application/x-winhelp
  590. !:ext /bmk
  591. # DirectoryStart offset of FILEHEADER of internal directory
  592. #>4 lelong x \b, DirectoryStart %8.8x
  593. ## FirstFreeBlock normally for *HLP FFFFFFFFh if no free list or 10h for *ANN
  594. #>>8 lelong x \b, FirstFreeBlock %#8.8x
  595. ## ReservedSpace normally 042Fh AFh for *.ANN
  596. #>>(4.l) lelong x \b, ReservedSpace %#8.8x
  597. ## UsedSpace normally 0426h A6h for *.ANN
  598. #>>(4.l+4) lelong x \b, UsedSpace %#8.8x
  599. ## FileFlags normally 04...
  600. #>>(4.l+5) lelong x \b, FileFlags %#8.8x
  601. ## file header magic 0x293B
  602. #>>(4.l+9) uleshort x \b, file header magic %#4.4x
  603. ## file header Flags 0x0402
  604. #>>(4.l+11) uleshort x \b, file header Flags %#4.4x
  605. ## file header PageSize 0400h 80h for *.ANN
  606. #>>(4.l+13) uleshort x \b, PageSize %#4.4x
  607. ## Structure[16] z4
  608. #>>(4.l+15) string >\0 \b, Structure_"%-.16s"
  609. ## MustBeZero 0
  610. #>>(4.l+31) uleshort x \b, MustBeZero %#4.4x
  611. ## PageSplits
  612. #>>(4.l+33) uleshort x \b, PageSplits %#4.4x
  613. ## RootPage
  614. #>>(4.l+35) uleshort x \b, RootPage %#4.4x
  615. ## MustBeNegOne 0xffff
  616. #>>(4.l+37) uleshort x \b, MustBeNegOne %#4.4x
  617. ## TotalPages 1
  618. #>>(4.l+39) uleshort x \b, TotalPages %#4.4x
  619. ## NLevels 0x0001
  620. #>>(4.l+41) uleshort x \b, NLevels %#4.4x
  621. ## TotalBtreeEntries
  622. #>>(4.l+43) ulelong x \b, TotalBtreeEntries %#8.8x
  623. ## pages of the B+ tree
  624. #>>(4.l+47) ubequad x \b, PageStart %#16.16llx
  625. # GRR: offset is not reachable in few samples like STMMHLP.MVB because probably damaged file
  626. # or DROID fmt-474-signature-id-748.hlp
  627. # or for example run file command with higher --parameter bytes=30335189
  628. >(4.l+9) uleshort !0x293B MS Windows Multimedia Viewer Book
  629. #!:mime application/octet-stream
  630. !:ext mvb
  631. # GRR: next line is not executed!
  632. >>12 lelong x (damaged or use higher '-P bytes' option)
  633. # EntireFileSize; biggest 1551334 for CORELDRW.HLP 30335189 for viewerht.mvb; smallest 28672 for open.mvb
  634. >12 lelong x \b, %d bytes
  635. # start with colon or semicolon for comment line like Back2Life.cnt
  636. 0 regex \^(:|;)
  637. # look for first keyword Base
  638. >0 search/45 :Base
  639. >>&0 use cnt-name
  640. # only solution to search again from beginning , because relative offsets changes when use is called
  641. >0 search/45 :Base
  642. >0 default x
  643. # look for other keyword Title like in putty.cnt
  644. >>0 search/45 :Title
  645. >>>&0 use cnt-name
  646. #
  647. # display mime type and name of Windows help Content source
  648. 0 name cnt-name
  649. # skip space at beginning
  650. >0 string \040
  651. # name without extension and greater character or name with hlp extension
  652. >>1 regex/c \^([^\xd>]*|.*\\.hlp) MS Windows help file Content, based "%s"
  653. !:mime text/plain
  654. !:apple ????TEXT
  655. !:ext cnt
  656. # URL: https://en.wikipedia.org/wiki/WinHelp
  657. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fts.trid.xml
  658. # Note: called "Windows Help Full-Text Search index" by TrID
  659. # Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
  660. 0 string tfMR MS Windows help Full Text Search index
  661. !:mime application/x-winhelp-fts
  662. !:ext fts
  663. # path of corresponding MS Windows help like: "C:\CDCREATR\creatr32.hlp" "C:\PROGRAMME\IPHOTO PLUS 4\PROGRAMS\Guide.hlp"
  664. >16 string >\0 for "%s"
  665. # From: Joerg Jenderek
  666. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/ftg-winhelp.trid.xml
  667. # Note: called "Windows Help Full-Text search Group" by TrID
  668. 0 string gfMR MS Windows help Full Text search Group
  669. !:mime application/x-winhelp-ftg
  670. !:ext ftg
  671. # path of corresponding FTS like: "C:\Windows\Help\winhlp32.FTS"
  672. >16 string >\0 for "%s"
  673. # Summary: Hyper terminal
  674. # Created by: unknown
  675. # Update: Joerg Jenderek
  676. # URL: https://en.wikipedia.org/wiki/HyperACCESS
  677. # https://www.hilgraeve.com/hyperterminal/
  678. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/ht.trid.xml
  679. # Note: called "HyperTerminal data file" by TrID and "HyperTerminal File" on English Windows
  680. 0 string HyperTerminal\040
  681. >14 string 1.0\ --\ HyperTerminal\ data\ file MS Windows HyperTerminal profile
  682. #!:mime application/octet-stream
  683. !:mime application/x-ms-ht
  684. !:ext ht
  685. # https://ithreats.files.wordpress.com/2009/05/\040
  686. # lnk_the_windows_shortcut_file_format.pdf
  687. # Summary: Windows shortcut
  688. # Created by: unknown
  689. # Update: Joerg Jenderek
  690. # URL: http://fileformats.archiveteam.org/wiki/Windows_Shortcut
  691. # https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/
  692. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/l/lnk-shortcut.trid.xml
  693. # https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-SHLLINK/%5bMS-SHLLINK%5d.pdf
  694. # Note: called "Windows Shortcut" by TrID, "Microsoft Windows Shortcut" by DROID via PUID x-fmt/428 and "Windows shortcut file" by ./msdos (v 1.158)
  695. # partly verified by command like `lnkinfo AOL.lnk`
  696. # 'L' + GUUID
  697. # HeaderSize + LinkCLSID 00021401-0000-0000-C000-000000000046
  698. 0 string \114\0\0\0\001\024\002\0\0\0\0\0\300\0\0\0\0\0\0\106 MS Windows shortcut
  699. !:mime application/x-ms-shortcut
  700. !:ext lnk
  701. # LinkFlags
  702. # HasLinkTargetIDList; if set a LinkTargetIDList structure MUST follow the ShellLinkHeader; If is not set, structure MUST NOT be present
  703. >20 lelong&1 1 \b, Item id list present
  704. # HasLinkInfo; if set a LinkInfo structure MUST follow the ShellLinkHeader or LinkTargetIDList; If is not set, structure MUST NOT be present
  705. >20 lelong&2 2 \b, Points to a file or directory
  706. >20 lelong&4 4 \b, Has Description string
  707. >20 lelong&8 8 \b, Has Relative path
  708. >20 lelong&16 16 \b, Has Working directory
  709. >20 lelong&32 32 \b, Has command line arguments
  710. >20 lelong&64 64 \b, Icon
  711. # IconIndex
  712. >>56 lelong x \b number=%d
  713. # IsUnicode; If set then StringData section contains Unicode-encoded strings
  714. >20 lelong&128 128 \b, Unicoded
  715. # ForceNoLinkInfo; LinkInfo structure is ignored
  716. >20 lelong&256 256 \b, NoLinkInfo
  717. # HasExpString; with an EnvironmentVariableDataBlock
  718. >20 lelong&512 512 \b, HasEnvironment
  719. # look for BlockSize 314h and EnvironmentVariableDataBlock BlockSignature A0000001h
  720. >>76 search/1972 \x14\x03\x00\x00\x01\x00\x00\xa0
  721. # TargetAnsi (260 bytes); NULL-terminated path to environment variable encoded with system default code page
  722. #>>>&0 string x '%s'
  723. # TargetUnicode (520 bytes): optional NULL-terminated path to same environment variable Unicode encoded
  724. # like: "%windir%\system32\calc.exe"
  725. >>>&260 lestring16 x "%s"
  726. # RunInSeparateProcess; run in a separate virtual machine when launching a 16-bit application; no examples found
  727. >20 lelong&1024 1024 \b, RunInSeparateProcess
  728. # Unused1; undefined and MUST be ignored
  729. #>20 lelong&2048 2048 \b, Unused1
  730. # HasDarwinID; with a DarwinDataBlock
  731. >20 lelong&4096 4096 \b, HasDarwinID
  732. # look for BlockSize 314h and DarwinDataBlock BlockSignature A0000006h
  733. >>76 search/1972 \x14\x03\x00\x00\x06\x00\x00\xa0
  734. # DarwinDataAnsi (260 bytes); NULL-terminated application identifier encoded with system default code page; SHOULD be ignored
  735. #>>>&0 string x '%s'
  736. # DarwinDataUnicode (520 bytes); NULL-terminated application identifier Unicode encoded
  737. >>>&260 lestring16 x "%s"
  738. # RunAsUser; target application is run as a different user
  739. >20 lelong&8192 8192 \b, RunAsUser
  740. # HasExpIcon; with an IconEnvironmentDataBlock
  741. >20 lelong&16384 16384 \b, HasExpIcon
  742. # look for BlockSize 314h and IconEnvironmentDataBlock BlockSignature A0000007h
  743. >>76 search/1972 \x14\x03\x00\x00\x07\x00\x00\xa0
  744. # TargetAnsi (260 bytes); NULL-terminated path to environment icon variable encoded with system default code page
  745. #>>>&0 string x '%s'
  746. # TargetUnicode (520 bytes); optional NULL-terminated path to same icon environment variable Unicode encoded
  747. # like: "%SystemDrive%\Program Files\YaCy\addon\YaCy.ico"
  748. >>>&260 lestring16 x "%s"
  749. # NoPidlAlias; represented in the shell namespace; no examples found
  750. >20 lelong&32768 32768 \b, NoPidlAlias
  751. # Unused2; undefined and MUST be ignored
  752. #>20 lelong&65536 65536 \b, Unused2
  753. # RunWithShimLayer; with a ShimDataBlock; no examples found
  754. >20 lelong&131072 131072 \b, RunWithShimLayer
  755. # ForceNoLinkTrack; TrackerDataBlock is ignored; no examples found
  756. >20 lelong&262144 262144 \b, ForceNoLinkTrack
  757. >20 lelong&262144 0
  758. # look for BlockSize 60h, TrackerDataBlock BlockSignature A0000003h, it length 58h and Version 0
  759. >>76 search/1972 \x60\x00\x00\x00\x03\x00\x00\xa0\x58\x00\x00\x00\0\0\0\0
  760. # MachineID (16 bytes); a NULL-terminated NetBIOS name encoded with system default code page of the machine
  761. >>>&0 string x \b, MachineID %0.16s
  762. # Droid (32 bytes)
  763. #
  764. # DroidBirth (32 bytes)
  765. #
  766. # EnableTargetMetadata; collect target properties and store in PropertyStoreDataBlock
  767. >20 lelong&524288 524288 \b, EnableTargetMetadata
  768. # look for BlockSize >= Ch, PropertyStoreDataBlock BlockSignature A0000009h
  769. #>>76 search/1972 \x00\x00\x09\x00\x00\xa0
  770. # PropertyStore (variable)
  771. #
  772. # DisableLinkPathTracking; EnvironmentVariableDataBlock is ignored; no examples found
  773. >20 lelong&1048576 1048576 \b, DisableLinkPathTracking
  774. # DisableKnownFolderTracking; SpecialFolderDataBlock and KnownFolderDataBlock are ignored and not saved
  775. >20 lelong&2097152 2097152 \b, DisableKnownFolderTracking
  776. >20 lelong&2097152 0
  777. # look for BlockSize 1Ch and KnownFolderDataBlock BlockSignature A000000Bh
  778. >>76 search/1972 \x1c\x00\x00\x00\x0B\x00\x00\xa0
  779. # https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/known-folder-guids-for-file-dialog-custom-places
  780. # KnownFolderID specifies the folder GUID ID
  781. # ProgramFiles 905E63B6-C1BF-494E-B29C-65B732D3D21A
  782. # ProgramFilesX86 7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E
  783. >>>&0 guid x KnownFolderID %s
  784. # DisableKnownFolderAlias; unaliased form of the known folder IDList SHOULD be used; no examples found
  785. >20 lelong&4194304 4194304 \b, DisableKnownFolderAlias
  786. # AllowLinkToLink; link that references another link is enabled; no examples found
  787. >20 lelong&8388608 8388608 \b, AllowLinkToLink
  788. # UnaliasOnSave; unaliased form of that known folder or the target IDList SHOULD be used; no examples found
  789. >20 lelong&16777216 16777216 \b, UnaliasOnSave
  790. # PreferEnvironmentPath; path specified in the EnvironmentVariableDataBlock SHOULD be used
  791. >20 lelong&33554432 33554432 \b, PreferEnvironmentPath
  792. # KeepLocalIDListForUNCTarget; UNC name SHOULD be stored in local path IDList in PropertyStoreDataBlock; no examples found
  793. >20 lelong&67108864 67108864 \b, KeepLocalIDListForUNCTarget
  794. # FileAttributes
  795. >24 lelong&1 1 \b, Read-Only
  796. >24 lelong&2 2 \b, Hidden
  797. >24 lelong&4 4 \b, System
  798. # Reserved1; MUST be zero
  799. >24 lelong&8 8 \b, Reserved1
  800. >24 lelong&16 16 \b, Directory
  801. >24 lelong&32 32 \b, Archive
  802. # Reserved2; MUST be zero
  803. >24 lelong&64 64 \b, Reserved2
  804. >24 lelong&128 128 \b, Normal
  805. >24 lelong&256 256 \b, Temporary
  806. # no examples found
  807. >24 lelong&512 512 \b, Sparse
  808. # no examples found
  809. >24 lelong&1024 1024 \b, Reparse point
  810. >24 lelong&2048 2048 \b, Compressed
  811. >24 lelong&4096 4096 \b, Offline
  812. # FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; contents need to be indexed
  813. >24 lelong&8192 8192 \b, NeedIndexed
  814. # FILE_ATTRIBUTE_ENCRYPTED; file or directory is encrypted
  815. >24 lelong&16384 16384 \b, Encrypted
  816. # value zero means there is no time set on the target
  817. >28 leqwdate !0 \b, ctime=%s
  818. # Access time of target in UTC
  819. >36 leqwdate !0 \b, atime=%s
  820. # write time of target in UTC
  821. >44 leqwdate !0 \b, mtime=%s
  822. # FileSize; 32 bit size of target in bytes
  823. >52 lelong x \b, length=%u, window=
  824. # ShowCommand; 1~SW_SHOWNORMAL 3~SW_SHOWMAXIMIZED HerzlichMEDION.lnk 7~SW_SHOWMINNOACTIVE YaCy.lnk Privoxy.lnk; All other values like 2 MUST be treated as SW_SHOWNORMAL
  825. #>60 lelong x ShowCommand=%#x
  826. >60 lelong x
  827. >>60 lelong 3 \bshowmaximized
  828. >>60 lelong 7 \bshowminnoactive
  829. >>60 default x \bnormal
  830. # Hotkey
  831. >64 uleshort >0 \b, hot key
  832. # 41h~A 42h~B ...
  833. >>64 ubyte x %c
  834. # modifier keys: 0x01~HOTKEYF_SHIFT 0x02~HOTKEYF_CONTROL 0x04~HOTKEYF_ALT
  835. >>65 ubyte&1 1 \b+SHIFT
  836. >>65 ubyte&2 2 \b+CONTROL
  837. >>65 ubyte&4 4 \b+ALT
  838. # Reserved; MUST be zero
  839. #>66 uleshort !0 \b, reserved %#x
  840. # Reserved2; MUST be zero
  841. #>68 ulelong !0 \b, reserved2 %#x
  842. # Reserved3; MUST be zero
  843. #>72 ulelong !0 \b, reserved3 %#x
  844. # optional LINKTARGET_IDLIST if LinkFlags bit HasLinkTargetIDList is set
  845. >20 lelong&1 1
  846. # IDListSize; size of IDList
  847. >>76 uleshort x \b, IDListSize %#4.4x
  848. # 1st item
  849. >>78 use lnk-item
  850. # 2nd possible item
  851. >>(78.s+78) uleshort >0
  852. >>>(78.s+78) use lnk-item
  853. # 3rd possible item
  854. >>>&(&-2.s-2) uleshort >0
  855. >>>>&-2 use lnk-item
  856. # 4th possible item
  857. >>>>&(&-2.s-2) uleshort >0
  858. >>>>>&-2 use lnk-item
  859. # Because HasLinkInfo is set, a LinkInfo structure follows
  860. >20 lelong&2 2
  861. # if no LINKTARGET_IDLIST (no HasLinkTargetIDList) then direct after header; no example found
  862. >>20 lelong&1 =0
  863. >>>76 use lnk-info
  864. # if LINKTARGET_IDLIST (HasLinkTargetIDList) then after LINKTARGET_IDLIST by addtional IDListSize bytes
  865. >>20 lelong&1 =1
  866. >>>76 uleshort >0
  867. #>>>>(76.s+78) use lnk-info
  868. >>>>(76.s+78) ubelong x
  869. # move pointer to beginnig of LinkInfo structure
  870. >>>>>&-8 ubelong x
  871. #>>>>>>&16 ulelong x \b, LocalBasePathOffset=%#8.8x
  872. >>>>>>&(&16.l) string x \b, LocalBasePath "%s"
  873. # check and then display link item (size,data)
  874. 0 name lnk-item
  875. # size value 0x0000 means TerminalID; indicates the end of the item IDs list
  876. >0 uleshort >0
  877. #>>0 uleshort x \b, ItemIDSize %#4.4x
  878. # item Data
  879. #>>2 ubequad x \b, Item data=%#16.16llx
  880. #>>2 ubyte x \b, Item type=%#x
  881. >>2 ubyte =0x1f \b, Root folder
  882. # like: "26EE0668-A00A-44D7-9371-BEB064C98683" Control Panel
  883. # "20D04FE0-3AEA-1069-A2D8-08002B30309D" My Computer
  884. # "871C5380-42A0-1069-A2EA-08002B30309D" Internet Explorer
  885. >>>4 guid x "%s"
  886. >>2 ubyte =0x2f \b, Volume
  887. # like: "C:\" "D:\"
  888. >>>3 string x "%s"
  889. # Control panel category
  890. #>>2 ubyte foo \b, Control panel category
  891. # display LinkInfo structure (size,flags,offsets)
  892. 0 name lnk-info
  893. # LinkInfoSize; size of the LinkInfo structure
  894. >0 ulelong x \b, LinkInfoSize %#x
  895. # LinkInfoHeaderSize; if 1C no optional fields; >=24 optional fields are specified
  896. >4 ulelong x \b, LinkInfoHeaderSize %#x
  897. # LinkInfoFlags;
  898. #>8 ulelong x \b, LinkInfoFlags=%#x
  899. >8 ulelong&1 1 \b, VolumeIDAndLocalBasePath
  900. # VolumeIDOffset; location of the VolumeID field (VolumeIDSize DriveType DriveSerialNumber VolumeLabelOffset ... ) inside LinkInfo structure
  901. >>12 ulelong x \b, VolumeIDOffset %#x
  902. # LocalBasePathOffset; location of LocalBasePath field like "C:\test\a.txt" inside LinkInfo structure
  903. >>16 ulelong x \b, LocalBasePathOffset %#x
  904. # LocalBasePathOffsetUnicode; location of the LocalBasePathUnicode field inside LinkInfo structure
  905. >>4 ulelong >23
  906. >>>28 ulelong x \b, LocalBasePathOffsetUnicode %#x
  907. >8 ulelong&2 2 \b, CommonNetworkRelativeLinkAndPathSuffix
  908. # CommonNetworkRelativeLinkOffset; location of the CommonNetworkRelativeLink field inside LinkInfo structure
  909. >>20 ulelong x \b, CommonNetworkRelativeLinkOffset %#x
  910. # CommonPathSuffixOffset; location of CommonPathSuffix field
  911. >24 ulelong x \b, CommonPathSuffixOffset %#x
  912. # CommonPathSuffixOffsetUnicode; location of CommonPathSuffixUnicode field inside LinkInfo structure
  913. >4 ulelong >23
  914. >>32 ulelong x \b, CommonPathSuffixOffsetUnicode %#x
  915. # Summary: Outlook Personal Folders
  916. # Created by: unknown
  917. # Update: Joerg Jenderek
  918. # URL: http://fileformats.archiveteam.org/wiki/Personal_Folder_File
  919. # https://en.wikipedia.org/wiki/Personal_Storage_Table
  920. # Reference: https://interoperability.blob.core.windows.net/files/MS-PST/%5bMS-PST%5d.pdf
  921. # http://mark0.net/download/triddefs_xml.7z/defs/p/pab.trid.xml
  922. # dwMagic !BDN
  923. 0 lelong 0x4E444221
  924. # skip DROID x-fmt-75-signature-id-472.pab x-fmt-248-signature-id-260.pst x-fmt-249-signature-id-261.pst
  925. # by check for existance of bPlatformCreate value
  926. >14 ubyte x Microsoft Outlook
  927. #!:mime application/octet-stream
  928. # NOT official registered !
  929. !:mime application/vnd.ms-outlook
  930. # dwCRCPartial; 32-bit cyclic redundancy check (CRC) value of followin 471 bytes; zero for 64-bit
  931. #>>4 ulelong !0 \b, CRC %#x
  932. # wMagicClient; AB (4142h) is used for PAB files; SM (534Dh) is used for PST files; SO (534Fh) is used for OST files
  933. #>>8 leshort x \b, wMagicClient=%#x
  934. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pab.trid.xml
  935. # Note: called "Microsoft Personal Address Book" by TrID and
  936. # "Microsoft Outlook Personal Address Book" by DROID via x-fmt/75
  937. >>8 leshort 0x4142 Personal Address Book
  938. #!:mime application/x-ms-pab
  939. !:ext pab
  940. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pst.trid.xml
  941. # http://mark0.net/download/triddefs_xml.7z/defs/p/pst-unicode.trid.xml
  942. # Note: called "Microsoft OutLook Personal Folder" by TrID and
  943. # by DROID via x-fmt/248 for ANSI and via x-fmt/249 for Unicode
  944. #>>8 leshort 0x4D53 \b, PST~
  945. # called "Microsoft Outlook email folder" in ./windows version 1.37 and older
  946. >>8 leshort 0x4D53 Personal Storage
  947. #!:mime application/x-ms-pst
  948. !:ext pst
  949. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/o/ost.trid.xml
  950. # Note: called "Outlook Exchange Offline Storage" by TrID
  951. >>8 leshort 0x4F53 Offline Storage
  952. #!:mime application/x-ms-ost
  953. !:ext ost
  954. # wVer; file format version. 14 or 15 if the file is ANSI; > 21 or 23(=17h) if Unicode; 37 for written by Outlook with WIP
  955. >>10 uleshort x (
  956. # probably NO intermediate versions exist
  957. >>10 leshort <0x10 \b<=2002, ANSI,
  958. >>10 leshort >0x14 \b>=2003, Unicode,
  959. >>10 uleshort x version %u)
  960. # wVerClient; client file format version like: 19 22
  961. #>>12 uleshort x \b, wVerClient=%u
  962. # bPlatformCreate; This value MUST be set to 1 but also found 2
  963. >>14 ubyte >1 \b, bPlatformCreate=%u
  964. # bPlatformAccess; This value MUST be set to 1 but also found 2
  965. >>15 ubyte >1 \b, bPlatformAccess=%u
  966. # dwReserved1; SHOULD ignore and NOT modify this value; SHOULD initialize to zero
  967. >>16 ulelong !0 \b, dwReserved1=%#x
  968. # dwReserved2; SHOULD ignore and NOT modify this value; SHOULD initialize to zero
  969. >>20 ulelong !0 \b, dwReserved2=%#x
  970. # ANSI 32-bit variant Outlook 1997-2002
  971. >>10 uleshort <16
  972. # bidNextB; next BlockID (ANSI 4 bytes)
  973. #>>>24 ulelong !0 \b, bidNextB=%#x
  974. # bidNextP; Next available back BlockID pointer
  975. #>>>28 ulelong !0 \b, bidNextP=%#x
  976. # dwUnique; value monotonically increased when modifying PST; so CRC is changing
  977. >>>32 ulelong !0 \b, dwUnique=%#x
  978. # rgnid[128]; A fixed array of 32 NodeIDs, each corresponding to one of the 32 possible NID_TYPEs
  979. #>>>36 ubequad x \b, rgnid=%#llx...
  980. # dwReserved; Implementations SHOULD ignore this value and SHOULD NOT modify it; Initialized zero
  981. >>>164 ulelong !0 \b, dwReserved=%#x
  982. # ibFileEof; the size of the PST file, in bytes (ANSI 4 bytes)
  983. >>>168 ulelong x \b, %u bytes
  984. # ibAMapLast; offset to the last AMap page
  985. #>>>172 ulelong x \b, ibAMapLast=%#x
  986. # bSentinel; MUST be set to 0x80
  987. >>>460 ubyte !0x80 \b, bSentinel=%#x
  988. # bCryptMethod: 0~No encryption 1~encryption with permutation 2~encryption with cyclic 16~encryption with Windows Information Protection (WIP)
  989. >>>461 ubyte >0 \b, bCryptMethod=%u
  990. # UNICODE 64-bit variant Outlook 2003-2007
  991. >>10 uleshort >20
  992. # bidUnused; Unused 8 bytes padding (Unicode only); sometimes like: 0x0000000100000004
  993. >>>24 ulequad !0x0000000100000004 \b, bidUnused=%#16.16llx
  994. # dwUnique; value monotonically increased when modifying PST; so CRC is changing
  995. >>>40 ulelong !0 \b, dwUnique=%#x
  996. # rgnid[] (128 bytes): A fixed array of 32 NIDs, each corresponding to one of the 32 possible
  997. #>>>44 ubequad x \b, rgnid=%#llx...
  998. # ibFileEof; the size of the PST file, in bytes (Unicode 8 bytes)
  999. >>>184 ulequad x \b, %llu bytes
  1000. # bSentinel; MUST be set to 0x80
  1001. >>>512 ubyte !0x80 \b, bSentinel=%#x
  1002. # bCryptMethod; Encryption type like: 0 1 2 16
  1003. >>>513 ubyte >0 \b, bCryptMethod=%u
  1004. # dwCRC; 32-bit CRC of the of the previous 516 bytes
  1005. >>>524 ulelong x \b, CRC32 %#x
  1006. # Summary: Windows help cache
  1007. # Created by: unknown
  1008. 0 string \164\146\115\122\012\000\000\000\001\000\000\000 MS Windows help cache
  1009. # Summary: IE cache file
  1010. # Created by: Christophe Monniez
  1011. 0 string Client\ UrlCache\ MMF Internet Explorer cache file
  1012. >20 string >\0 version %s
  1013. # Summary: Registry files
  1014. # Created by: unknown
  1015. # Modified by (1): Joerg Jenderek
  1016. 0 string regf MS Windows registry file, NT/2000 or above
  1017. 0 string CREG MS Windows 95/98/ME registry file
  1018. 0 string SHCC3 MS Windows 3.1 registry file
  1019. # Summary: Windows Registry text
  1020. # URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
  1021. # Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
  1022. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  1023. # Update: Joerg Jenderek
  1024. # Windows 3-9X variant
  1025. 0 string REGEDIT
  1026. # skip ASCII text like "REGEDITor.txt" but match
  1027. # L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
  1028. >7 search/3 \n Windows Registry text
  1029. !:mime text/x-ms-regedit
  1030. !:ext reg
  1031. # Windows 9X variant
  1032. >>0 string REGEDIT4 (Win95 or above)
  1033. # Windows 2K ANSI variant
  1034. 0 string Windows\ Registry\ Editor\
  1035. >&0 string Version\ 5.00\r\n\r\n Windows Registry text (Win2K or above)
  1036. !:mime text/x-ms-regedit
  1037. !:ext reg
  1038. # Windows 2K UTF-16 variant
  1039. 2 lestring16 Windows\ Registry\ Editor\
  1040. >0x32 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  1041. # relative offset not working
  1042. #>&0 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  1043. !:mime text/x-ms-regedit
  1044. !:ext reg
  1045. # WINE variant
  1046. # URL: https://en.wikipedia.org/wiki/Wine_(software)
  1047. # Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
  1048. # Note: WINE use text based registry (system.reg,user.reg,userdef.reg)
  1049. # instead binary hiv structure like Windows
  1050. 0 string WINE\ REGISTRY\ Version\ WINE registry text
  1051. # version 2
  1052. >&0 string x \b, version %s
  1053. !:mime text/x-wine-extension-reg
  1054. !:ext reg
  1055. # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
  1056. # empty ,comment , section
  1057. # PR/383: remove unicode BOM because it is not portable across regex impls
  1058. #0 regex/s \\`(\\r\\n|;|[[])
  1059. # empty line CRLF
  1060. 0 ubeshort 0x0D0A
  1061. >0 use ini-file
  1062. # comment line starting with semicolon
  1063. 0 string ;
  1064. # look for phrase of Windows policy ADMinistrative template (with starting remark)
  1065. # like: WINDOW_95_CD/TOOLS/RESKIT/netadmin/poledit/conf.adm
  1066. >1 search/3548 END\040CATEGORY
  1067. # ADM with remark (by adm-rem.trid.xml) already done by generic ASCII variant
  1068. # if no Windows policy ADMinistrative template then Windows INItialization
  1069. >1 default x
  1070. >>0 use ini-file
  1071. # section line starting with left bracket
  1072. 0 string [
  1073. >0 use ini-file
  1074. # check and then display Windows INItialization configuration
  1075. 0 name ini-file
  1076. # look for left bracket in section line
  1077. >0 search/8192 [
  1078. # https://en.wikipedia.org/wiki/Autorun.inf
  1079. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
  1080. # space after right bracket
  1081. # or AutoRun.Amd64 for 64 bit systems
  1082. # or only NL separator
  1083. >>&0 regex/c \^autorun
  1084. # but sometimes total commander directory tree file "treeinfo.wc" with lines like
  1085. # [AUTORUN]
  1086. # [boot]
  1087. >>>&0 string =]\r\n[ Total commander directory treeinfo.wc
  1088. !:mime text/plain
  1089. !:ext wc
  1090. # From: Pal Tamas <folti@balabit.hu>
  1091. # Autorun File
  1092. >>>&0 string !]\r\n[ Microsoft Windows Autorun file
  1093. !:mime application/x-setupscript
  1094. !:ext inf
  1095. # https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
  1096. # version strings ASCII coded case-independent for Windows setup information script file
  1097. >>&0 regex/c \^(version|strings)] Windows setup INFormation
  1098. !:mime application/x-setupscript
  1099. #!:mime application/x-wine-extension-inf
  1100. !:ext inf
  1101. # NETCRC.INF OEMCPL.INF
  1102. >>&0 regex/c \^(WinsockCRCList|OEMCPL)] Windows setup INFormation
  1103. !:mime application/x-setupscript
  1104. !:ext inf
  1105. # http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
  1106. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
  1107. # .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
  1108. >>&0 regex/1024c \^(\\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)] Windows desktop.ini
  1109. !:mime application/x-wine-extension-ini
  1110. #!:mime text/plain
  1111. # https://support.microsoft.com/kb/84709/
  1112. >>&0 regex/c \^don't\ load] Windows CONTROL.INI
  1113. !:mime application/x-wine-extension-ini
  1114. !:ext ini
  1115. >>&0 regex/c \^(ndishlp\\$|protman\\$|NETBEUI\\$)] Windows PROTOCOL.INI
  1116. !:mime application/x-wine-extension-ini
  1117. !:ext ini
  1118. # https://technet.microsoft.com/en-us/library/cc722567.aspx
  1119. # http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
  1120. >>&0 regex/c \^(windows|Compatibility|embedding)] Windows WIN.INI
  1121. !:mime application/x-wine-extension-ini
  1122. !:ext ini
  1123. # https://en.wikipedia.org/wiki/SYSTEM.INI
  1124. >>&0 regex/c \^(boot|386enh|drivers)] Windows SYSTEM.INI
  1125. !:mime application/x-wine-extension-ini
  1126. !:ext ini
  1127. # http://www.mdgx.com/newtip6.htm
  1128. >>&0 regex/c \^SafeList] Windows IOS.INI
  1129. !:mime application/x-wine-extension-ini
  1130. !:ext ini
  1131. # https://en.wikipedia.org/wiki/NTLDR Windows Boot Loader information
  1132. >>&0 regex/c \^boot\x20loader] Windows boot.ini
  1133. !:mime application/x-wine-extension-ini
  1134. !:ext ini
  1135. # https://en.wikipedia.org/wiki/CONFIG.SYS
  1136. >>&0 regex/c \^menu] MS-DOS CONFIG.SYS
  1137. # @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
  1138. # CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
  1139. # CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
  1140. # dos and w40 used in dual booting scene
  1141. !:ext sys/dos/w40
  1142. # https://support.microsoft.com/kb/118579/
  1143. >>&0 regex/c \^Paths]\r\n MS-DOS MSDOS.SYS
  1144. !:ext sys/dos
  1145. # http://chmspec.nongnu.org/latest/INI.html#HHP
  1146. >>&0 regex/c \^options]\r\n Microsoft HTML Help Project
  1147. !:mime text/plain
  1148. !:ext hhp
  1149. # From: Joerg Jenderek
  1150. # URL: https://documentation.basis.com/BASISHelp/WebHelp/b3odbc/ODBC_Driver/obdcdriv_character_translation.htm
  1151. # Reference: https://www.garykessler.net/library/file_sigs.html
  1152. # http://mark0.net/download/triddefs_xml.7z/defs/c/cpx.trid.xml
  1153. # Note: stored in directory %WINDIR%\SysWOW64 or %WINDIR%\system
  1154. # second word often Latin but sometimes Cyrillic like in 12510866.CPX
  1155. >>&0 regex/c \^Windows\ (Latin|Cyrillic) Windows codepage translator
  1156. #!:mime text/plain
  1157. !:mime text/x-ms-cpx
  1158. # like: 12510866.CPX
  1159. !:ext cpx
  1160. # From: Joerg Jenderek
  1161. # URL: https://en.wikipedia.org/wiki/File_Explorer
  1162. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/scf-exp.trid.xml,scf-exp-old.trid.xml
  1163. # Note: called "Windows Explorer Command Shell File" by TrID and "File Explorer Command" by Windows via SHCmdFile
  1164. >>&0 regex/c \^Shell]\r\n Windows Explorer Shell Command File
  1165. #!:mime text/plain
  1166. !:mime text/x-ms-scf
  1167. # like: channels.scf desktop.scf explorer.scf "Desktop anzeigen.scf"
  1168. !:ext scf
  1169. # look for icon file directive maybe pointing to malicious file
  1170. >>>1 search/128 IconFile= \b, icon
  1171. >>>>&0 string x "%s"
  1172. # From: Joerg Jenderek
  1173. # URL: http://en.wikipedia.org/wiki/VIA_Technologies
  1174. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/scf-via.trid.xml
  1175. # Note: called "VIA setup configuration file" by TrID
  1176. >>&0 regex/c \^SCF]\r\n VIA setup configuration
  1177. #!:mime text/plain
  1178. !:mime text/x-via-scf
  1179. # like: SETUP.SCF
  1180. !:ext scf
  1181. # From: Joerg Jenderek
  1182. # URL: https://en.wikipedia.org/wiki/InstallShield
  1183. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/l/lid-is.trid.xml
  1184. # Note: contain also 3 keywords like: count Default key0
  1185. >>&0 regex/c \^Languages] InstallShield Language Identifier
  1186. #!:mime text/plain
  1187. !:mime text/x-installshield-lid
  1188. # like: SETUP.LID
  1189. !:ext lid
  1190. # From: Joerg Jenderek
  1191. # URL: https://www.file-extensions.org/tag-file-extension
  1192. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/t/taginfo.trid.xml
  1193. # Note: contain also keywords like: Application Category Company Misc Version
  1194. >>&0 regex/c \^TagInfo] TagInfo
  1195. #!:mime text/plain
  1196. #!:mime text/prs.lines.tag
  1197. !:mime text/x-ms-tag
  1198. # like: DATA.TAG
  1199. !:ext tag
  1200. # URL: https://en.wikipedia.org/wiki/Flatpak
  1201. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/flatpakref.trid.xml
  1202. # Note: called "Flatpack Reference" by TrID
  1203. >>&0 string Flatpak\ Ref] Flatpak repository reference
  1204. #!:mime text/plain
  1205. # https://reposcope.com/mimetype/application/vnd.flatpak.ref
  1206. !:mime application/vnd.flatpak.ref
  1207. !:ext flatpakref
  1208. # From: Joerg Jenderek
  1209. # URL: https://en.wikipedia.org/wiki/CloneCD
  1210. # Reference: https://en.wikipedia.org/wiki/CloneCD_Control_File
  1211. # http://mark0.net/download/triddefs_xml.7z/defs/c/cdimage-clonecd-cue.trid.xml
  1212. # Note: called "CloneCD CDImage (description)" by TrID and "CloneCD Control File" by DROID via PUID fmt/1760
  1213. >>&0 string CloneCD] CloneCD CD-image Description
  1214. #!:mime text/plain
  1215. !:mime text/x-ccd
  1216. !:ext ccd
  1217. # unknown keyword after opening bracket
  1218. >>&0 default x
  1219. #>>>&0 string/c x UNKNOWN [%s
  1220. # look for left bracket of second section
  1221. >>>&0 search/8192 [
  1222. # version Strings FileIdentification
  1223. >>>>&0 string/c version Windows setup INFormation
  1224. !:mime application/x-setupscript
  1225. !:ext inf
  1226. # From: Joerg Jenderek
  1227. # URL: https://cdrtfe.sourceforge.io/
  1228. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/cfp-cdrtfe.trid.xml
  1229. >>>>&0 string FileExplorer] cdrtfe Project
  1230. !:mime text/x-cfp
  1231. !:ext cfp
  1232. # https://en.wikipedia.org/wiki/Initialization_file Windows Initialization File or other
  1233. >>>>&0 default x
  1234. >>>>>&0 ubyte x
  1235. # characters, digits, underscore and white space followed by right bracket
  1236. # terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
  1237. >>>>>>&-1 regex/T \^([A-Za-z0-9_\(\)\ ]+)\]\r Generic INItialization configuration [%-.40s
  1238. # NETDEF.INF multiarc.ini
  1239. #!:mime application/x-setupscript
  1240. !:mime application/x-wine-extension-ini
  1241. #!:mime text/plain
  1242. !:ext ini/inf
  1243. # samples with only 1 and unknown section name
  1244. # XXX: matches a file containing '[1] 2'
  1245. #>>>&0 default x Generic INItialization configuration
  1246. #>>>>0 string x \b, 1st line "%s"
  1247. # UTF-16 BOM
  1248. 0 ubeshort =0xFFFE
  1249. # look for phrase of Windows policy ADMinistrative template (UTF-16 by adm-uni.trid.xml)
  1250. # like: wuau.adm
  1251. >2 search/0x384A E\0N\0D\0\040\0C\0A\0T\0E\0G\0O\0R\0Y\0
  1252. >>0 use windows-adm
  1253. # if no Windows policy ADMinistrative template then Windows INFormation
  1254. >2 default x
  1255. # UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
  1256. >>0 ubelong&0xFFff89FF =0xFFFE0900
  1257. # look for left bracket in section line
  1258. >>>2 search/8192 [
  1259. # keyword without 1st letter which is maybe up-/down-case
  1260. >>>>&3 lestring16 ersion] Windows setup INFormation
  1261. !:mime application/x-setupscript
  1262. # like: hdaudio.inf iscsi.inf spaceport.inf tpm.inf usbhub3.inf UVncVirtualDisplay.inf
  1263. !:ext inf
  1264. >>>>&3 lestring16 trings] Windows setup INFormation
  1265. !:mime application/x-setupscript
  1266. # like: arduino_gemma.inf iis.inf MSM8960.inf
  1267. !:ext inf
  1268. >>>>&3 lestring16 ourceDisksNames] Windows setup INFormation
  1269. !:mime application/x-setupscript
  1270. # like: atiixpag.inf mdmnokia.inf netefe32.inf rdpbus.inf
  1271. !:ext inf
  1272. # netnwcli.inf start with ;---[ NetNWCli.INX ]
  1273. >>>>&3 default x
  1274. # look for NL followed by left bracket
  1275. >>>>>&0 search/8192 \x0A\x00\x5b
  1276. # like: defltwk.inf netvwifibus.inf WSDPrint.inf
  1277. >>>>>>&3 lestring16 ersion] Windows setup INFormation
  1278. !:mime application/x-setupscript
  1279. !:ext inf
  1280. # Summary: Windows Policy ADMinistrative template
  1281. # From: Joerg Jenderek
  1282. # URL: https://en.wikipedia.org/wiki/Administrative_Template
  1283. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/adm.trid.xml
  1284. # Note: typically stored in directory like: %WINDIR%\system32\GroupPolicy\ADM
  1285. # worst case ASCII variant starting with remark line like: inetset.adm
  1286. 0 search/0x4E CLASS\040
  1287. >&0 string MACHINE
  1288. >>0 use windows-adm
  1289. >&0 string USER
  1290. >>0 use windows-adm
  1291. # display information about Windows policy ADMinistrative template
  1292. 0 name windows-adm Windows Policy Administrative Template
  1293. !:mime text/x-ms-adm
  1294. !:ext adm
  1295. # UTF-16 BOM implies UTF-16 encoded ADM (by adm-uni.trid.xml)
  1296. >0 ubeshort =0xFFFE
  1297. >>2 lestring16 x \b, 1st line "%s"
  1298. # look for UTF-16 encoded CarriageReturn LineFeed
  1299. >>>2 search/0x3A \r\0\n\0
  1300. >>>>&0 lestring16 x \b, 2nd line "%s"
  1301. # no UTF-16 BOM implies "ASCII" encoded ADM (by adm.trid.xml)
  1302. >0 ubeshort !0xFFFE
  1303. >>0 string x \b, 1st line "%s"
  1304. #>>>&0 ubequad x \b, 2ND %16.16llx
  1305. # 2nd line empty
  1306. >>>&2 beshort =0x0D0A
  1307. >>>>&0 beshort !0x0D0A \b, 3th line
  1308. >>>>>&-2 string x "%s"
  1309. # 2nd line with content
  1310. >>>&2 beshort !0x0D0A \b, 2nd line
  1311. >>>>&-2 string x "%s"
  1312. # Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
  1313. # http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
  1314. # URL: http://fileformats.archiveteam.org/wiki/INF_(Windows)
  1315. # Reference: http://en.verysource.com/code/10350344_1/inf.h.html
  1316. # Note: stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
  1317. # check for valid major and minor versions: 101h - 303h
  1318. 0 leshort&0xFcFc =0x0000
  1319. # GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
  1320. >0 leshort&0x0303 !0x0000
  1321. # test for valid InfStyles: 1 2
  1322. >>2 uleshort >0
  1323. >>>2 uleshort <3
  1324. # look for colon in WinDirPath after PNF header
  1325. #>>>>0x59 search/18 :
  1326. # skip few Adobe Photoshop Color swatch ("Mac OS.aco" TRUMATCH-Farben.aco Windows.aco) and some
  1327. # Targa image (money-256.tga XING_B_UCM8.tga x-fmt-367-signature-id-604.tga) with "invalid low section name" \0
  1328. >>>>(20.l) ubelong >0x40004000
  1329. >>>>>0 use PreCompiledInf
  1330. 0 name PreCompiledInf
  1331. >0 uleshort x Windows Precompiled iNF
  1332. !:mime application/x-pnf
  1333. !:ext pnf
  1334. # major version 1 for older Windows like XP and 3 since about Windows Vista
  1335. # 101h~95-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362-Windows11
  1336. >1 ubyte x \b, version %u
  1337. >0 ubyte x \b.%u
  1338. >0 uleshort =0x0101 (Windows
  1339. >>4 ulelong&0x00000001 !0x00000001 95-98)
  1340. >>4 ulelong&0x00000001 =0x00000001 XP)
  1341. >0 uleshort =0x0301 (Windows Vista-8.1)
  1342. >0 uleshort =0x0302 (Windows 10 older)
  1343. >0 uleshort =0x0303 (Windows 10-11)
  1344. # 1 ,2 (windows 98 SE)
  1345. >2 uleshort !2 \b, InfStyle %u
  1346. # PNF_FLAG_IS_UNICODE 0x00000001
  1347. # PNF_FLAG_HAS_STRINGS 0x00000002
  1348. # PNF_FLAG_SRCPATH_IS_URL 0x00000004
  1349. # PNF_FLAG_HAS_VOLATILE_DIRIDS 0x00000008
  1350. # PNF_FLAG_INF_VERIFIED 0x00000010
  1351. # PNF_FLAG_INF_DIGITALLY_SIGNED 0x00000020
  1352. # UNKNOWN8 0x00000080
  1353. # UNKNOWN 0x00000100
  1354. # UNKNOWN1 0x01000000
  1355. # UNKNOWN2 0x02000000
  1356. >4 ulelong&0x03000180 >0 \b, flags
  1357. >>4 ulelong x %#x
  1358. >4 ulelong&0x00000001 0x00000001 \b, unicoded
  1359. >4 ulelong&0x00000002 0x00000002 \b, has strings
  1360. >4 ulelong&0x00000004 0x00000004 \b, src URL
  1361. >4 ulelong&0x00000008 0x00000008 \b, volatile dir ids
  1362. >4 ulelong&0x00000010 0x00000010 \b, verified
  1363. >4 ulelong&0x00000020 0x00000020 \b, digitally signed
  1364. # >4 ulelong&0x00000080 0x00000080 \b, UNKNOWN8
  1365. # >4 ulelong&0x00000100 0x00000100 \b, UNKNOWN
  1366. # >4 ulelong&0x01000000 0x01000000 \b, UNKNOWN1
  1367. # >4 ulelong&0x02000000 0x02000000 \b, UNKNOWN2
  1368. #>8 ulelong x \b, InfSubstValueListOffset %#x
  1369. # many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
  1370. # , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
  1371. #>12 uleshort x \b, InfSubstValueCount %#x
  1372. # only < 9 found: 8 hcw85b64.PNF
  1373. #>14 uleshort x \b, InfVersionDatumCount %#x
  1374. # only found values lower 0x0000ffff ??
  1375. #>16 ulelong x \b, InfVersionDataSize %#x
  1376. # only found positive values lower 0x00ffFFff for InfVersionDataOffset
  1377. >20 ulelong x \b, at %#x
  1378. >4 ulelong&0x00000001 =0x00000001
  1379. # case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
  1380. >>(20.l) lestring16 x "%s"
  1381. >4 ulelong&0x00000001 !0x00000001
  1382. >>(20.l) string x "%s"
  1383. # FILETIME is number of 100-nanosecond intervals since 1 January 1601
  1384. #>24 ulequad x \b, InfVersionLastWriteTime %16.16llx
  1385. >24 qwdate x \b, InfVersionLastWriteTime %s
  1386. # for Windows 98, XP
  1387. >0 uleshort <0x0102
  1388. # only found values lower 0x00ffFFff
  1389. # often 70 but also 78h for corelist.PNF
  1390. # >>32 ulelong x \b, StringTableBlockOffset %#x
  1391. # >>36 ulelong x \b, StringTableBlockSize %#x
  1392. # >>40 ulelong x \b, InfSectionCount %#x
  1393. # >>44 ulelong x \b, InfSectionBlockOffset %#x
  1394. # >>48 ulelong x \b, InfSectionBlockSize %#x
  1395. # >>52 ulelong x \b, InfLineBlockOffset %#x
  1396. # >>56 ulelong x \b, InfLineBlockSize %#x
  1397. # >>60 ulelong x \b, InfValueBlockOffset %#x
  1398. # >>64 ulelong x \b, InfValueBlockSize %#x
  1399. # WinDirPathOffset
  1400. # like 58h, which means direct after PNF header
  1401. #>>68 ulelong x \b, at %#x
  1402. >>68 ulelong x
  1403. >>>4 ulelong&0x00000001 =0x00000001
  1404. #>>>>(68.l) ubequad =0x43003a005c005700
  1405. # normally unicoded C:\Windows
  1406. #>>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  1407. >>>>(68.l) ubequad !0x43003a005c005700
  1408. >>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  1409. >>>4 ulelong&0x00000001 !0x00000001
  1410. # normally ASCII C:\WINDOWS
  1411. #>>>>(68.l) string =C:\\WINDOWS \b, WinDirPath "%s"
  1412. >>>>(68.l) string !C:\\WINDOWS
  1413. >>>>>(68.l) string x \b, WinDirPath "%s"
  1414. # found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
  1415. >>>72 ulelong >0 \b,
  1416. >>>>4 ulelong&0x00000001 =0x00000001
  1417. >>>>>(72.l) lestring16 x OsLoaderPath "%s"
  1418. >>>>4 ulelong&0x00000001 !0x00000001
  1419. # seldom C:\ instead empty
  1420. >>>>>(72.l) string x OsLoaderPath "%s"
  1421. # 1fdh
  1422. #>>>76 uleshort x \b, StringTableHashBucketCount %#x
  1423. # https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
  1424. # only 407h found
  1425. >>>78 uleshort !0x409 \b, LanguageID %x
  1426. #>>>78 uleshort =0x409 \b, LanguageID %x
  1427. # InfSourcePathOffset often 0
  1428. >>>80 ulelong >0 \b, at %#x
  1429. >>>>4 ulelong&0x00000001 =0x00000001
  1430. >>>>>(80.l) lestring16 x SourcePath "%s"
  1431. >>>>4 ulelong&0x00000001 !0x00000001
  1432. >>>>>(80.l) string >\0 SourcePath "%s"
  1433. # OriginalInfNameOffset often 0
  1434. >>>84 ulelong >0 \b, at %#x
  1435. >>>>4 ulelong&0x00000001 =0x00000001
  1436. >>>>>(84.l) lestring16 x InfName "%s"
  1437. >>>>4 ulelong&0x00000001 !0x00000001
  1438. >>>>>(84.l) string >\0 InfName "%s"
  1439. # for newer Windows like Vista, 7 , 8.1 , 10
  1440. >0 uleshort >0x0101
  1441. >>80 ulelong x \b, at %#x WinDirPath
  1442. >>>4 ulelong&0x00000001 0x00000001
  1443. # normally unicoded C:\Windows
  1444. #>>>>(80.l) ubequad =0x43003a005c005700
  1445. #>>>>>(80.l) lestring16 x "%s"
  1446. >>>>(80.l) ubequad !0x43003a005c005700
  1447. >>>>>(80.l) lestring16 x "%s"
  1448. # language id: 0 407h~german 409h~English_US
  1449. >>90 uleshort !0x409 \b, LanguageID %x
  1450. #>>90 uleshort =0x409 \b, LanguageID %x
  1451. >>92 ulelong >0 \b, at %#x
  1452. >>>4 ulelong&0x00000001 0x00000001
  1453. # language string like: de-DE en-US
  1454. >>>>(92.l) lestring16 x language %s
  1455. # Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
  1456. # Extension: .bkf
  1457. # Created by: Joerg Jenderek
  1458. # URL: https://en.wikipedia.org/wiki/NTBackup
  1459. # Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
  1460. # Descriptor BloCK name of Microsoft Tape Format
  1461. 0 string TAPE
  1462. # Format Logical Address is zero
  1463. >20 ulequad 0
  1464. # Reserved for MBC is zero
  1465. >>28 uleshort 0
  1466. # Control Block ID is zero
  1467. >>>36 ulelong 0
  1468. # BIT4-BIT15, BIT18-BIT31 of block attributes are unused
  1469. >>>>4 ulelong&0xFFfcFFe0 0 Windows NTbackup archive
  1470. #!:mime application/x-ntbackup
  1471. !:ext bkf
  1472. # OS ID
  1473. >>>>>10 ubyte 1 \b NetWare
  1474. >>>>>10 ubyte 13 \b NetWare SMS
  1475. >>>>>10 ubyte 14 \b NT
  1476. >>>>>10 ubyte 24 \b 3
  1477. >>>>>10 ubyte 25 \b OS/2
  1478. >>>>>10 ubyte 26 \b 95
  1479. >>>>>10 ubyte 27 \b Macintosh
  1480. >>>>>10 ubyte 28 \b UNIX
  1481. # OS Version (2)
  1482. #>>>>>11 ubyte x OS V=%x
  1483. # MTF_CONTINUATION Media Sequence Number > 1
  1484. #>>>>>4 ulelong&0x00000001 !0 \b, continued
  1485. # MTF_COMPRESSION
  1486. >>>>>4 ulelong&0x00000004 !0 \b, compressed
  1487. # MTF_EOS_AT_EOM End Of Medium was hit during end of set processing
  1488. >>>>>4 ulelong&0x00000008 !0 \b, End Of Medium hit
  1489. >>>>>4 ulelong&0x00020000 0
  1490. # MTF_SET_MAP_EXISTS A Media Based Catalog Set Map may exist on tape
  1491. >>>>>>4 ulelong&0x00010000 !0 \b, with catalog
  1492. # MTF_FDD_ALLOWED However File/Directory Detail can only exist if a Set Map is also present
  1493. >>>>>4 ulelong&0x00020000 !0 \b, with file catalog
  1494. # Offset To First Event 238h,240h,28Ch
  1495. #>>>>>8 uleshort x \b, event offset %4.4x
  1496. # Displayable Size (20e0230h 20e024ch 20e0224h)
  1497. #>>>>>8 ulequad x dis. size %16.16llx
  1498. # Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
  1499. #>>>>>52 ulelong x family ID %8.8x
  1500. # TAPE Attributes (3)
  1501. #>>>>>56 ulelong x TAPE %8.8x
  1502. # Media Sequence Number
  1503. >>>>>60 uleshort >1 \b, sequence %u
  1504. # Password Encryption Algorithm (3)
  1505. >>>>>62 uleshort >0 \b, %#x encrypted
  1506. # Soft Filemark Block Size * 512 (2)
  1507. #>>>>>64 uleshort =2 \b, soft size %u*512
  1508. >>>>>64 uleshort !2 \b, soft size %u*512
  1509. # Media Based Catalog Type (1,2)
  1510. #>>>>>66 uleshort x \b, catalog type %4.4x
  1511. # size of Media Name (66,68,6Eh)
  1512. >>>>>68 uleshort >0
  1513. # offset of Media Name (5Eh)
  1514. >>>>>>70 uleshort >0
  1515. # 0~, 1~ANSI, 2~UNICODE
  1516. >>>>>>>48 ubyte 1
  1517. # size terminated ansi coded string normally followed by "MTF Media Label"
  1518. >>>>>>>>(70.s) string >\0 \b, name: %s
  1519. >>>>>>>48 ubyte 2
  1520. # Not null, but size terminated unicoded string
  1521. >>>>>>>>(70.s) lestring16 x \b, name: %s
  1522. # size of Media Label (104h)
  1523. #>>>>>72 uleshort >0
  1524. # offset of Media Label (C4h,C6h,CCh)
  1525. >>>>>74 uleshort >0
  1526. >>>>>>48 ubyte 1
  1527. #Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
  1528. >>>>>>>(74.s) string >\0 \b, label: %s
  1529. >>>>>>48 ubyte 2
  1530. >>>>>>>(74.s) lestring16 x \b, label: %s
  1531. # size of password name (0,1Ch)
  1532. #>>>>>76 uleshort >0 \b, password size %4.4x
  1533. # Software Vendor ID (CBEh)
  1534. >>>>>86 uleshort x \b, software (%#x)
  1535. # size of Software Name (6Eh)
  1536. >>>>>80 uleshort >0
  1537. # offset of Software Name (1C8h,1CAh,1D0h)
  1538. >>>>>>82 uleshort >0
  1539. # 1~ANSI, 2~UNICODE
  1540. >>>>>>>48 ubyte 1
  1541. >>>>>>>>(82.s) string >\0 \b: %s
  1542. >>>>>>>48 ubyte 2
  1543. # size terminated unicoded coded string normally followed by "SPAD"
  1544. >>>>>>>>(82.s) lestring16 x \b: %s
  1545. # Format Logical Block Size (512,1024)
  1546. #>>>>>84 uleshort =1024 \b, block size %u
  1547. >>>>>84 uleshort !1024 \b, block size %u
  1548. # Media Date of MTF_DATE_TIME type with 5 bytes
  1549. #>>>>>>88 ubequad x DATE %16.16llx
  1550. # MTF Major Version (1)
  1551. #>>>>>>93 ubyte x \b, MFT version %x
  1552. #
  1553. # URL: https://en.wikipedia.org/wiki/PaintShop_Pro
  1554. # Reference: https://www.cryer.co.uk/file-types/p/pal.htm
  1555. # Created by: Joerg Jenderek
  1556. # Note: there exist other color palette formats also with .pal extension
  1557. 0 string JASC-PAL\r\n PaintShop Pro color palette
  1558. #!:mime text/plain
  1559. # PspPalette extension is used by newer (probably 8) PaintShopPro versions
  1560. !:ext pal/PspPalette
  1561. # 2nd line contains palette file version. For example "0100"
  1562. >10 string !0100 \b, version %.4s
  1563. # third line contains the number of colours: 16 256 ...
  1564. >16 string x \b, %.3s colors
  1565. # URL: https://en.wikipedia.org/wiki/Innosetup
  1566. # Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
  1567. # Created by: Joerg Jenderek
  1568. # Note: created by like "InnoSetup self-extracting archive" inside ./msdos
  1569. # TrID labeles the entry as "Inno Setup Uninstall Log"
  1570. # TUninstallLogID
  1571. 0 string Inno\ Setup\ Uninstall\ Log\ (b) InnoSetup Log
  1572. !:mime application/x-innosetup
  1573. # unins000.dat, unins001.dat, ...
  1574. !:ext dat
  1575. # " 64-bit" variant
  1576. >0x1c string >\0 \b%.7s
  1577. # AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
  1578. >0xc0 string x %s
  1579. # AppId[0x80] is similar to AppName or
  1580. # GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
  1581. >0x40 ubyte 0x7b
  1582. >>0x40 string x %-.38s
  1583. # do not know how this log version correlates to program version
  1584. >0x140 ulelong x \b, version %#x
  1585. # NumRecs
  1586. #>0x144 ulelong x \b, %#4.4x records
  1587. # EndOffset means files size
  1588. >0x148 ulelong x \b, %u bytes
  1589. # Flags 5 25h 35h
  1590. #>0x14c ulelong x \b, flags %8.8x
  1591. # Reserved: array[0..26] of Longint
  1592. # the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
  1593. >0x140 ulelong <1000
  1594. # hostname
  1595. >>0x1d6 pstring x \b, %s
  1596. # user name
  1597. >>>&0 pstring x \b\%s
  1598. # directory like C:\Program Files (x86)\GnuWin32
  1599. >>>>&0 pstring x \b, "%s"
  1600. # version 1000 or higher implies unicode
  1601. >0x140 ulelong >999
  1602. # hostname
  1603. >>0x1db lestring16 x \b, %-.9s
  1604. # utf string variant with prepending fe??ffFFff
  1605. >>0x1db search/43 \xFF\xFF\xFF
  1606. # user name
  1607. >>>&0 lestring16 x \b\%-.9s
  1608. >>>&0 search/43 \xFF\xFF\xFF
  1609. # directory like C:\Program Files\GIMP 2
  1610. >>>>&0 lestring16 x \b, %-.42s
  1611. # URL: https://jrsoftware.org/ishelp/index.php?topic=setup_signeduninstaller
  1612. # Reference:https://github.com/jrsoftware/issrc/blob/main/Projects/Struct.pas
  1613. # From: Joerg Jenderek
  1614. 0 string Inno\ Setup\ Messages\ (
  1615. # null padded til 0x40 boundary
  1616. >0x38 quad 0 InnoSetup messages
  1617. !:mime application/x-innosetup-msg
  1618. # unins000.msg, unins001.msg, ...
  1619. !:ext msg
  1620. # version like 5.1.1 5.1.11 5.5.0 5.5.3 6.0.0
  1621. >>0x15 string x \b, version %.5s
  1622. # look for 6th char of version string or terminating right parentheses
  1623. >>>0x1a ubyte !0x29 \b%c
  1624. # NumMessages
  1625. >>0x40 ulelong x \b, %u messages
  1626. # TotalSize: Cardinal;
  1627. #>>0x44 ulelong x \b, TotalSize %u
  1628. # NotTotalSize: Cardinal;
  1629. #>>0x48 ulelong x \b, NotTotalSize %u
  1630. # CRCMessages: Longint;
  1631. #>>0x4C ulelong x \b, CRC %#x
  1632. >>0x40 ulelong x
  1633. # (u) after version means unicoded messages
  1634. >>>0x1c search/2 (u) (UTF-16),
  1635. >>>>0x50 lestring16 x %s
  1636. # ASCII coded message
  1637. >>>0x1c default x (ASCII),
  1638. >>>>0x50 string x %s
  1639. # Windows Imaging (WIM) Image
  1640. # Update: Joerg Jenderek at Mar 2019, 2021
  1641. # URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
  1642. # http://fileformats.archiveteam.org/wiki/Windows_Imaging_Format
  1643. # Reference: https://download.microsoft.com/download/f/e/f/
  1644. # fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
  1645. # Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
  1646. 0 string MSWIM\000\000\000
  1647. >0 use wim-archive
  1648. # https://wimlib.net/man1/wimoptimize.html
  1649. 0 string WLPWM\000\000\000
  1650. >0 use wim-archive
  1651. 0 name wim-archive
  1652. # _WIMHEADER_V1_PACKED ImageTag[8]
  1653. >0 string x Windows imaging
  1654. !:mime application/x-ms-wim
  1655. # TO avoid in file version 5.36 error like
  1656. # Magdir/windows, 760: Warning: Current entry does not yet have a description
  1657. # file: could not find any valid magic files! (No error)
  1658. # split WIM
  1659. >16 ulelong &0x00000008 (SWM
  1660. !:ext swm
  1661. # usPartNumber; 1, unless the file was split into multiple parts
  1662. >>40 uleshort x \b %u
  1663. # usTotalParts; The total number of WIM file parts in a spanned set
  1664. >>42 uleshort x \b of %u) image
  1665. # non split WIM
  1666. >16 ulelong ^0x00000008
  1667. # https://wimlib.net/man1/wimmount.html
  1668. # solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
  1669. >>12 ulelong 3584 (ESD) image
  1670. !:ext esd
  1671. >>12 ulelong !3584 (
  1672. # look for archive member RunTime.xml like in Microsoft.Windows.Cosa.Desktop.Client.ppkg
  1673. >>>156 search/68233/s RunTime.xml \bWindows provisioning package)
  1674. !:ext ppkg
  1675. # if is is not a Windows provisioning package, then it is a WIM
  1676. >>>156 default x \bWIM) image
  1677. # second disk image part created by Microsoft's RecoveryDrive.exe has name Reconstruct.WIM2
  1678. !:ext wim/wim2
  1679. >0 string/b WLPWM\000\000\000 \b, wimlib pipable format
  1680. # cbSize size of the WIM header in bytes like 208
  1681. #>8 ulelong x \b, headersize %u
  1682. # dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
  1683. >14 uleshort x v%u
  1684. >13 ubyte x \b.%u
  1685. # dwImageCount; The number of images contained in the WIM file
  1686. >44 ulelong >1 \b, %u images
  1687. # dwBootIndex
  1688. # 1-based index of the bootable image of the WIM, or 0 if no image is bootable
  1689. >0x78 ulelong >0 \b, bootable no. %u
  1690. # dwFlags
  1691. #>16 ulelong x \b, flags %#8.8x
  1692. #define FLAG_HEADER_COMPRESSION 0x00000002
  1693. #define FLAG_HEADER_READONLY 0x00000004
  1694. #define FLAG_HEADER_SPANNED 0x00000008
  1695. #define FLAG_HEADER_RESOURCE_ONLY 0x00000010
  1696. #define FLAG_HEADER_METADATA_ONLY 0x00000020
  1697. #define FLAG_HEADER_WRITE_IN_PROGRESS 0x00000040
  1698. #define FLAG_HEADER_RP_FIX 0x00000080 reparse point fixup
  1699. #define FLAG_HEADER_COMPRESS_RESERVED 0x00010000
  1700. #define FLAG_HEADER_COMPRESS_XPRESS 0x00020000
  1701. #define FLAG_HEADER_COMPRESS_LZX 0x00040000
  1702. #define FLAG_HEADER_COMPRESS_LZMS 0x00080000
  1703. #define FLAG_HEADER_COMPRESS_XPRESS2 0x00100000 wimlib-1.13.0\include\wimlib\header.h
  1704. # XPRESS, with small chunk size
  1705. >16 ulelong &0x00100000 \b, XPRESS2
  1706. >16 ulelong &0x00080000 \b, LZMS
  1707. >16 ulelong &0x00040000 \b, LZX
  1708. >16 ulelong &0x00020000 \b, XPRESS
  1709. >16 ulelong &0x00000002 compressed
  1710. >16 ulelong &0x00000004 \b, read only
  1711. >16 ulelong &0x00000010 \b, resource only
  1712. >16 ulelong &0x00000020 \b, metadata only
  1713. >16 ulelong &0x00000080 \b, reparse point fixup
  1714. #>16 ulelong &0x00010000 \b, RESERVED
  1715. # dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
  1716. #>20 ulelong >0 \b, chunk size %u bytes
  1717. # gWIMGuid
  1718. #>24 ubequad x \b, GUID %#16.16llx
  1719. #>>32 ubequad x \b%16.16llx
  1720. # rhOffsetTable; the location of the resource lookup table
  1721. # wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
  1722. #>48 ubequad x \b, rhOffsetTable %#16.16llx
  1723. # rhXmlData; the location of the XML data
  1724. #>0x50 ulelong x \b, at %#8.8x
  1725. # NOT WORKING \xff\xfe<\0W\0I\0M\0
  1726. #>(0x50.l) ubequad x \b, xml=%16.16llx
  1727. # rhBootMetadata; the location of the metadata resource
  1728. #>0x60 ubequad x \b, rhBootMetadata %#16.16llx
  1729. # rhIntegrity; the location of integrity table used to verify files
  1730. #>0x7c ubequad x \b, rhIntegrity %#16.16llx
  1731. # Unused[60]
  1732. #>148 ubequad !0 \b,unused %#16.16llx
  1733. #
  1734. # From: Joerg Jenderek
  1735. # URL: https://en.wikipedia.org/wiki/Windows_Easy_Transfer
  1736. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
  1737. # Note: called "Windows Easy Transfer migration data" by TrID,
  1738. # "Migration Store" or "EasyTransfer file" by Microsoft
  1739. 0 string 1giM Windows Easy Transfer migration data
  1740. #!:mime application/octet-stream
  1741. !:mime application/x-ms-mig
  1742. !:ext mig
  1743. >0x18 string =MRTS without password
  1744. # data offset with 1 space at end
  1745. >>0x1c ulelong+0x38 x \b, at %#x
  1746. # look for zlib compressed data by ./compress
  1747. >>(0x1c.l+0x38) ubyte x
  1748. >>>&-1 indirect x
  1749. # in password protected examples MRTS comes some bytes further
  1750. >0x18 string !MRTS with password
  1751. # look for first MRTS tag
  1752. >0x18 search/29/b MRTS
  1753. # probably first file name length like 178, ...
  1754. #>>&0 ulelong x \b, 1st length %u
  1755. # URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
  1756. >>&20 lestring16 x \b, 1st %-s
  1757. # Microsoft SYLK
  1758. # https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
  1759. # https://outflank.nl/upload/sylksum.txt
  1760. 0 string ID;P Microsoft SYLK program
  1761. >4 string >0 \b, created by %s
  1762. !:ext slk/sylk
  1763. # Summary: Windows Performance Monitor Alert
  1764. # From: Joerg Jenderek
  1765. # URL: https://en.wikipedia.org/wiki/Performance_Monitor
  1766. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pma.trid.xml
  1767. # Note: called "Windows Performance Monitor Alert" by TrID
  1768. 0 ubelong =0xDC058340
  1769. >4 ubyte =0 Windows Performance Monitor Alert
  1770. #!:mime application/octet-stream
  1771. # https://www.thoughtco.com/mime-types-by-content-type-3469108
  1772. # https://filext.com/file-extension/PAM
  1773. !:mime application/x-perfmon
  1774. #!:mime application/x-ms-pma
  1775. !:ext pma
  1776. # metric type like: "BrowserMetrics" "CrashpadMetrics" "SetupMetrics"
  1777. >>80 string x \b, "%s"
  1778. # From: Joerg Jenderek
  1779. # URL: https://en.wikipedia.org/wiki/InstallShield
  1780. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/ins.trid.xml
  1781. # Note: contain also keywords like: BATCH_INSTALL ISVERSION LOGHANDLE SRCDIR SRCDISK WINDIR WINSYSDISK
  1782. 0 ubelong 0xB8C90C00 InstallShield Script
  1783. #!:mime application/octet-stream
  1784. !:mime application/x-installshield-ins
  1785. # like test.ins Setup.ins
  1786. !:ext ins
  1787. # UNKNOWN like: 160034121de07e00 1600341260befe00 16003412e0783700
  1788. # 5000010021083f00 50000100b0335600 50000100cbfdf800 50000100dfbc4700
  1789. #>4 ubequad x \b, at 4 %#16.16llx
  1790. # copyright text like: "Stirling Technologies, Inc. (c) 1990-1994"
  1791. # "InstallSHIELD Software Corporation (c) 1990-1997"
  1792. >13 pstring/h x "%s"
  1793. # look for specific ASCII variable names
  1794. >1 search/0x121/s SRCDIR \b, variable names:
  1795. # 1st like: SRCDIR
  1796. >>&-4 leshort x #%u
  1797. >>&-2 pstring/h x %s
  1798. # 2nd like: SRCDISK
  1799. >>>&0 leshort x #%u
  1800. >>>&2 pstring/h x %s
  1801. # 3rd like: TARGETDISK
  1802. >>>>&0 leshort x #%u
  1803. >>>>&2 pstring/h x %s
  1804. # 4th like: TARGETDIR
  1805. #>>>>>&0 leshort x #%u
  1806. #>>>>>&2 pstring/h x %s
  1807. # 5th like: WINDIR
  1808. #>>>>>>&0 leshort x #%u
  1809. #>>>>>>&2 pstring/h x %s
  1810. # 6th like: WINDISK
  1811. #>>>>>>>&0 leshort x #%u
  1812. #>>>>>>>&2 pstring/h x %s
  1813. # 7th like: WINSYSDIR
  1814. #>>>>>>>>&0 leshort x #%u
  1815. #>>>>>>>>&2 pstring/h x %s
  1816. # ... LOGHANDLE
  1817. >0 ubelong x ...
  1818. #
  1819. # Summary: Microsoft Remote Desktop Protocol connection
  1820. # From: Joerg Jenderek
  1821. # URL: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files
  1822. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/r/rdp.trid.xml
  1823. # Note: called "Remote Desktop Connection Settings" by TrID
  1824. 0 string screen\040mode\040id:i: Remote Desktop Protocol connection
  1825. #!:mime text/plain
  1826. !:mime text/x-ms-rdp
  1827. !:ext rdp
  1828. # Screen mode: 1~session appear in a window 2~session appear full screen
  1829. >17 string 1 \b, window mode
  1830. >17 string 2 \b, full screen mode
  1831. 0 guid 7B5C52E4-D88C-4DA7-AEB1-5378D02996D3 Microsoft OneNote
  1832. !:ext one
  1833. !:mime application/onenote
  1834. 0 guid 43FF2FA1-EFD9-4C76-9EE2-10EA5722765F Microsoft OneNote Revision Store File
  1835. # Microsoft XAML Binary Format
  1836. # From: Alexandre Iooss <erdnaxe@crans.org>
  1837. # URL: https://github.com/WalkingCat/XbfDump/blob/8832d2ffcaa738434d803fefa2ba99d3af37ed29/xbf_data.h
  1838. 0 string XBF\0
  1839. >12 ulelong <0xFF
  1840. >>16 ulelong <0xFF Microsoft XAML Binary Format
  1841. !:ext xbf
  1842. >>>12 ulelong x %d
  1843. >>>16 ulelong x \b.%d
  1844. >>>4 ulelong x \b, metadata size: %d bytes
  1845. >>>8 ulelong x \b, node size: %d bytes
  1846. # Metaswitch MetaView Service Assurance Server exports
  1847. 0 string MetaView\x20Service\x20Assurance\x20Export\x20File MetaView SAS export
  1848. >39 string Version\x20
  1849. >>47 byte x \b, version %c
  1850. # Active Directory Group Policy Registry Policy File Format
  1851. # From: Yuuta Liang <yuuta@yuuta.moe>
  1852. # URL: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/policy/registry-policy-file-format
  1853. 0 string PReg
  1854. >4 lelong x Group Policy Registry Policy, Version=%d
  1855. # Microsoft Type Library Format (.TLB file)
  1856. # Stores metadata on calling COM APIs (method parameters/etc)
  1857. # Exists in two formats: the original (SLTG aka Type 1) and a newer format (MSFT aka Type 2)
  1858. # SLTG: https://www.nationalarchives.gov.uk/PRONOM/fmt/1601
  1859. # MSFT: https://www.nationalarchives.gov.uk/PRONOM/fmt/1602
  1860. # (Pronom claims these formats are due to Borland, but that appears to be incorrect, Microsoft invented them.)
  1861. # The MSFT format is documented here: https://gist.github.com/djhohnstein/e4a346ee1506895000ca0fa93e5a0024
  1862. # Which is a copy of original: http://theircorp.byethost11.com/files/TypeLib.txt (but which displays incorrectly due to encoding issues)
  1863. # The MSFT format is generated by the Windows CreateTypeLib2 API: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-createtypelib2
  1864. # The SLTG format is generated by the Windows CreateTypeLib API: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-createtypelib
  1865. #
  1866. # Note type libraries can also be embedded as resources inside executables/DLL. No attempt is made here to detect that scenario.
  1867. # Legacy SLTG format
  1868. 0 string SLTG
  1869. >-36 string TYPELIB Type Library (legacy SLTG format)
  1870. # MSFT format
  1871. 0 string MSFT\x02\x00\x01\x00 Type Library (MSFT format)