Module: Rex::OLE

Defined in:
lib/rex/ole.rb,
lib/rex/ole/fat.rb,
lib/rex/ole/util.rb,
lib/rex/ole/clsid.rb,
lib/rex/ole/difat.rb,
lib/rex/ole/header.rb,
lib/rex/ole/stream.rb,
lib/rex/ole/minifat.rb,
lib/rex/ole/propset.rb,
lib/rex/ole/storage.rb,
lib/rex/ole/direntry.rb,
lib/rex/ole/directory.rb,
lib/rex/ole/substorage.rb

Defined Under Namespace

Classes: CLSID, DIFAT, DirEntry, Directory, FAT, Header, MiniFAT, Property, PropertySet, PropertySetStream, Storage, Stream, SubStorage, Util

Constant Summary collapse

BIG_ENDIAN =

misc util NOTE: the v1.1 spec says that everything “MUST be stored in little-endian byte order”

0xfeff
LITTLE_ENDIAN =
0xfffe
HDR_SZ =

constants for dealing with the header

512
SIG =

signatures

"\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1"
SIG_BETA =
"\x0e\x11\xfc\x0d\xd0\xcf\x11\xe0"
SECT_MAX =

sector types

0xfffffffa
SECT_DIF =
0xfffffffc
SECT_FAT =
0xfffffffd
SECT_END =
0xfffffffe
SECT_FREE =
0xffffffff
DIRENTRY_SZ =

directory entries

128
DIR_NOSTREAM =
0xffffffff
DIR_MAXREGSID =
0xfffffffa
STGTY_INVALID =

types

0
STGTY_STORAGE =
1
STGTY_STREAM =
2
STGTY_LOCKBYTES =
3
STGTY_PROPERTY =
4
STGTY_ROOT =
5
COLOR_RED =

for red/black tree

0
COLOR_BLACK =
1
STGM_READ =

constants for storages

0
STGM_WRITE =
1
STGM_READWRITE =
2
PID_DICTIONARY =

constants for property sets PropertyIds

0x00000000
PID_CODEPAGE =
0x00000001
PID_LOCALE =
0x80000000
PID_BEHAVIOR =
0x80000003
PIDSI_TITLE =

Well-known PropertyIds

0x02
PIDSI_SUBJECT =
0x03
PIDSI_AUTHOR =
0x04
PIDSI_KEYWORDS =
0x05
PIDSI_COMMENTS =
0x06
PIDSI_TEMPLATE =
0x07
PIDSI_LASTAUTHOR =
0x08
PIDSI_REVNUMBER =
0x09
PIDSI_EDITTIME =
0x0a
PIDSI_LASTPRINTED =
0x0b
PIDSI_CREATE_DTM =
0x0c
PIDSI_LASTSAVE_DTM =
0x0d
PIDSI_PAGECOUNT =
0x0e
PIDSI_WORDCOUNT =
0x0f
PIDSI_CHARCOUNT =
0x10
PIDSI_THUMBNAIL =
0x11
PIDSI_APPNAME =
0x12
PIDSI_DOC_SECURITY =
0x13
VT_EMPTY =

PropertyTypes

0x00
VT_NULL =
0x01
VT_I2 =
0x02
VT_I4 =
0x03
VT_R4 =
0x04
VT_R8 =
0x05
VT_CY =
0x06
VT_DATE =
0x07
VT_BSTR =
0x08
VT_ERROR =
0x0a
VT_BOOL =
0x0b
VT_VARIANT =

used with VT_VECTOR

0x0c
VT_DECIMAL =

0xd

0x0e
VT_I1 =

0xf

0x10
VT_UI1 =
0x11
VT_UI2 =
0x12
VT_UI4 =
0x13
VT_I8 =
0x14
VT_UI8 =
0x15
VT_INT =
0x16
VT_UINT =
0x17
VT_LPSTR =
0x1e
VT_LPWSTR =
0x1f
VT_FILETIME =

0x20-0x3f

0x40
VT_BLOB =
0x41
VT_STREAM =
0x42
VT_STORAGE =
0x43
VT_STREAMED_OBJ =
0x44
VT_STORED_OBJ =
0x45
VT_BLOB_OBJ =
0x46
VT_CF =

Clipboard Format

0x47
VT_CLSID =
0x48
VT_VERSIONED_STREAM =
0x49
VT_VECTOR =

Flags

0x1000
VT_ARRAY =

Requires OLE version >= 1

0x2000
FMTID_SummaryInformation =

Format IDs

"\xe0\x85\x9f\xf2\xf9\x4f\x68\x10\xab\x91\x08\x00\x2b\x27\xb3\xd9"
FMTID_DocSummaryInformation =
"\x02\xd5\xcd\xd5\x9c\x2e\x1b\x10\x93\x97\x08\x00\x2b\x2c\xf9\xae"
FMTID_UserDefinedProperties =
"\x05\xd5\xcd\xd5\x9c\x2e\x1b\x10\x93\x97\x08\x00\x2b\x2c\xf9\xae"
FMTID_GlobalInfo =
"\x00\x6f\x61\x56\x54\xc1\xce\x11\x85\x53\x00\xaa\x00\xa1\xf9\x5b"
FMTID_ImageContents =
"\x00\x64\x61\x56\x54\xc1\xce\x11\x85\x53\x00\xaa\x00\xa1\xf9\x5b"
FMTID_ImageInfo =
"\x00\x65\x61\x56\x54\xc1\xce\x11\x85\x53\x00\xaa\x00\xa1\xf9\x5b"
FMTID_PropertyBag =
"\x01\x18\x00\x20\xe6\x5d\xd1\x11\x8e\x38\x00\xc0\x4f\xb9\x38\x6d"