Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/zscaler_zia/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.4.1"
changes:
- description: Remap network.protocol to valid values for web data stream.
type: bugfix
link: https://github.com/elastic/integrations/pull/4045
- version: "2.4.0"
changes:
- description: Update package to ECS 8.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
{ "sourcetype" : "zscalernss-web", "event" :{"time":"Fri Dec 31 07:07:07 2021","login":"test@example.com","proto":"HTTP","eurl":"www.example.com","action":"Blocked","appname":"General Browsing","appclass":"General Browsing","reqsize":"600","respsize":"65","stime":"0","ctime":"0","urlclass":"Business Use","urlsupercat":"Information Technology","urlcat":"Web Search","malwarecat":"None","threatname":"None","riskscore":"0","dlpeng":"None","dlpdict":"None","location":"Test DB","dept":"Unknown","cip":"81.2.69.193","sip":"89.160.20.112","reqmethod":"CONNECT","respcode":"200","ua":"Windows Microsoft Windows 10 Pro ZTunnel/1.0","ereferer":"None","ruletype":"FwFilter","rulelabel":"Zscaler Proxy Traffic","contenttype":"Other","unscannabletype":"None","deviceowner":"administrator1","devicehostname":"TestMachine35"}}
{ "sourcetype" : "zscalernss-web", "event" :{"time":"Fri Dec 31 07:07:07 2021","login":"test@example.com","proto":"HTTP","eurl":"www.example.com","action":"Blocked","appname":"General Browsing","appclass":"General Browsing","reqsize":"555","respsize":"65","stime":"0","ctime":"0","urlclass":"Business Use","urlsupercat":"Information Technology","urlcat":"Web Search","malwarecat":"None","threatname":"None","riskscore":"0","dlpeng":"None","dlpdict":"None","location":"Test DB","dept":"Unknown","cip":"81.2.69.193","sip":"81.2.69.144","reqmethod":"CONNECT","respcode":"200","ua":"Windows Microsoft Windows 10 Pro ZTunnel/1.0","ereferer":"None","ruletype":"FwFilter","rulelabel":"Zscaler Proxy Traffic","contenttype":"Other","unscannabletype":"None","deviceowner":"administrator1","devicehostname":"TestMachine35"}}
{ "sourcetype" : "zscalernss-web", "event" :{"time":"Fri Dec 31 07:07:07 2021","login":"test@example.com","proto":"HTTPS","eurl":"www.example.com.com/params?version=10.0.19041.1266&user=65792&Id=1","action":"Blocked","appname":"General Browsing","appclass":"General Browsing","reqsize":"297","respsize":"14135","stime":"0","ctime":"0","urlclass":"Business Use","urlsupercat":"Business and Economy","urlcat":"Corporate Marketing","malwarecat":"None","threatname":"None","riskscore":"0","dlpeng":"None","dlpdict":"None","location":"Test DB","dept":"Unknown","cip":"81.2.69.193","sip":"81.2.69.143","reqmethod":"GET","respcode":"403","ua":"Microsoft-Delivery-Optimization/10.0","ereferer":"None","ruletype":"FwFilter","rulelabel":"Access Blocked","contenttype":"Other","unscannabletype":"None","deviceowner":"administrator1","devicehostname":"TestMachine35"}}
{ "sourcetype" : "zscalernss-web", "event" :{"time":"Thu Aug 29 09:20:35 2022","login":"test@example.com","proto":"HTTP_PROXY","eurl":"www.example.com:443","action":"Allowed","appname":"General Browsing","appclass":"General Browsing","reqsize":"555","respsize":"65","stime":"0","ctime":"0","urlclass":"Business Use","urlsupercat":"Information Technology","urlcat":"Web Search","malwarecat":"None","threatname":"None","riskscore":"0","dlpeng":"None","dlpdict":"None","location":"Test","dept":"Unknown","cip":"81.2.69.193","sip":"89.160.20.112","reqmethod":"CONNECT","respcode":"200","ua":"Windows Microsoft Windows 10 Pro ZTunnel/1.0","ereferer":"None","ruletype":"None","rulelabel":"None","contenttype":"Other","unscannabletype":"None","deviceowner":"administrator1","devicehostname":"TestMachine35"}}
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,123 @@
}
}
}
},
{
"@timestamp": "2022-08-29T09:20:35.000Z",
"destination": {
"ip": "89.160.20.112"
},
"ecs": {
"version": "8.4.0"
},
"event": {
"action": "allowed",
"category": [
"web"
],
"kind": "event",
"original": "{ \"sourcetype\" : \"zscalernss-web\", \"event\" :{\"time\":\"Thu Aug 29 09:20:35 2022\",\"login\":\"test@example.com\",\"proto\":\"HTTP_PROXY\",\"eurl\":\"www.example.com:443\",\"action\":\"Allowed\",\"appname\":\"General Browsing\",\"appclass\":\"General Browsing\",\"reqsize\":\"555\",\"respsize\":\"65\",\"stime\":\"0\",\"ctime\":\"0\",\"urlclass\":\"Business Use\",\"urlsupercat\":\"Information Technology\",\"urlcat\":\"Web Search\",\"malwarecat\":\"None\",\"threatname\":\"None\",\"riskscore\":\"0\",\"dlpeng\":\"None\",\"dlpdict\":\"None\",\"location\":\"Test\",\"dept\":\"Unknown\",\"cip\":\"81.2.69.193\",\"sip\":\"89.160.20.112\",\"reqmethod\":\"CONNECT\",\"respcode\":\"200\",\"ua\":\"Windows Microsoft Windows 10 Pro ZTunnel/1.0\",\"ereferer\":\"None\",\"ruletype\":\"None\",\"rulelabel\":\"None\",\"contenttype\":\"Other\",\"unscannabletype\":\"None\",\"deviceowner\":\"administrator1\",\"devicehostname\":\"TestMachine35\"}}",
"risk_score": 0,
"type": [
"info"
]
},
"http": {
"request": {
"bytes": 555,
"method": "CONNECT",
"mime_type": "Other",
"referrer": "None"
},
"response": {
"bytes": 65,
"status_code": 200
}
},
"network": {
"protocol": "http_proxy"
},
"related": {
"hosts": [
"TestMachine35"
],
"ip": [
"81.2.69.193",
"89.160.20.112"
]
},
"rule": {
"name": "None",
"ruleset": "None"
},
"source": {
"nat": {
"ip": "81.2.69.193"
},
"user": {
"name": "administrator1"
}
},
"tags": [
"preserve_original_event"
],
"url": {
"domain": "www.example.com",
"full": "https://www.example.com:443",
"original": "https://www.example.com:443",
"port": 443,
"scheme": "https"
},
"user": {
"email": "test@example.com"
},
"user_agent": {
"device": {
"name": "Other"
},
"name": "Other",
"original": "Windows Microsoft Windows 10 Pro ZTunnel/1.0",
"os": {
"full": "Windows 10",
"name": "Windows",
"version": "10"
}
},
"zscaler_zia": {
"web": {
"app": {
"class": "General Browsing",
"name": "General Browsing"
},
"ctime": 0,
"department": "Unknown",
"device": {
"hostname": "TestMachine35"
},
"dpl": {
"dictionaries": "None",
"engine": "None"
},
"location": "Test",
"malware": {
"category": "None"
},
"stime": 0,
"threat": {
"name": "None"
},
"unscannable": {
"type": "None"
},
"url": {
"category": {
"sub": "Web Search",
"super": "Information Technology"
},
"class": "Business Use"
}
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ processors:
- remove:
field: json.respcode
ignore_missing: true
- rename:
field: json.proto
target_field: network.protocol
ignore_missing: true
- lowercase:
field: network.protocol
ignore_missing: true
- rename:
field: json.rulelabel
target_field: rule.name
Expand All @@ -131,11 +124,33 @@ processors:
field: json.ruletype
target_field: rule.ruleset
ignore_missing: true
- set:
if: ctx.network?.protocol != null && ctx.json?.eurl != null
field: json.url
value: "{{{network.protocol}}}://{{{json.eurl}}}"
ignore_failure: true
- rename:
field: json.proto
target_field: network.protocol
ignore_missing: true
- lowercase:
field: network.protocol
ignore_missing: true
- script:
description: Build URI for parsing
tag: Build URI for parsing
lang: painless
params:
valid_protocols:
- http
- https
default_protocol: https
source: |
if (ctx.network?.protocol == null || ctx.json?.eurl == null) {
return;
}

// Remap network.protocol to a valid value, if necessary.
if (params.valid_protocols.contains(ctx.network.protocol)) {
ctx.json["url"] = ctx.network.protocol + "://" + ctx.json.eurl;
} else {
ctx.json["url"] = params.default_protocol + "://" + ctx.json.eurl;
}
- uri_parts:
field: json.url
on_failure:
Expand Down
2 changes: 1 addition & 1 deletion packages/zscaler_zia/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 1.0.0
name: zscaler_zia
title: Zscaler Internet Access
version: 2.4.0
version: 2.4.1
license: basic
description: Collect logs from Zscaler Internet Access (ZIA) with Elastic Agent.
type: integration
Expand Down