Skip to content

Citrix Netscaler / ADC

Overview

Citrix NetScaler / ADC (formely Citrix NetScaler) is a delivery controller and load-balancing tool that offers enhanced security and application performance.

The following Sekoia.io built-in rules match the intake Citrix NetScaler / ADC. This documentation is updated automatically and is based solely on the fields used by the intake which are checked against our rules. This means that some rules will be listed but might not be relevant with the intake.

SEKOIA.IO x Citrix NetScaler / ADC on ATT&CK Navigator

Account Added To A Security Enabled Group

Detection in order to investigate who has added a specific Domain User in Domain Admins or Group Policy Creator Owners (Security event 4728)

  • Effort: master
Account Removed From A Security Enabled Group

Detection in order to investigate who has removed a specific Domain User in Domain Admins or Group Policy Creator Owners (Security event 4729)

  • Effort: master
CVE-2018-11776 Apache Struts2

Apache Struts versions 2.3 to 2.3.34 and 2.5 to 2.5.16 suffer from possible Remote Code Execution when alwaysSelectFullNamespace is true (either by user or a plugin like Convention Plugin) and then: results are used with no namespace and in same time, its upper package have no or wildcard namespace and similar to results, same possibility when using url tag which doesn't have value and action set and in same time, its upper package have no or wildcard namespace.

  • Effort: intermediate
CVE-2019-0604 SharePoint

Detects the exploitation of the SharePoint vulnerability (CVE-2019-0604).

  • Effort: advanced
CVE-2020-0688 Microsoft Exchange Server Exploit

Detects the exploitation of CVE-2020-0688. The POC exploit a .NET serialization vulnerability in the Exchange Control Panel (ECP) web page. The vulnerability is due to Microsoft Exchange Server not randomizing the keys on a per-installation basis resulting in them using the same validationKey and decryptionKey values. With knowledge of these, values an attacker can craft a special viewstate to use an OS command to be executed by NT_AUTHORITY\SYSTEM using .NET deserialization. To exploit this vulnerability, an attacker needs to leverage the credentials of an account it had already compromised to authenticate to OWA.

  • Effort: elementary
CVE-2020-1147 SharePoint

Detection of SharePoint vulnerability CVE-2020-1147.

  • Effort: advanced
CVE-2020-14882 Oracle WebLogic Server

Detects the exploitation of the Oracle WebLogic Server vulnerability (CVE-2020-16952).

  • Effort: advanced
CVE-2020-17530 Apache Struts RCE

Detects the exploitation of the Apache Struts RCE vulnerability (CVE-2020-17530).

  • Effort: intermediate
CVE-2021-20021 SonicWall Unauthenticated Administrator Access

Detects the exploitation of SonicWall Unauthenticated Admin Access.

  • Effort: advanced
CVE-2021-20023 SonicWall Arbitrary File Read

Detects Arbitrary File Read, which can be used with other vulnerabilities as a mean to obtain outputs generated by attackers, or sensitive data.

  • Effort: advanced
CVE-2021-21972 VMware vCenter

The vSphere Client (HTML5) contains a remote code execution vulnerability in a vCenter Server plugin. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.x before 7.0 U1c, 6.7 before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2 and 3.x before 3.10.1.2). POST request on the following PATH "/ui/vropspluginui/rest/services/uploadova". If in response body (500) the words it has "uploadFile", that means the vCenter is available to accept files via POST without any restrictions.

  • Effort: intermediate
CVE-2021-21985 VMware vCenter

The VMware vSphere Client (HTML5) contains a remote code execution vulnerability due to lack of input validation in the Virtual SAN Health Check plug-in which is enabled by default in vCenter Server. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.0 before 7.0 U2b, 6.7 before 6.7 U3n and 6.5 before 6.5 U3p) and VMware Cloud Foundation (4.x before 4.2.1 and 3.x before 3.10.2.1).

  • Effort: advanced
CVE-2021-22123 Fortinet FortiWeb OS Command Injection

Detects Fortinet FortiWeb OS Command Injection (August 2021) vulnerability exploitation attempt. A remote, authenticated attacker can execute arbitrary commands on the system hosting a vulnerable FortiWeb WAF by sending a POST request with the command in the name field. At the time of writing this rule, it would appear that the request would respond in code 500 for a successful exploitation attempt.

  • Effort: advanced
CVE-2021-22893 Pulse Connect Secure RCE Vulnerability

Detects potential exploitation of the authentication by-pass vulnerability that can allow an unauthenticated user to perform remote arbitrary file execution on the Pulse Connect Secure gateway. It is highly recommended to apply the Pulse Secure mitigations and seach for indicators of compromise on affected servers if you are in doubt over the integrity of your Pulse Connect Secure product.

  • Effort: intermediate
CVE-2021-26855 Exchange SSRF

Detects the exploitation of ProyxLogon vulerability on Exchange servers.

  • Effort: advanced
Computer Account Deleted

Detects computer account deletion.

  • Effort: master
Detect requests to Konni C2 servers

This rule detects requests to Konni C2 servers. These patterns come from an analysis done in 2022, September.

  • Effort: elementary
Domain Trust Created Or Removed

A trust was created or removed to a domain. An attacker could perform that in order to do lateral movement easily between domains or shutdown the ability of two domains to communicate.

  • Effort: advanced
Download Files From Suspicious TLDs

Detects download of certain file types from hosts in suspicious TLDs

  • Effort: master
Failed Logon Source From Public IP Addresses

A login from a public IP can indicate a misconfigured firewall or network boundary. The sekoia.tags are used to filter internal Ipv4 addresses (10.0.0.0/8 172.16.0.0/12 127.0.0.0/8 169.254.0.0/16 192.168.0.0/16).

  • Effort: master
FoggyWeb HTTP Default GET/POST Requests

Detects GET or POST request pattern observed within the first FoggyWeb campaign detected by Microsoft.

  • Effort: advanced
Koadic MSHTML Command

Detects Koadic payload using MSHTML module

  • Effort: intermediate
Password Change On Directory Service Restore Mode (DSRM) Account

The Directory Service Restore Mode (DSRM) account is a local administrator account on Domain Controllers. Attackers may change the password to gain persistence.

  • Effort: intermediate
Possible Malicious File Double Extension

Detects request to potential malicious file with double extension

  • Effort: elementary
Possible Replay Attack

This event can be a sign of Kerberos replay attack or, among other things, network device configuration or routing problems.

  • Effort: intermediate
Privilege Escalation Awesome Scripts (PEAS)

Detect PEAS privileges escalation scripts and binaries

  • Effort: elementary
ProxyShell Microsoft Exchange Suspicious Paths

Detects suspicious calls to Microsoft Exchange resources, in locations related to webshells observed in campaigns using this vulnerability.

  • Effort: elementary
SEKOIA.IO Intelligence Feed

Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.

  • Effort: elementary
Suspicious URI Used In A Lazarus Campaign

Detects suspicious requests to a specific URI, usually on an .asp page. The website is often compromised.

  • Effort: intermediate
User Account Created

Detects user creation on windows servers, which shouldn't happen in an Active Directory environment. Apply this on your windows server logs and not on your DC logs. One default account defaultuser0 is excluded as only used during Windows set-up. This detection use Security Event ID 4720.

  • Effort: master
User Account Deleted

Detects local user deletion

  • Effort: master

Event Categories

The following table lists the data source offered by this integration.

Data Source Description
Web proxy The NetScaler appliance logs provide information about the connected client and the requested resource
Web application firewall logs The NetScaler appliance logs provide information about the connected client and the requested resource

In details, the following table denotes the type of events produced by this integration.

Name Values
Kind alert
Category network
Type connection

Event Samples

Find below few samples of events and how they are normalized by Sekoia.io.

{
    "message": "09/29/2023:07:40:56 GMT ADC 0-PPE-1 : default AAATM Message 1111111111 0 :  \"AAA JSON-PARSE: ns_aaa_json_parser_StartElementHandler: NAME_VAL state, multi valued attribute start 'ConnectionId' seen\"",
    "event": {
        "category": [
            "network"
        ],
        "code": "Message",
        "dataset": "audit_aaatm",
        "reason": "\"AAA JSON-PARSE: ns_aaa_json_parser_StartElementHandler: NAME_VAL state, multi valued attribute start 'ConnectionId' seen\"",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-09-29T07:40:56Z",
    "observer": {
        "name": "ADC"
    }
}
{
    "message": "CEF:0|Citrix|NetScaler|NS13.1|APPFW|APPFW_MULTIPLE_HEADER|6|src=1.2.3.4 geolocation=Unknown spt=61903 method=GET request=https://www.example.org/services msg=Multiple headers in request cn1=3755128 cn2=1636674 cs1=WAF_PRF_RULE1 cs2=PPE1 cs4=ALERT cs5=2023 act=blocked",
    "event": {
        "action": "blocked",
        "category": [
            "network"
        ],
        "dataset": "alert",
        "kind": "alert",
        "reason": "Multiple headers in request",
        "type": [
            "denied"
        ]
    },
    "citrix": {
        "adc": {
            "alert": {
                "severity": "ALERT"
            }
        }
    },
    "http": {
        "request": {
            "method": "GET"
        }
    },
    "observer": {
        "product": "NetScaler",
        "vendor": "Citrix",
        "version": "NS13.1"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "rule": {
        "name": "WAF_PRF_RULE1"
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "port": 61903
    },
    "url": {
        "domain": "www.example.org",
        "original": "https://www.example.org/services",
        "path": "/services",
        "port": 443,
        "registered_domain": "example.org",
        "scheme": "https",
        "subdomain": "www",
        "top_level_domain": "org"
    }
}
{
    "message": "2023/07/04:09:03:46  ADC 0-PPE-2 : default TCP CONN_TERMINATE 4556618 0 :  Source 1.2.3.4:443 - Destination 5.6.7.8:43566 - Start Time 2023/07/04:09:03:46  - End Time 2023/07/04:09:03:46  - Total_bytes_send 473 - Total_bytes_recv 1",
    "event": {
        "category": [
            "network"
        ],
        "code": "CONN_TERMINATE",
        "dataset": "audit_connection",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:46Z",
    "citrix": {
        "adc": {
            "bytes": {
                "received": 1,
                "sent": 473
            }
        }
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8"
    },
    "observer": {
        "name": "ADC"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "5.6.7.8"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4"
    }
}
{
    "message": "2023/07/04:09:03:46  ADC 0-PPE-0 : default TCP CONN_TERMINATE 19695388 0 :  Source 1.2.3.4:5557 - Destination 5.6.7.8:39654 - Start Time 2023/07/04:09:03:01  - End Time 2023/07/04:09:03:46  - Total_bytes_send 1 - Total_bytes_recv 1",
    "event": {
        "category": [
            "network"
        ],
        "code": "CONN_TERMINATE",
        "dataset": "audit_connection",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:46Z",
    "citrix": {
        "adc": {
            "bytes": {
                "received": 1,
                "sent": 1
            }
        }
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8"
    },
    "observer": {
        "name": "ADC"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "5.6.7.8"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4"
    }
}
{
    "message": "2023/07/04:09:03:45  ADC 0-PPE-1 : default TCP CONN_DELINK 4356922 0 :  Source 1.2.3.4:13788 - Vserver 192.168.152.11:443 - NatIP 4.3.2.1:3198 - Destination 5.6.7.8:443 - Delink Time 2023/07/04:09:03:45  - Total_bytes_send 0 - Total_bytes_recv 762",
    "event": {
        "category": [
            "network"
        ],
        "code": "CONN_DELINK",
        "dataset": "audit_connection",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:45Z",
    "citrix": {
        "adc": {
            "bytes": {
                "received": 762,
                "sent": 0
            },
            "virtual_server": {
                "ip": "192.168.152.11",
                "port": "443"
            }
        }
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8"
    },
    "observer": {
        "name": "ADC"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "4.3.2.1",
            "5.6.7.8"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "nat": {
            "ip": "4.3.2.1"
        }
    }
}
{
    "message": "CEF:0|Citrix|NetScaler|NS13.1|APPFW|APPFW_POLICY_HIT|6|src=1.2.3.4 geolocation=Unknown spt=62919 method=GET request=https://www.example.org/services msg=Application Firewall profile invoked cn1=3864530 cn2=1644557 cs1=WAF_PRF_RULE1 cs2=PPE2 cs4=ALERT cs5=2023 act=not blocked",
    "event": {
        "action": "not blocked",
        "category": [
            "network"
        ],
        "dataset": "alert",
        "kind": "alert",
        "reason": "Application Firewall profile invoked",
        "type": [
            "allowed"
        ]
    },
    "citrix": {
        "adc": {
            "alert": {
                "severity": "ALERT"
            }
        }
    },
    "http": {
        "request": {
            "method": "GET"
        }
    },
    "observer": {
        "product": "NetScaler",
        "vendor": "Citrix",
        "version": "NS13.1"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "rule": {
        "name": "WAF_PRF_RULE1"
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "port": 62919
    },
    "url": {
        "domain": "www.example.org",
        "original": "https://www.example.org/services",
        "path": "/services",
        "port": 443,
        "registered_domain": "example.org",
        "scheme": "https",
        "subdomain": "www",
        "top_level_domain": "org"
    }
}
{
    "message": "\"2023/07/04:09:03:41  ADC 0-PPE-1 : default SNMP TRAP_SENT 0 0 :  appfwPolicyHit (appfwLogMsg = \"\"CEF:0|Citrix|NetScaler|NS13.1|APPFW|APPFW_POLI...\"\", nsPartitionName = default)\"",
    "event": {
        "category": [
            "network"
        ],
        "code": "TRAP_SENT",
        "dataset": "audit_snmp",
        "reason": "appfwPolicyHit (appfwLogMsg = \"\"CEF:0|Citrix|NetScaler|NS13.1|APPFW|APPFW_POLI...\"\", nsPartitionName = default)\"",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:41Z",
    "observer": {
        "name": "ADC"
    }
}
{
    "message": "\"2023/07/04:09:03:39  ADC 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_SUCCESS 19695351 0 :  SPCBId 1265452 - ClientIP 1.2.3.4 - ClientPort 50130 - VserverServiceIP 192.168.152.11 - VserverServicePort 443 - ClientVersion TLSv1.2 - CipherSuite \"\"TLS1.2-ECDHE-RSA-AES256-GCM-SHA384\"\" - Session New  - HandshakeTime 27 ms\"",
    "event": {
        "category": [
            "network"
        ],
        "code": "SSL_HANDSHAKE_SUCCESS",
        "dataset": "audit_ssl",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:39Z",
    "citrix": {
        "adc": {
            "virtual_server": {
                "ip": "192.168.152.11",
                "port": "443"
            }
        }
    },
    "observer": {
        "name": "ADC"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "port": 50130
    },
    "tls": {
        "cipher": "TLS1.2-ECDHE-RSA-AES256-GCM-SHA384",
        "version": "TLSv1"
    }
}
{
    "message": "\"2023/07/04:09:03:46  ADC 0-PPE-0 : default SSLVPN Message 19695397 0 :  \"\"SSLVPN Mux Authorize result is Deny, User <vpn17590>, Srcip: 1.2.3.4, Dstip: 5.6.7.8, denied_by_policy: SESSPOL_VPN_Remoteadmin\"\"\"",
    "event": {
        "category": [
            "network"
        ],
        "code": "Message",
        "dataset": "audit_sslvpn",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:46Z",
    "citrix": {
        "adc": {
            "message": "SSLVPN Mux Authorize result is Deny, User <vpn17590>, Srcip: 1.2.3.4, Dstip: 5.6.7.8, denied_by_policy: SESSPOL_VPN_Remoteadmin"
        }
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8"
    },
    "observer": {
        "name": "ADC"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "5.6.7.8"
        ],
        "user": [
            "vpn17590"
        ]
    },
    "rule": {
        "name": "SESSPOL_VPN_Remoteadmin"
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4"
    },
    "user": {
        "name": "vpn17590"
    }
}
{
    "message": "\"2023/07/04:09:03:39  ADC 0-PPE-0 : default SSLVPN NONHTTP_RESOURCEACCESS_DENIED 19695356 0 : Context vpn35939@91.170.235.67 - SessionId: 1286 - User vpn35939 - Client_ip 1.2.3.4 - Nat_ip 4.3.2.1 - Vserver 192.168.152.11:443 - Source 1.2.3.4:50130 - Destination 5.6.7.8:514 - Total_bytes_send 340 - Total_bytes_recv 0 - Denied_by_policy \"\"AUTHZ_DENY\"\"  - Group(s) \"\"vpndsin,vpndsin\"\"\"",
    "event": {
        "category": [
            "network"
        ],
        "code": "NONHTTP_RESOURCEACCESS_DENIED",
        "dataset": "audit_sslvpn",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-07-04T09:03:39Z",
    "citrix": {
        "adc": {
            "virtual_server": {
                "ip": "192.168.152.11",
                "port": "443"
            }
        }
    },
    "destination": {
        "address": "5.6.7.8",
        "ip": "5.6.7.8"
    },
    "observer": {
        "name": "ADC"
    },
    "related": {
        "ip": [
            "1.2.3.4",
            "4.3.2.1",
            "5.6.7.8"
        ],
        "user": [
            "vpn35939"
        ]
    },
    "rule": {
        "name": "AUTHZ_DENY"
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "nat": {
            "ip": "4.3.2.1"
        }
    },
    "user": {
        "name": "vpn35939"
    }
}
{
    "message": "\"12/07/2023:10:58:42 GMT CXA-GAT 0-PPE-0 : default SSLVPN Message 1521206 0 :  \"SSO ns_sslvpn_process_sso_conn: user john.doe@example.com clientip 1.2.3.7 request: /Citrix/CITRIXCGDWeb/clients/HTML5Client/resources/images/icon_clipboard.png sso_flags-0 p_flags-0 x_flags-200000 author_hdr_removed-0\"\"",
    "event": {
        "category": [
            "network"
        ],
        "code": "Message",
        "dataset": "audit_sslvpn",
        "type": [
            "connection"
        ]
    },
    "@timestamp": "2023-12-07T10:58:42Z",
    "citrix": {
        "adc": {
            "message": "SSO ns_sslvpn_process_sso_conn: user john.doe@example.com clientip 1.2.3.7 request: /Citrix/CITRIXCGDWeb/clients/HTML5Client/resources/images/icon_clipboard.png sso_flags-0 p_flags-0 x_flags-200000 author_hdr_removed-0"
        }
    },
    "client": {
        "address": "1.2.3.7",
        "ip": "1.2.3.7"
    },
    "observer": {
        "name": "CXA-GAT"
    },
    "related": {
        "ip": [
            "1.2.3.7"
        ],
        "user": [
            "john.doe"
        ]
    },
    "user": {
        "domain": "example.com",
        "name": "john.doe"
    }
}

Extracted Fields

The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.

Name Type Description
@timestamp date Date/time when the event originated.
citrix.adc.alert.severity keyword
citrix.adc.bytes.received long
citrix.adc.bytes.sent long
citrix.adc.message keyword
citrix.adc.virtual_server.ip keyword
citrix.adc.virtual_server.port keyword
client.ip ip IP address of the client.
destination.ip ip IP address of the destination.
event.action keyword The action captured by the event.
event.category keyword Event category. The second categorization field in the hierarchy.
event.code keyword Identification code for this event.
event.dataset keyword Name of the dataset.
event.kind keyword The kind of the event. The highest categorization field in the hierarchy.
event.reason keyword Reason why this event happened, according to the source
event.type keyword Event type. The third categorization field in the hierarchy.
http.request.method keyword HTTP request method.
observer.name keyword Custom name of the observer.
observer.product keyword The product name of the observer.
observer.vendor keyword Vendor name of the observer.
observer.version keyword Observer version.
rule.name keyword Rule name
source.ip ip IP address of the source.
source.nat.ip ip Source NAT ip
source.port long Port of the source.
tls.cipher keyword String indicating the cipher used during the current connection.
tls.version keyword Numeric part of the version parsed from the original string.
url.original wildcard Unmodified original url as seen in the event source.
user.domain keyword Name of the directory the user is a member of.
user.name keyword Short name or login of the user.

Configure

Prerequisites

  • Have an internal log concentrator
  • Have a NSLog server with the syslog protocol
  • Have an auditing module which runs on the NetScaler appliance.

Forward audit logs

Follow this guide to enable syslog forwarding for audit logs.

IMPORTANT: please make sure -dateFormat MMDDYYYY is set and date is present in logs

Forward Application Firewall logs

To enable application firewall logs forwarding, see this guide and apply the following command to convert Application Firewall logs into CEF events:

set appfw settings CEFLogging on

Create an intake

Go to the intake page and create a new intake from the format Citrix ADC.

Forward logs to Sekoia.io

Please consult the Syslog Forwarding documentation to forward these logs to Sekoia.io.

Further readings