MS Exchange 2007 extended configuration file (.ecf)
.ecf file signature | application/octet-stream
MS Exchange 2007 extended configuration file
Magic Bytes
Offset 0
5B 47 65 6E 65 72 61 6C 5D 0D 0A 44 69 73 70 6C 61 79 20 4E 61 6D 65 3D 3C 44 69 73 70 6C 61 79 4E 61 6D 65
Sources: Gary Kessler
Extension
.ecf
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .ecf files in Python
def is_ecf(file_path: str) -> bool:
"""Check if file is a valid ECF by magic bytes."""
signature = bytes([0x5B, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x61, 0x6C, 0x5D, 0x0D, 0x0A, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x20, 0x4E, 0x61, 0x6D, 0x65, 0x3D, 0x3C, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x4E, 0x61, 0x6D, 0x65])
with open(file_path, "rb") as f:
return f.read(36) == signature
How to validate .ecf files in Node.js
function isECF(buffer: Buffer): boolean {
const signature = Buffer.from([0x5B, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x61, 0x6C, 0x5D, 0x0D, 0x0A, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x20, 0x4E, 0x61, 0x6D, 0x65, 0x3D, 0x3C, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x4E, 0x61, 0x6D, 0x65]);
return buffer.subarray(0, 36).equals(signature);
}
How to validate .ecf files in Go
func IsECF(data []byte) bool {
signature := []byte{0x5B, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x61, 0x6C, 0x5D, 0x0D, 0x0A, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x20, 0x4E, 0x61, 0x6D, 0x65, 0x3D, 0x3C, 0x44, 0x69, 0x73, 0x70, 0x6C, 0x61, 0x79, 0x4E, 0x61, 0x6D, 0x65}
if len(data) < 36 {
return false
}
return bytes.Equal(data[:36], signature)
}
API Endpoint
/api/v1/ecf
curl https://filesignature.org/api/v1/ecf
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .ecf file?
A .ecf file is a MS Exchange 2007 extended configuration file file. MS Exchange 2007 extended configuration file
What are the magic bytes for .ecf files?
The magic bytes for MS Exchange 2007 extended configuration file files are 5B 47 65 6E 65 72 61 6C 5D 0D 0A 44 69 73 70 6C 61 79 20 4E 61 6D 65 3D 3C 44 69 73 70 6C 61 79 4E 61 6D 65 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .ecf file?
To validate a .ecf file, read the first bytes of the file and compare them against the known magic bytes (5B 47 65 6E 65 72 61 6C 5D 0D 0A 44 69 73 70 6C 61 79 20 4E 61 6D 65 3D 3C 44 69 73 70 6C 61 79 4E 61 6D 65) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .ecf files?
There is no officially registered MIME type for .ecf files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .ecf files?
MS Exchange 2007 extended configuration file (.ecf) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.