Skip to main content

LEEF

The Log Event Extended Format is an enterprise security event logging format created by IBM for QRadar. A LEEF record is a pipe-delimited header followed by an attribute section of key=value pairs.

DataStream converts to and from LEEF with the Normalize processor.

Message Format

A record consists of five header fields and an attribute section:

LEEF:1.0|Vendor|Product|Version|EventID|key=value<TAB>key=value ...
PositionHeader FieldECS SourceWritten When Absent
1LEEF Version-Always LEEF:1.0
2Vendorobserver.vendorUnknown
3Productobserver.productUnknown
4Versionobserver.version1.0
5Event IDevent.code0

Attributes are separated by a tab, sorted by key in ascending case-insensitive order.

Versions

The format has two versions, and DataStream treats them asymmetrically.

DirectionSupport
WritingLEEF:1.0 only
ReadingLEEF:1.0 and LEEF:2.0

LEEF 2.0 adds an optional sixth header field naming a custom attribute delimiter as a hexadecimal value such as x09. The parser reads that field and applies the delimiter it names, falling back to a tab when it is absent or unparseable.

Attribute Fields

The tables below give the LEEF attribute 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 QRadar's alternative attribute names are accepted.

Timestamp

ECS FieldLEEF Field
@timestampreceivedTime

Device

ECS FieldLEEF Field
device.nameName, disp
device.hostHost
device.requestRequest
device.osos
device.osversionosVersion
device.zonezone

Observer

ECS FieldLEEF Field
observer.vendordeviceVendor
observer.productdeviceProduct
observer.versiondeviceVersion
observer.namesys_name
observer.typedeviceType
observer.hostnameidentHostName
observer.ipidentSrc
observer.macidentMAC
observer.scopescope
observer.scope.idscopeId
observer.domaindeviceDnsDomain
observer.facilitydeviceFacility
observer.ntdomaindeviceNtDomain
observer.payloaddevicePayloadId
observer.process.iddeviceProcessId
observer.process.namedeviceProcessName
observer.nat.addressdeviceNatIpAddr
observer.timezonedeviceTimezone

Event

ECS FieldLEEF Field
event.idexternalId
event.original_uidoriginalUid
event.extidextId
event.codedeviceEventClassId
event.counteventCount
event.actionact
event.severitysev
event.outcomeoutcome
event.reasonreason
event.createddevTime
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 FieldLEEF Field
source.ipsrc
source.portsrcPort
source.hostnamesrcHost
source.service.namesrcSvc
source.nat.ipsrcPostNAT, srcPreNAT
source.nat.portsrcPostNATPort, srcPreNATPort
source.nat.interfaceDvcInboundInterface
source.domainsrcDnsDomain
source.interfacesrcInterface, in_if
source.macsrcMAC
source.user.namesuser
source.user.idsuid
source.process.nameresource
source.process.idresourceId
source.bytessrcBytes, sent_bytes
source.packetssrcPackets, sent_pkts
source.geo.countrycalCountryOrRegion
source.geo.citysourceGeoCity
source.geo.regionsourceGeoRegion
source.geo.locationsourceGeoLatitude, sourceGeoLongitude
source.user.emailsmail
source.user.groupsntdom
source.user.rolesspriv

Destination

ECS FieldLEEF Field
destination.namedstName
destination.ipdst
destination.portdstPort
destination.service.namedstSvc
destination.nat.ipdstPostNAT, dstPreNAT
destination.nat.portdstPostNATPort, dstPreNATPort
destination.nat.interfacedstInterface
destination.domaindestinationDnsDomain
destination.domain_typedstDomainType
destination.interfacedstInterface, out_if
destination.hostdstHost
destination.hostnamedstHostName
destination.fqdndstFQDN
destination.macdstMAC
destination.user.nameduser
destination.user.idduid
destination.process.namedproc
destination.process.iddpid
destination.bytesdstBytes, rcvd_bytes
destination.packetsdstPackets, rcvd_pkts
destination.geo.countrydntry
destination.geo.citydestinationGeoCity
destination.geo.regiondestinationGeoRegion
destination.geo.locationdestinationGeoLatitude, destinationGeoLongitude
destination.user.emaildmail
destination.user.groupdntdom
destination.user.rolesdpriv

Network

ECS FieldLEEF Field
network.protocolapp
network.transportproto
network.typedeviceDirection
network.applicationappName
network.bytestotalBytes
network.packetstotalPackets
network.directiondeviceDirection
network.community_iddeviceCommunityId
network.forwardeddeviceForwardingStatus
network.vlandeviceVlan

File

ECS FieldLEEF Field
file.idfileId
file.pathfilePath
file.namefname
file.typeftype
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.idoldFileId
old_file.patholdFilePath
old_file.nameoldFname
old_file.typeoldFtype
old_file.sizeoldFsize
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 FieldLEEF Field
http.request.methodrequestMethod
http.response.status_coderesponseStatus
http.request.body.contentrequestBody
http.response.body.contentresponseBody
http.request.cookiesrequestCookies
http.request.referrerrequestContext
url.originalrequestOriginal
url.categoryrequestCategory
url.domainrequestClientApplication
url.fullrequest

Process

ECS FieldLEEF 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 FieldLEEF Field
user.typeuserType
user.iduid
user.nameuser
user.user_typeuserPrivileges
user.domainntdom
user.emailmail
user.group.idgid
user.group.namegroup

User Agent

ECS FieldLEEF Field
user_agent.nameuserAgent
user_agent.versionuserAgentVersion

Threat Intelligence

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

Registry

ECS FieldLEEF Field
registry.keyregistryKey
registry.valueregistryValue
registry.dataregistryData

DNS

ECS FieldLEEF Field
dns.answers.classanswerClass
dns.answers.nameanswerName
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 FieldLEEF Field
rule.authorruleAuthor
rule.categoryruleCategory
rule.descriptionruleDescription
rule.idruleID
rule.licenseruleLicense
rule.nameruleName
rule.referenceruleReference
rule.rulesetruleSet
rule.uuidruleUUID
rule.versionruleVersion

Message

ECS FieldLEEF Field
messagemsg

Syslog

ECS FieldLEEF 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 FieldLEEF Field
leef.versionleefVersion
leef.nameleefName
cef.versioncefVersion
cef.namecefName

Custom Fields

ECS FieldLEEF 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 FieldLEEF Field
additional.extensionsadditionalExtensions

Severity

DataStream applies no severity default when writing LEEF—a record whose source carries no event.severity simply has no sev attribute.

The Microsoft Sentinel content pack does set one, on an inverted four-point scale where 1 is the most severe:

sevMeaning
1High
2Medium
3Low
4Informational

This is narrower than QRadar's own 1–10 ascending scale, and applies only to events passing through that pack.

Limitations

  • Values are not escaped on write. An attribute value containing a tab breaks the record into extra attributes when it is read back. There is no quoting mechanism.
  • devTime format depends on the pipeline. The general conversion writes Unix epoch seconds and removes devTimeFormat; the Microsoft Sentinel pack writes an ISO 8601 string and sets devTimeFormat to yyyy-MM-dd'T'HH:mm:ssz.
  • Several ECS fields share one attribute. file.hash and its four algorithm-specific variants all produce fileHash; processHash and oldFileHash behave the same way. Converting back yields the base field.
  • Geographic coordinates lose longitude. source.geo.location and destination.geo.location list a latitude and a longitude key, and only the first is written.