Skip to main content

CEF

The Common Event Format is a standardized security event logging layout created by ArcSight and widely adopted across the industry. A CEF record is a pipe-delimited header followed by an extension section of key=value pairs.

DataStream converts to and from CEF with the Normalize processor.

Message Format

A record consists of seven header fields and an extension section:

CEF:0|Device Vendor|Device Product|Device Version|Device Event Class ID|Name|Severity|key=value key=value ...
PositionHeader FieldECS SourceWritten When Absent
1Version-Always CEF:0
2Device Vendorobserver.vendorUnknown
3Device Productobserver.productUnknown
4Device Versionobserver.version1.0
5Device Event Class IDevent.code0
6Namedevice.nameUnknown Event
7Severityevent.severity5

All seven header positions are always written—a missing value is filled with the default above rather than left empty.

The version is written as CEF:0. When reading, the parser accepts any integer in that position and preserves it, so records arriving with another version are not rejected.

Extension pairs are separated by a single space, sorted by key in ascending case-insensitive order.

Extension Fields

The tables below give the CEF key produced for each ECS field.

An ECS field not listed here is still written out. Its dotted path is condensed into a single camel-case key, so network.user becomes networkUser. No field is dropped for being unmapped.

Where two keys are shown, the first is the one written. Both are recognized when reading, which is how alternative vendor spellings are accepted.

Timestamp

ECS FieldCEF Field
@timestampreceivedTime

Device

ECS FieldCEF Field
device.nameName
device.hostHost
device.requestRequest
device.osdeviceOs
device.osversiondeviceOsVersion
device.zonedeviceZone

Observer

ECS FieldCEF Field
observer.vendorDeviceVendor
observer.productDeviceProduct
observer.versionDeviceVersion
observer.namedeviceExternalId
observer.typedeviceIdType
observer.hostnamedvchost
observer.ipdvc
observer.macdvcmac
observer.scopescope
observer.scope.idscopeId
observer.domaindeviceDnsDomain
observer.facilitydeviceFacility
observer.ntdomaindeviceNtDomain
observer.payloaddevicePayloadId
observer.process.iddvcpid
observer.process.namedeviceProcessName
observer.nat.addressdeviceTranslatedAddress
observer.timezonedtz

Event

ECS FieldCEF Field
event.ideventId
event.original_uideventOriginalUid
event.extidexternalId
event.codeDeviceEventClassID
event.countcnt
event.actionact
event.severitySeverity
event.outcomeoutcome
event.reasonreason
event.createdrt
event.startstart
event.endend
event.timezonetz
event.typetype
event.modulemodule
event.categorycat
event.kindkind
event.durationduration
event.hasheventHash
event.originalrawEvent
event.risk_scoreagentSeverity
event.datasetdataset
event.schemaschema
event.schema_versionschemaVersion
event.ownerowner

Source

ECS FieldCEF Field
source.ipsrc
source.portspt
source.hostnameshost
source.service.namesourceServiceName
source.nat.ipsourceTranslatedAddress
source.nat.portsourceTranslatedPort
source.nat.interfacesourceTranslatedInterface
source.domainsourceDnsDomain
source.interfacedeviceInboundInterface
source.macsmac
source.user.namesuser
source.user.idsuid, uid
source.process.namesproc
source.process.idspid
source.bytesin
source.packetssourceTranslatedPackets
source.geo.countrysntry
source.geo.citysourceGeoCity
source.geo.regionsourceGeoRegion
source.geo.locationsourceGeoLatitude, sourceGeoLongitude
source.user.emailsmail
source.user.groupsntdom
source.user.rolesspriv

Destination

ECS FieldCEF Field
destination.namedstName
destination.ipdst
destination.portdpt
destination.service.namedestinationServiceName
destination.nat.ipdestinationTranslatedAddress
destination.nat.portdestinationTranslatedPort
destination.nat.interfacedestinationTranslatedInterface
destination.domaindestinationDnsDomain
destination.domain_typedestinationDnsDomainType
destination.interfacedeviceOutboundInterface
destination.hostdhostName
destination.hostnamedhost
destination.fqdndhostFQDN
destination.macdmac
destination.user.nameduser
destination.user.idduid
destination.process.namedproc
destination.process.iddpid
destination.bytesout
destination.packetsdestinationTranslatedPackets
destination.geo.countrydntry
destination.geo.citydestinationGeoCity
destination.geo.regiondestinationGeoRegion
destination.geo.locationdestinationGeoLatitude, destinationGeoLongitude
destination.user.emaildmail
destination.user.groupdntdom
destination.user.rolesdpriv

Network

ECS FieldCEF Field
network.protocolapp
network.transportproto
network.typedeviceType
network.applicationappName
network.bytestotal
network.packetspa
network.directiondeviceDirection
network.community_iddeviceCommunityId
network.forwardeddeviceForwardingStatus
network.vlandeviceVlan

File

ECS FieldCEF Field
file.idfileId
file.pathfilePath
file.typefileType
file.namefname
file.sizefsize
file.hashfileHash
file.createdfileCreateTime
file.mtimefileModificationTime
file.extensionfileExtension
file.mime_typefileMimeType
file.directoryfileDirectory
file.hash.md5fileHash
file.hash.sha1fileHash
file.hash.sha256fileHash
file.hash.sha512fileHash

Old File

ECS FieldCEF Field
old_file.idoldFileId
old_file.patholdFilePath
old_file.typeoldFileType
old_file.nameoldFileName
old_file.sizeoldFileSize
old_file.hasholdFileHash
old_file.createdoldFileCreateTime
old_file.mtimeoldFileModificationTime
old_file.extensionoldFileExtension
old_file.mime_typeoldFileMimeType
old_file.directoryoldFileDirectory
old_file.hash.md5oldFileHash
old_file.hash.sha1oldFileHash
old_file.hash.sha256oldFileHash
old_file.hash.sha512oldFileHash

HTTP and URL

ECS FieldCEF Field
http.request.methodrequestMethod
http.response.status_coderesponseStatus
http.request.body.contentrequestBody
http.response.body.contentresponseBody
http.request.referrerrequestContext
http.request.cookiesrequestCookies
url.originalrequestOriginal
url.categoryrequestCategory
url.domainrequestClientApplication
url.fullrequest

Process

ECS FieldCEF Field
process.nameprocessName
process.pidprocessId
process.argsprocessCommandLine
process.titleprocessTitle
process.executableprocessExecutable
process.working_directoryprocessPath
process.hash.md5processHash
process.hash.sha1processHash
process.hash.sha256processHash
process.parent.nameprocessParentName
process.parent.pidprocessParentId
process.parent.argsprocessParentCommandLine

User

ECS FieldCEF Field
user.typeuType
user.iduserId
user.nameuser
user.user_typeuserType
user.domainntdom
user.emailmail
user.group.idgid
user.group.namegroup

User Agent

ECS FieldCEF Field
user_agent.nameHttpUserAgent
user_agent.versionHttpUserAgentVersion

Threat Intelligence

ECS FieldCEF Field
threat.frameworkthreatFramework
threat.tactic.namethreatDescription
threat.indicator.ipthreatIp
threat.indicator.typethreatType

Registry

ECS FieldCEF Field
registry.keyregistryKey
registry.valueregistryValue
registry.dataregistryData

DNS

ECS FieldCEF Field
dns.answers.classanswerClass
dns.answers.ttlanswerTTL
dns.answers.typeanswerType
dns.header_flagsdnsFlags
dns.iddnsID
dns.op_codeopCode
dns.question.classqueryClass
dns.question.namequeryName
dns.question.registered_domainregisteredDomain
dns.question.subdomainsubdomain
dns.question.top_level_domaintopLevelDomain
dns.question.typequeryType
dns.resolved_ipresolvedIP
dns.response_coderesponseCode
dns.typednsType

Rule

ECS FieldCEF Field
rule.authorruleAuthor
rule.categoryruleCategory
rule.descriptionruleDescription
rule.idruleID
rule.licenseruleLicense
rule.nameruleName
rule.referenceruleReference
rule.rulesetruleSet
rule.uuidruleUUID
rule.versionruleVersion

Message

ECS FieldCEF Field
messagemsg

Syslog

ECS FieldCEF Field
log.syslog.appnamesyslogAppName
log.syslog.facility.codesyslogFacilityCode
log.syslog.facility.namesyslogFacilityName
log.syslog.hostnamesyslogHostname
log.syslog.prioritysyslogPriority
log.syslog.procidsyslogProcessId
log.syslog.severity.codesyslogSeverityCode
log.syslog.severity.namesyslogSeverityName
log.syslog.structured_datasyslogMsg

Format Identification

ECS FieldCEF Field
leef.versionleefVersion
leef.nameleefName
cef.versionCefVersion
cef.nameCefName

Custom Fields

ECS FieldCEF Field
cef.device_custom_string_1.valuecs1
cef.device_custom_string_1.labelcs1Label
cef.device_custom_string_2.valuecs2
cef.device_custom_string_2.labelcs2Label
cef.device_custom_string_3.valuecs3
cef.device_custom_string_3.labelcs3Label
cef.device_custom_string_4.valuecs4
cef.device_custom_string_4.labelcs4Label
cef.device_custom_string_5.valuecs5
cef.device_custom_string_5.labelcs5Label
cef.device_custom_string_6.valuecs6
cef.device_custom_string_6.labelcs6Label
cef.device_custom_number_1.valuecn1
cef.device_custom_number_1.labelcn1Label
cef.device_custom_number_2.valuecn2
cef.device_custom_number_2.labelcn2Label
cef.device_custom_number_3.valuecn3
cef.device_custom_number_3.labelcn3Label
cef.device_custom_ipv6_address_1.valuec6a1
cef.device_custom_ipv6_address_1.labelc6a1Label
cef.device_custom_ipv6_address_2.valuec6a2
cef.device_custom_ipv6_address_2.labelc6a2Label
cef.device_custom_ipv6_address_3.valuec6a3
cef.device_custom_ipv6_address_3.labelc6a3Label
cef.device_custom_ipv6_address_4.valuec6a4
cef.device_custom_ipv6_address_4.labelc6a4Label
cef.device_custom_floating_point_1.valuecfp1
cef.device_custom_floating_point_1.labelcfp1Label
cef.device_custom_floating_point_2.valuecfp2
cef.device_custom_floating_point_2.labelcfp2Label
cef.device_custom_floating_point_3.valuecfp3
cef.device_custom_floating_point_3.labelcfp3Label
cef.device_custom_floating_point_4.valuecfp4
cef.device_custom_floating_point_4.labelcfp4Label
cef.flex_string_1flexString1
cef.flex_string_1_labelflexString1Label
cef.flex_string_2flexString2
cef.flex_string_2_labelflexString2Label
cef.flex_date_1flexDate1
cef.flex_date_1_labelflexDate1Label
cef.flex_number_1flexNumber1
cef.flex_number_1_labelflexNumber1Label
cef.flex_number_2flexNumber2
cef.flex_number_2_labelflexNumber2Label
cef.device_custom_date_1.valuedeviceCustomDate1
cef.device_custom_date_1.labeldeviceCustomDate1Label
cef.device_custom_date_2.valuedeviceCustomDate2
cef.device_custom_date_2.labeldeviceCustomDate2Label

Additional

ECS FieldCEF Field
additional.extensionsadditionalExtensions

Severity

The Severity header carries the value of event.severity unchanged, defaulting to 5. DataStream applies no numeric scale of its own and validates no range, so a source using names rather than numbers produces names in the header.

The Microsoft Sentinel content pack behaves differently: it moves severity into cs1 with cs1Label=Severity and removes the sev key entirely.

Limitations

  • Values are not escaped on write. A value containing |, = or ; is written literally, which can make the record split differently when it is read back. The parser does unescape \| and \=, so writing and reading are not symmetric.
  • Several ECS fields share one CEF key. file.hash, file.hash.md5, file.hash.sha1, file.hash.sha256 and file.hash.sha512 all produce fileHash; processHash and oldFileHash behave the same way. Converting back yields the base field, so the specific hash algorithm is not recoverable.
  • Geographic coordinates lose longitude. source.geo.location and destination.geo.location list a latitude and a longitude key, and only the first is written.