Skip to content

Commit 6f0e62d

Browse files
[prisma_access] Handle Malformed URL and Parsing Issue (elastic#15005)
prisma_cloud: Handle malformed URL in CEF string and parsing issue in pipeline processors. Add `*.client.to_firewall_str` and `*.firewall_to_client_str` fields to capture original string values when boolean conversion fails in PanOSFirewallToClient and PanOSClientToFirewall fields. Add support for UNIX timestamp format in `*.time.not_after` and `*.time.not_before` fields. Handle malformed URL in CEF string. .
1 parent 683953e commit 6f0e62d

File tree

11 files changed

+542
-36
lines changed

11 files changed

+542
-36
lines changed

packages/prisma_access/_dev/deploy/docker/sample_logs/prisma_access.log

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

packages/prisma_access/changelog.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# newer versions go on top
2+
- version: "1.6.1"
3+
changes:
4+
- description: |
5+
Add `*.client.to_firewall_str` and `*.firewall_to_client_str` fields to capture original string values when
6+
boolean conversion fails in PanOSFirewallToClient and PanOSClientToFirewall fields.
7+
Add support for UNIX timestamp format in `*.time.not_after` and `*.time.not_before` fields.
8+
Handle malformed URL in CEF string.
9+
type: bugfix
10+
link: https://github.com/elastic/integrations/pull/15005
211
- version: "1.6.0"
312
changes:
413
- description: Remove duplicated installation instructions from the documentation

packages/prisma_access/data_stream/event/_dev/test/pipeline/test-event.json

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,139 @@
24012401
"id": "87f9bf9f-fdd4-45bb-9ca9-430522636747",
24022402
"name": "co8"
24032403
}
2404+
},
2405+
{
2406+
"@timestamp": "2024-07-23T08:40:42.542Z",
2407+
"ecs": {
2408+
"version": "8.0.0"
2409+
},
2410+
"log": {
2411+
"source": {
2412+
"address": "127.0.0.1:38456"
2413+
}
2414+
},
2415+
"input": {
2416+
"type": "tcp"
2417+
},
2418+
"event": {
2419+
"original": "Mar 1 24:35:56 175.16.199.1 2341 <14>1 2021-03-01T20:35:56.343Z stream-logfwd20-587718190-02280003-lvod-harness-mjdh logforwarder - panwlogs - CEF:0|Palo Alto Networks|LF|2.0|DECRYPTION|end|3|ProfileToken=xxxxx dtz=UTC rt=Mar 01 2021 20:35:54 PanOSDeviceSN=xxxxxxxxxxxxx PanOSConfigVersion=12.0 start=Mar 01 2021 20:35:54 src=175.16.199.3 dst=175.16.199.4 sourceTranslatedAddress=127.0.0.1 destinationTranslatedAddress=89.160.20.112 cs1=allow-all-employees cs1Label=Rule suser=paloaltonetwork\\\\\\\\xxxxx duser=paloaltonetwork\\\\\\\\xxxxx app=gmail-base cs3=vsys1 cs3Label=VirtualLocation cs4=datacenter cs4Label=FromZone cs5=ethernet4Zone-test1 cs5Label=ToZone deviceInboundInterface=ethernet1/1 deviceOutboundInterface=tunnel.901 cs6=test cs6Label=LogSetting PanOSTimeReceivedManagementPlane=Dec 12 2019 22:16:48 cn1=106112 cn1Label=SessionID cnt=1 spt=16524 dpt=20122 sourceTranslatedPort=15856 destinationTranslatedPort=10128 proto=tcp act=deny PanOSTunnel=N/A PanOSSourceUUID=00112233-4455-6677-8899-aabbccddeeff PanOSDestinationUUID=00112233-4455-xxxx-8899-aabbccddeeff PanOSRuleUUID=fnullacnullnulle1-2c69-4f2b-8293-46ee4c73737e PanOSClientToFirewall=Finished PanOSFirewallToClient=Finished PanOSTLSVersion=0.0 PanOSTLSKeyExchange=algo1 PanOSTLSEncryptionAlgorithm=alg2 PanOSTLSAuth=auth2 PanOSPolicyName=policy1 PanOSSanctionedStateofApp=true PanOSEllipticCurve=secp256r1 PanOSErrorIndex=1 PanOSRootStatus=close PanOSChainStatus=close PanOSProxyType=proxy1 PanOSCertificateSerial=0123456789ABCDEF0123456789ABCDEF PanOSFingerprint=D0:3A:9E:36:54:EC:91:6E:76:7F:A2:8C:BF:16:2E:82:65:32:AB:2B PanOSTimeNotBefore=Feb 20 2021 18:20:41 PanOSTimeNotAfter=Feb 28 2021 18:20:41 PanOSCertificateVersion=0.0 PanOSCertificateSize=0 PanOSCommonNameLength=0 PanOSIssuerNameLength=0 PanOSRootCNLength=0 PanOSSNILength=0 PanOSCertificateFlags=0 PanOSCommonName=cname1 PanOSIssuerCommonName=issuercn1 PanOSRootCommonName=rootuser PanOSServerNameIndication=indc PanOSErrorMessage=fault PanOSContainerID=12xc34r PanOSContainerNameSpace=default PanOSContainerName=web-server-container PanOSSourceEDL=https://example.com/sedl.txt PanOSDestinationEDL=https://sample.com/dedl.txt PanOSSourceDynamicAddressGroup=tag1 PanOSDestinationDynamicAddressGroup=test PanOSTimeGeneratedHighResolution=Jul 25 2019 23:30:12 PanOSSourceDeviceCategory=cat1 PanOSSourceDeviceProfile=prof1 PanOSSourceDeviceModel=model1 PanOSSourceDeviceVendor=panw PanOSSourceDeviceOSFamily=Windows PanOSSourceDeviceOSVersion=8.0 PanOSSourceDeviceHost=web-server-01.example.com PanOSSourceDeviceMac=839147449905 PanOSDestinationDeviceCategory=dcat1 PanOSDestinationDeviceProfile=dprof PanOSDestinationDeviceModel=dmod PanOSDestinationDeviceVendor=cortex PanOSDestinationDeviceOSFamily=Linux PanOSDestinationDeviceOSVersion=11.4 PanOSDestinationDeviceHost=web-server-02.example.com PanOSDestinationDeviceMac=150083646537 externalId=xxxxxxxxxxxxx"
2420+
},
2421+
"cef": {
2422+
"version": "0",
2423+
"device": {
2424+
"event_class_id": "DECRYPTION",
2425+
"vendor": "Palo Alto Networks",
2426+
"product": "LF",
2427+
"version": "2.0"
2428+
},
2429+
"name": "end",
2430+
"severity": "3",
2431+
"extensions": {
2432+
"sourceTranslatedAddress": "127.0.0.1",
2433+
"sourceTranslatedPort": 15856,
2434+
"PanOSCertificateSize": "0",
2435+
"PanOSErrorIndex": "1",
2436+
"deviceCustomString6": "test",
2437+
"PanOSTLSAuth": "auth2",
2438+
"PanOSDestinationDeviceOSVersion": "11.4",
2439+
"deviceCustomString6Label": "LogSetting",
2440+
"deviceCustomString3Label": "VirtualLocation",
2441+
"PanOSSourceDeviceOSFamily": "Windows",
2442+
"deviceCustomNumber1": 106112,
2443+
"PanOSRuleUUID": "fnullacnullnulle1-2c69-4f2b-8293-46ee4c73737e",
2444+
"PanOSSourceUUID": "00112233-4455-6677-8899-aabbccddeeff",
2445+
"PanOSCertificateFlags": "0",
2446+
"PanOSSNILength": "0",
2447+
"destinationUserName": "panw\\\\decuser",
2448+
"PanOSTLSEncryptionAlgorithm": "alg2",
2449+
"PanOSSourceDeviceVendor": "panw",
2450+
"PanOSContainerNameSpace": "default",
2451+
"PanOSCertificateVersion": "0.0",
2452+
"PanOSSourceDeviceOSVersion": "8.0",
2453+
"deviceAction": "deny",
2454+
"deviceCustomString1Label": "Rule",
2455+
"sourceUserName": "pan-w\\\\suser",
2456+
"PanOSServerNameIndication": "indc",
2457+
"PanOSErrorMessage": "fault",
2458+
"deviceInboundInterface": "ethernet1/1",
2459+
"PanOSConfigVersion": "12.0",
2460+
"deviceCustomString5Label": "ToZone",
2461+
"PanOSSourceDeviceMac": "839147449905",
2462+
"PanOSSourceDynamicAddressGroup": "tag1",
2463+
"deviceTimeZone": "UTC",
2464+
"PanOSTimeNotBefore": "Feb 20 2021 18:20:41",
2465+
"PanOSTLSVersion": "0.0",
2466+
"PanOSTimeNotAfter": "Feb 28 2021 18:20:41",
2467+
"destinationPort": 20122,
2468+
"deviceCustomString3": "vsys1",
2469+
"applicationProtocol": "gmail-base",
2470+
"PanOSContainerName": "web-server-container",
2471+
"PanOSTunnel": "N/A",
2472+
"destinationTranslatedAddress": "89.160.20.112",
2473+
"PanOSDeviceSN": "xxxxxxxxxxxxx",
2474+
"deviceCustomString5": "ethernet4Zone-test1",
2475+
"PanOSDestinationDeviceCategory": "dcat1",
2476+
"PanOSDestinationDeviceHost": "web-server-02.example.com",
2477+
"PanOSRootCommonName": "rootuser",
2478+
"PanOSDestinationUUID": "00112233-4455-xxxx-8899-aabbccddeeff",
2479+
"PanOSDestinationDeviceMac": "150083646537",
2480+
"deviceCustomString4": "datacenter",
2481+
"PanOSRootStatus": "close",
2482+
"PanOSFirewallToClient": "Finished",
2483+
"externalId": "xxxxxxxxxxxxx",
2484+
"PanOSDestinationDeviceProfile": "dprof",
2485+
"PanOSDestinationDeviceVendor": "cortex",
2486+
"PanOSCertificateSerial": "0123456789ABCDEF0123456789ABCDEF",
2487+
"PanOSChainStatus": "close",
2488+
"PanOSContainerID": "12xc34r",
2489+
"deviceCustomString1": "allow-all-employees",
2490+
"PanOSTLSKeyExchange": "algo1",
2491+
"destinationAddress": "175.16.199.4",
2492+
"PanOSDestinationDeviceModel": "dmod",
2493+
"ProfileToken": "xxxxx",
2494+
"PanOSIssuerCommonName": "issuercn1",
2495+
"deviceReceiptTime": "2021-03-01T20:35:54.000Z",
2496+
"PanOSCommonNameLength": "0",
2497+
"PanOSCommonName": "cname1",
2498+
"PanOSSourceDeviceCategory": "cat1",
2499+
"PanOSTimeReceivedManagementPlane": "Dec 12 2019 22:16:48",
2500+
"deviceCustomNumber1Label": "SessionID",
2501+
"PanOSRootCNLength": "0",
2502+
"PanOSDestinationEDL": "https://sample.com/dedl.txt",
2503+
"PanOSEllipticCurve": "secp256r1",
2504+
"PanOSTimeGeneratedHighResolution": "Jul 25 2019 23:30:12",
2505+
"PanOSSanctionedStateofApp": "true",
2506+
"PanOSSourceDeviceProfile": "prof1",
2507+
"deviceCustomString4Label": "FromZone",
2508+
"PanOSSourceDeviceModel": "model1",
2509+
"transportProtocol": "tcp",
2510+
"PanOSDestinationDeviceOSFamily": "Linux",
2511+
"PanOSDestinationDynamicAddressGroup": "test",
2512+
"PanOSPolicyName": "policy1",
2513+
"PanOSSourceDeviceHost": "web-server-01.example.com",
2514+
"startTime": "2021-03-01T20:35:54.000Z",
2515+
"deviceOutboundInterface": "tunnel.901",
2516+
"sourcePort": 16524,
2517+
"PanOSProxyType": "proxy1",
2518+
"destinationTranslatedPort": 10128,
2519+
"PanOSFingerprint": "D0:3A:9E:36:54:EC:91:6E:76:7F:A2:8C:BF:16:2E:82:65:32:AB:2B",
2520+
"PanOSIssuerNameLength": "0",
2521+
"PanOSClientToFirewall": "Finished",
2522+
"PanOSSourceEDL": "https://example.com/sedl.txt",
2523+
"baseEventCount": 1,
2524+
"sourceAddress": "175.16.199.3"
2525+
}
2526+
},
2527+
"host": {
2528+
"name": "localhost.localdomain"
2529+
},
2530+
"agent": {
2531+
"name": "localhost.localdomain",
2532+
"type": "filebeat",
2533+
"version": "8.15.0",
2534+
"ephemeral_id": "e340dcc7-d349-43f0-854b-5b2bb2bfe7e4",
2535+
"id": "ca5a0f57-cf05-496b-96ad-990351fce514"
2536+
}
24042537
}
24052538
]
24062539
}

0 commit comments

Comments
 (0)