Skip to content

Apache HTTP Server

Overview

The Apache HTTP Server, colloquially called Apache, is free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.

Info

Access logs from Tomcat are compatible with the existing format Apache HTTP server. Catalina logs are not supported.

  • Vendor: Apache Software Foundation
  • Supported environment: On Premise
  • Version compatibility, if applicable: 2.4.51 and newer
  • Detection based on: Telemetry
  • Supported application or feature: Access and Error log monitoring

High-Level Architecture Diagram

  • Type of integration: Outbound (PUSH to Sekoia.io)
  • Schema

apache_http_server_architecture

Alternative

This will not be detailed in this documentation, but logs can also be sent directly to Sekoia.io over HTTPS using the Sekoia.io Endpoint Agent and the "Collect logs in files" method. This provides an alternative to the specified syslog collection method and may be preferable in certain environments.

Specification

Prerequisites

  • Resource:
    • Self-managed syslog forwarder
  • Network:
    • Outbound traffic allowed
  • Permissions:
    • Administrator or Root access to the Apache HTTP Server host
    • Root access to the Linux server with the syslog forwarder

Transport Protocol/Method

  • Indirect Syslog

Logs details

  • Supported functionalities: See section Overview
  • Supported type(s) of structure: Common Log Format (CLF), Combined Log Format (combined)
  • Supported verbosity level: Notice, Error

Note

Log levels are based on the taxonomy of RFC5424. Adapt according to the terminology used by the editor.

  • Default Log Location:
    • Access: /var/log/apache2/access.log
    • Error: /var/log/apache2/error.log

Step-by-Step Configuration Procedure

Instructions on the 3rd Party Solution

Forward Apache Logs to Sekoia.io

This setup guide will show you how to forward both your access and error logs to Sekoia.io by means of a syslog transport channel.

Detailed Procedure:

  1. Install and Configure Rsyslog:
  2. Ensure that the rsyslog package is installed on your server.
  3. Load the imfile module to read log files:

    $ModLoad imfile
    
  4. Configure Rsyslog to Monitor Apache Log Files:

  5. Add the following configuration to your rsyslog configuration file (usually found in /etc/rsyslog.conf or /etc/rsyslog.d/):

    # Error log
    $InputFileName /var/log/apache2/error.log
    $InputFileTag apache:
    $InputFileStateFile stat-apache-error
    $InputFileSeverity error
    $InputFileFacility local5
    $InputFilePollInterval 1
    $InputRunFileMonitor
    
    # Access log
    $InputFileName /var/log/apache2/access.log
    $InputFileTag apache:
    $InputFileStateFile stat-apache-access
    $InputFileSeverity notice
    $InputFileFacility local5
    $InputFilePollInterval 1
    $InputRunFileMonitor
    
  6. Forward Logs to a Concentrator:

  7. Configure rsyslog to forward logs to a syslog concentrator:

    *.* action(type="omfwd"
       target="<Concentrator_FQDN_or_IP>"
       port="<Remote_Port>"
       protocol="tcp"
       TCP_Framing="octet-counted"
    )
    

Note

If you encounter any issues during the configuration specified in this section "Instructions on the 3rd Party Solution," please do not hesitate to contact your editor. We also welcome any suggestions for improving our documentation to better serve your needs.

Instruction on Sekoia

Configure Your Intake

This section will guide you through creating the intake object in Sekoia, which provides a unique identifier called the "Intake key." The Intake key is essential for later configuration, as it references the Community, Entity, and Parser (Intake Format) used when receiving raw events on Sekoia.

  1. Go to the Sekoia Intake page.
  2. Click on the + New Intake button at the top right of the page.
  3. Search for your Intake by the product name in the search bar.
  4. Give it a Name and associate it with an Entity (and a Community if using multi-tenant mode).
  5. Click on Create.

Note

For more details on how to use the Intake page and to find the Intake key you just created, refer to this documentation.

Configure a forwarder

To forward events using syslog to Sekoia.io, you need to update the syslog header with the intake key you previously created. Here is an example of your message before the forwarder

<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% LOG RAW_MESSAGE
and after
<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% LOG [SEKOIA@53288 intake_key=\"YOUR_INTAKE_KEY\"] RAW_MESSAGE

To achieve this you can:

  • Use the Sekoia.io forwarder which is the official supported way to collect data using the syslog protocol in Sekoia.io. In charge of centralizing data coming from many equipments/sources and forwarding them to Sekoia.io with the apporpriated format, it is a prepackaged option. You only have to provide your intake key as parameter.
  • Use your own Syslog service instance. Maybe you already have an intance of one of these components on your side and want to reuse it in order to centralize data before forwarding them to Sekoia.io. When using this mode, you have to configure and maintain your component in order to respect the expected Sekoia.io format.

Warning

Only the Sekoia.io forwarder is officially supported. Other options are documented for reference purposes but do not have official support.

Raw Events Samples

In this section, you will find examples of raw logs as generated natively by the source. These examples are provided to help integrators understand the data format before ingestion into Sekoia.io. It is crucial for setting up the correct parsing stages and ensuring that all relevant information is captured.

127.0.0.1 - userfoo [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"
mydomain:443 1.2.3.4 - - [31/Jul/2024:16:41:52 +0200] "GET /test/integration/abcdefgh123456.js HTTP/1.1" 200 5771 "https://www.website.fr/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/10101010 Firefox/128.0" GoAway=- (107 47us) TLSv1.3 TLS_AES_256_GCM_SHA384
- 1234:567:abcd:890:1234:5678:abcd:9012 - - [01/Oct/2024:10:22:11 +0200] "GET /test.fr HTTP/1.1" 404 1450 "-" "-"
- 1.2.3.4 - - [01/Oct/2024:10:22:01 +0200] "GET / HTTP/1.1" 302 385 "-" "-"
1.2.3.4 (-) - - [01/Oct/2024:08:22:45 +0000] "POST /App/tests HTTP/1.1" 200 377 "https://app.testing.fr/App/6" "Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko"
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] client denied by server configuration: /export/home/live/ap/htdocs/test
[Fri Sep 09 10:42:29.902022 2011] [core:error] [pid 35708:tid 4328636416] [client 1.1.1.1] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Apr 15 15:44:09.056862 2024] [:error] [pid 2226090:tid 140123920336640] [client 1.2.3.4:53375] [client 1.2.3.4] ModSecurity: Warning. Match of "rx ^OPTIONS$" against "REQUEST_METHOD" required. [file "/etc/apache2/modsecurity/coreruleset/modsecurity_crs_21_protocol_anomalies.conf"] [line "36"] [id "960015"] [msg "Request Missing an Accept Header"] [severity "CRITICAL"] [hostname "web.example.org"] [uri "/fsms/fsmsh.dll"] [unique_id "111111111111111111111111111"]
[security2:error] [pid 11852:tid 4036848496] [client 1.1.1.1:35323] [client 1.1.1.1] ModSecurity: Warning. Pattern match "(?i)((?:=|U\\\\s*R\\\\s*L\\\\s*\\\\()\\\\s*[^>]*\\\\s*S\\\\s*C\\\\s*R\\\\s*I\\\\s*P\\\\s*T\\\\s*:|&colon;|[\\\\s\\\\S]allowscriptaccess[\\\\s\\\\S]|[\\\\s\\\\S]src[\\\\s\\\\S]|[\\\\s\\\\S]data:text\\\\/html[\\\\s\\\\S]|[\\\\s\\\\S]xlink:href[\\\\s\\\\S]|[\\\\s\\\\S]base64[\\\\s\\\\S]|[\\\\s\\\\S]xmlns[\\\\s\\\\S]|[\\\\s\\\\S]xht ..." at ARGS:__EVENTVALIDATION. [file "/usr/apache/conf/waf/modsecurity_crs_xss_attacks.conf"] [line "28"] [id "973338"] [rev "1"] [msg "XSS Filter - Category 3: Javascript URI Vector"] [data "Matched Data: kSrcX found within ARGS:__EVENTVALIDATION: /wEWZgKXrrj6DgKCwsjDDAKgoeW1DwKBkN74CAKv/cWXBgK//Oz1DQKM6ZIdApW x44CAon4rvAGAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs..."] [severity "CRITICAL"] [ver "OWASP_CRS/ [hostname "website.corp.net"] [uri "/Liste.aspx"] [unique_id "Xt2vlKC-YX738FovDc0GkwAAAAs"], referer: http://corp.net/Liste.aspx?ECRAN=REEL_MIXTE
[Thu Feb 29 11:47:27.072780 2024] [ssl:info] [pid 12596] [client 1.1.1.1:57535] AH01964: Connection to child 114 established (server app.corp.com:443)
[Thu Feb 29 14:23:43.643358 2024] [ssl:info] [pid 24237] (70014)End of file found: [client 1.1.1.1 :42114] AH01991: SSL input filter read failed.

Detection section

The following section provides information for those who wish to learn more about the detection capabilities enabled by collecting this intake. It includes details about the built-in rule catalog, event categories, and ECS fields extracted from raw events. This is essential for users aiming to create custom detection rules, perform hunting activities, or pivot in the events page.

The following Sekoia.io built-in rules match the intake Apache HTTP Server. 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 Apache HTTP Server on ATT&CK Navigator

Burp Suite Tool Detected

Burp Suite is a cybersecurity tool. When used as a proxy service, its purpose is to intercept packets and modify them to send them to the server. Burp Collaborator is a network service that Burp Suite uses to help discover many kinds of vulnerabilities (vulnerabilities scanner).

  • Effort: intermediate
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-2018-13379 Fortinet Exploit

Detects the successful exploitation of the Fortinet FortiOS CVE-2018-13379. This CVE is one of the most exploited CVEs since 2018. It is exploited by APT threat actors as well as cybercriminals. The exploitation of this CVE lead an unauthenticated user to get full access to FortiOS system file through SSL VPN via specially crafted HTTP resource requests. The exploit read /dev/cmdb/sslvpn_websession file, that contains login and passwords in (clear/text). An HTTP response status code = 200, means the file was successfully accessed. This vulnerability affects FortiOS 5.6.3 to 5.6.7 and FortiOS 6.0.0 to 6.0.4.

  • Effort: advanced
CVE-2019-0604 SharePoint

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

  • Effort: advanced
CVE-2019-11510 Pulse Secure Exploit

Detects the successful exploitation of the Pulse Secure vulnerability CVE-2019-11510. This CVE is one of the most exploited CVEs since 2019. It is exploited by diverse threat actors, leading sometimes in ransomware deployement among these groups: Maze, Conti, Egregor, DoppelPaymer, NetWalker and REvil. But also APT actors such as APT29. The exploitation of this CVE allows a remote, unauthenticated attacker to compromise a vulnerable VPN server. The attacker may be able to gain access to all active users and their plain-text credentials. It may also be possible for the attacker to execute arbitrary commands on each VPN client as it successfully connects to the VPN server. The exploit reads /etc/passwd file to get access to login and passwords in (clear/text). An HTTP response status code = 200, means the file was successfully accessed. This vulnerability affects 8.1R15.1, 8.2 before 8.2R12.1, 8.3 before 8.3R7.1, and 9.0 before 9.0R3.4 products.

  • Effort: elementary
CVE-2019-19781 Citrix NetScaler (ADC)

Detects CVE-2019-19781 exploitation attempt against Citrix NetScaler (ADC), Application Delivery Controller and Citrix Gateway Attack.

  • Effort: elementary
CVE-2019-2725 Oracle Weblogic Exploit

Detects the successful exploitation of a deserialization vulnerability in Oracle Weblogic Server, CVE-2019-2725. This vulnerability affects versions 10.X and 12.1.3 of WebLogic that have the components wls9_async_response.war and wls-wsat.war enabled. It is a remote code execution which can be exploited without authentication via HTTP. An HTTP response status code = 202, means the target is vulnerable, the analyst then has to look in depth to check if a webshell has been uploaded or something else has been done.

  • Effort: elementary
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-2020-5902 F5 BIG-IP Exploitation Attempts

Detects the exploitation attempt of the vulnerability found in F5 BIG-IP and described in CVE-2020-5902.

  • Effort: elementary
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
CVE-2021-34473 ProxyShell Attempt

Detects CVE-2021-34473 ProxyShell attempt against Microsoft Exchange Server, Remote Code Execution Vulnerability.

  • Effort: advanced
CVE-2021-41773 Apache 2.4.49 Path Traversal

Detects successful exploitation of the Apache Path Traversal CVE-2021-41773.

  • Effort: advanced
CVE-2021-43798 Grafana Directory Traversal

Grafana version 8.x has a 0day arbitrary file read (with no fix yet) based on a directory traversal vulnerability

  • Effort: intermediate
Cobalt Strike HTTP Default GET beaconing

Detects GET HTTP queries from known Cobalt Strike beacons (source code 4.3)

  • Effort: advanced
Cobalt Strike HTTP Default POST Beaconing

Detects POST HTTP queries from known Cobalt Strike beacons (source code 4.3)

  • Effort: advanced
Correlation Potential DNS Tunnel

Detects domain name which is longer than 95 characters. Long domain names are distinctive of DNS tunnels.

  • Effort: advanced
Covenant Default HTTP Beaconing

Detects potential Covenant communications through the user-agent and specific urls

  • Effort: intermediate
Cryptomining

Detection of domain names potentially related to cryptomining activities.

  • 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
Discord Suspicious Download

Discord is a messaging application. It allows users to create their own communities to share messages and attachments. Those attachments have little to no overview and can be downloaded by almost anyone, which has been abused by attackers to host malicious payloads.

  • Effort: intermediate
Download Files From Suspicious TLDs

Detects download of certain file types from hosts in suspicious TLDs

  • Effort: master
Dynamic DNS Contacted

Detect communication with dynamic dns domain. This kind of domain is often used by attackers. This rule can trigger false positive in non-controlled environment because dynamic dns is not always malicious.

  • Effort: master
EvilProxy Phishing Domain

Detects subdomains potentially generated by the EvilProxy adversary-in-the-middle phishing platform. Inspect the other subdomains of the domain to identify the landing page, and determine if the user submitted credentials. This rule has a small percentage of false positives on legitimate domains.

  • Effort: intermediate
Exfiltration Domain

Detects traffic toward a domain flagged as a possible exfiltration vector.

  • 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
GitLab CVE-2021-22205

Detects GitLab vulnerability CVE-2021-22205 exploitation success. It allows an attacker to do some remote code execution with user git. The HTTP return code 422 indicates a successfull exploitation.

  • Effort: intermediate
Koadic MSHTML Command

Detects Koadic payload using MSHTML module

  • Effort: intermediate
Login Brute-Force Successful On SentinelOne EDR Management Console

A user has attempted to login several times (brute-force) on the SentinelOne EDR Management Console and succeeded to login.

  • Effort: master
LokiBot Default C2 URL

Detects default C2 URL for trojan LokiBot

  • Effort: elementary
Nimbo-C2 User Agent

Nimbo-C2 Uses an unusual User-Agent format in its implants.

  • Effort: intermediate
Possible Malicious File Double Extension

Detects request to potential malicious file with double extension

  • Effort: elementary
Potential Bazar Loader User-Agents

Detects potential Bazar loader communications through the user-agent

  • Effort: elementary
Potential DNS Tunnel

Detects domain name which is longer than 95 characters. Long domain names are distinctive of DNS tunnels.

  • Effort: advanced
Potential Lemon Duck User-Agent

Detects LemonDuck user agent. The format used two sets of alphabetical characters separated by dashes, for example "User-Agent: Lemon-Duck-[A-Z]-[A-Z]".

  • Effort: elementary
Potential LokiBot User-Agent

Detects potential LokiBot communications through the user-agent

  • 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
Raccoon Stealer 2.0 Legitimate Third-Party DLL Download URL

Detects Raccoon Stealer 2.0 malware downloading legitimate third-party DLLs from its C2 server. These legitimate DLLs are used by the information stealer to collect data on the compromised hosts.

  • Effort: elementary
Remote Access Tool Domain

Detects traffic toward a domain flagged as a Remote Administration Tool (RAT).

  • Effort: master
Remote Monitoring and Management Software - AnyDesk

Detect artifacts related to the installation or execution of the Remote Monitoring and Management tool AnyDesk.

  • Effort: master
Remote Monitoring and Management Software - Atera

Detect artifacts related to the installation or execution of the Remote Monitoring and Management tool Atera.

  • Effort: master
SEKOIA.IO Intelligence Feed

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

  • Effort: elementary
Sekoia.io EICAR Detection

Detects observables in Sekoia.io CTI tagged as EICAR, which are fake samples meant to test detection.

  • Effort: master
SharePoint Authenticated SSRF

Detects succesful SSRF from an authenticated SharePoint user.

  • Effort: elementary
Suspicious Download Links From Legitimate Services

Detects users clicking on Google docs links to download suspicious files. This technique was used a lot by Bazar Loader in the past.

  • Effort: intermediate
Suspicious TOR Gateway

Detects suspicious TOR gateways. Gateways are often used by the victim to pay and decrypt the encrypted files without installing TOR. Tor intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.

  • Effort: advanced
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
TOR Usage Generic Rule

Detects TOR usage globally, whether the IP is a destination or source. TOR is short for The Onion Router, and it gets its name from how it works. TOR intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.

  • Effort: master
Telegram Bot API Request

Detects suspicious DNS queries to api.telegram.org used by Telegram Bots of any kind

  • Effort: advanced
TrevorC2 HTTP Communication

Detects TrevorC2 HTTP communication based on the HTTP request URI and the user-agent.

  • Effort: elementary

Event Categories

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

Data Source Description
Web application firewall logs modsecurity logs are analyzed and provide information on detected attacks on web applications
Web logs Apache logs provide many information like the connected client, the requested resource, the user agent or the response status.

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

Name Values
Kind ``
Category web
Type ``

Transformed Events Samples after Ingestion

This section demonstrates how the raw logs will be transformed by our parsers. It shows the extracted fields that will be available for use in the built-in detection rules and hunting activities in the events page. Understanding these transformations is essential for analysts to create effective detection mechanisms with custom detection rules and to leverage the full potential of the collected data.

{
    "message": "127.0.0.1 - userfoo [10/Oct/2000:13:55:36 -0700] \"GET /apache_pb.gif HTTP/1.0\" 200 2326 \"http://www.example.com/start.html\" \"Mozilla/4.08 [en] (Win98; I ;Nav)\"",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "success",
        "type": [
            "access"
        ]
    },
    "action": {
        "name": "GET",
        "outcome": "success",
        "properties": {
            "timestamp": "10/Oct/2000:13:55:36 -0700"
        }
    },
    "http": {
        "request": {
            "method": "GET",
            "referrer": "http://www.example.com/start.html"
        },
        "response": {
            "bytes": 2326,
            "status_code": 200
        },
        "version": "1.0"
    },
    "related": {
        "ip": [
            "127.0.0.1"
        ],
        "user": [
            "userfoo"
        ]
    },
    "source": {
        "address": "127.0.0.1",
        "ip": "127.0.0.1"
    },
    "url": {
        "original": "/apache_pb.gif",
        "path": "/apache_pb.gif"
    },
    "user": {
        "name": "userfoo"
    },
    "user_agent": {
        "device": {
            "name": "Other"
        },
        "name": "Other",
        "original": "Mozilla/4.08 [en] (Win98; I ;Nav)",
        "os": {
            "name": "Windows",
            "version": "98"
        }
    }
}
{
    "message": "mydomain:443 1.2.3.4 - - [31/Jul/2024:16:41:52 +0200] \"GET /test/integration/abcdefgh123456.js HTTP/1.1\" 200 5771 \"https://www.website.fr/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/10101010 Firefox/128.0\" GoAway=- (107 47us) TLSv1.3 TLS_AES_256_GCM_SHA384",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "success",
        "type": [
            "access"
        ]
    },
    "action": {
        "name": "GET",
        "outcome": "success",
        "properties": {
            "timestamp": "31/Jul/2024:16:41:52 +0200"
        }
    },
    "destination": {
        "address": "mydomain",
        "port": 443,
        "size_in_char": 0
    },
    "http": {
        "request": {
            "method": "GET"
        },
        "response": {
            "bytes": 5771,
            "status_code": 200
        },
        "version": "1.1"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4"
    },
    "url": {
        "original": "/test/integration/abcdefgh123456.js",
        "path": "/test/integration/abcdefgh123456.js"
    }
}
{
    "message": "- 1234:567:abcd:890:1234:5678:abcd:9012 - - [01/Oct/2024:10:22:11 +0200] \"GET /test.fr HTTP/1.1\" 404 1450 \"-\" \"-\"",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "failure",
        "type": [
            "access"
        ]
    },
    "action": {
        "name": "GET",
        "outcome": "failure",
        "properties": {
            "timestamp": "01/Oct/2024:10:22:11 +0200"
        }
    },
    "http": {
        "request": {
            "method": "GET"
        },
        "response": {
            "bytes": 1450,
            "status_code": 404
        },
        "version": "1.1"
    },
    "related": {
        "ip": [
            "1234:567:abcd:890:1234:5678:abcd:9012"
        ]
    },
    "source": {
        "address": "1234:567:abcd:890:1234:5678:abcd:9012",
        "ip": "1234:567:abcd:890:1234:5678:abcd:9012"
    },
    "url": {
        "original": "/test.fr",
        "path": "/test.fr"
    }
}
{
    "message": "- 1.2.3.4 - - [01/Oct/2024:10:22:01 +0200] \"GET / HTTP/1.1\" 302 385 \"-\" \"-\"",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "redirect",
        "type": [
            "access"
        ]
    },
    "action": {
        "name": "GET",
        "outcome": "redirect",
        "properties": {
            "timestamp": "01/Oct/2024:10:22:01 +0200"
        }
    },
    "http": {
        "request": {
            "method": "GET"
        },
        "response": {
            "bytes": 385,
            "status_code": 302
        },
        "version": "1.1"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4"
    },
    "url": {
        "original": "/",
        "path": "/"
    }
}
{
    "message": "1.2.3.4 (-) - - [01/Oct/2024:08:22:45 +0000] \"POST /App/tests HTTP/1.1\" 200 377 \"https://app.testing.fr/App/6\" \"Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko\"",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "success",
        "type": [
            "access"
        ]
    },
    "action": {
        "name": "POST",
        "outcome": "success",
        "properties": {
            "timestamp": "01/Oct/2024:08:22:45 +0000"
        }
    },
    "http": {
        "request": {
            "method": "POST",
            "referrer": "https://app.testing.fr/App/6"
        },
        "response": {
            "bytes": 377,
            "status_code": 200
        },
        "version": "1.1"
    },
    "related": {
        "ip": [
            "1.2.3.4"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4"
    },
    "url": {
        "original": "/App/tests",
        "path": "/App/tests"
    },
    "user_agent": {
        "device": {
            "name": "Other"
        },
        "name": "IE",
        "original": "Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko",
        "os": {
            "name": "Windows",
            "version": "8"
        },
        "version": "11.0"
    }
}
{
    "message": "127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] \"GET /apache_pb.gif HTTP/1.0\" 200 2326",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "success",
        "type": [
            "access"
        ]
    },
    "action": {
        "name": "GET",
        "outcome": "success",
        "properties": {
            "timestamp": "10/Oct/2000:13:55:36 -0700"
        }
    },
    "http": {
        "request": {
            "method": "GET"
        },
        "response": {
            "bytes": 2326,
            "status_code": 200
        },
        "version": "1.0"
    },
    "related": {
        "ip": [
            "127.0.0.1"
        ],
        "user": [
            "frank"
        ]
    },
    "source": {
        "address": "127.0.0.1",
        "ip": "127.0.0.1"
    },
    "url": {
        "original": "/apache_pb.gif",
        "path": "/apache_pb.gif"
    },
    "user": {
        "name": "frank"
    }
}
{
    "message": "[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] client denied by server configuration: /export/home/live/ap/htdocs/test",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "failure",
        "type": [
            "error"
        ]
    },
    "action": {
        "name": "error",
        "outcome": "failure",
        "outcome_reason": "client denied by server configuration: /export/home/live/ap/htdocs/test"
    },
    "related": {
        "ip": [
            "127.0.0.1"
        ]
    },
    "source": {
        "address": "127.0.0.1",
        "ip": "127.0.0.1"
    }
}
{
    "message": "[Fri Sep 09 10:42:29.902022 2011] [core:error] [pid 35708:tid 4328636416] [client 1.1.1.1] File does not exist: /usr/local/apache2/htdocs/favicon.ico",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "failure",
        "type": [
            "error"
        ]
    },
    "action": {
        "name": "error",
        "outcome": "failure",
        "outcome_reason": "/usr/local/apache2/htdocs/favicon.ico"
    },
    "process": {
        "id": 35708,
        "thread": {
            "id": 4328636416
        }
    },
    "related": {
        "ip": [
            "1.1.1.1"
        ]
    },
    "source": {
        "address": "1.1.1.1",
        "ip": "1.1.1.1"
    }
}
{
    "message": "[Mon Apr 15 15:44:09.056862 2024] [:error] [pid 2226090:tid 140123920336640] [client 1.2.3.4:53375] [client 1.2.3.4] ModSecurity: Warning. Match of \"rx ^OPTIONS$\" against \"REQUEST_METHOD\" required. [file \"/etc/apache2/modsecurity/coreruleset/modsecurity_crs_21_protocol_anomalies.conf\"] [line \"36\"] [id \"960015\"] [msg \"Request Missing an Accept Header\"] [severity \"CRITICAL\"] [hostname \"web.example.org\"] [uri \"/fsms/fsmsh.dll\"] [unique_id \"111111111111111111111111111\"]",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "failure",
        "type": [
            "error"
        ]
    },
    "action": {
        "name": "error",
        "outcome": "failure",
        "outcome_reason": "Request Missing an Accept Header",
        "properties": {
            "modsecmessage": "Match of \"rx ^OPTIONS$\" against \"REQUEST_METHOD\" required.",
            "rulefile": "/etc/apache2/modsecurity/coreruleset/modsecurity_crs_21_protocol_anomalies.conf",
            "ruleid": "960015",
            "ruleline": "36",
            "ruleseverity": "CRITICAL",
            "timestamp": "Mon Apr 15 15:44:09.056862 2024",
            "uniqueid": "111111111111111111111111111"
        },
        "type": "warning"
    },
    "destination": {
        "address": "web.example.org",
        "domain": "web.example.org",
        "registered_domain": "example.org",
        "size_in_char": 15,
        "subdomain": "web",
        "top_level_domain": "org"
    },
    "process": {
        "id": 2226090,
        "pid": 2226090,
        "thread": {
            "id": 140123920336640
        }
    },
    "related": {
        "hosts": [
            "web.example.org"
        ],
        "ip": [
            "1.2.3.4"
        ]
    },
    "source": {
        "address": "1.2.3.4",
        "ip": "1.2.3.4",
        "port": 53375
    },
    "url": {
        "original": "/fsms/fsmsh.dll",
        "path": "/fsms/fsmsh.dll"
    }
}
{
    "message": "[security2:error] [pid 11852:tid 4036848496] [client 1.1.1.1:35323] [client 1.1.1.1] ModSecurity: Warning. Pattern match \"(?i)((?:=|U\\\\\\\\s*R\\\\\\\\s*L\\\\\\\\s*\\\\\\\\()\\\\\\\\s*[^>]*\\\\\\\\s*S\\\\\\\\s*C\\\\\\\\s*R\\\\\\\\s*I\\\\\\\\s*P\\\\\\\\s*T\\\\\\\\s*:|&colon;|[\\\\\\\\s\\\\\\\\S]allowscriptaccess[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]src[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]data:text\\\\\\\\/html[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]xlink:href[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]base64[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]xmlns[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]xht ...\" at ARGS:__EVENTVALIDATION. [file \"/usr/apache/conf/waf/modsecurity_crs_xss_attacks.conf\"] [line \"28\"] [id \"973338\"] [rev \"1\"] [msg \"XSS Filter - Category 3: Javascript URI Vector\"] [data \"Matched Data: kSrcX found within ARGS:__EVENTVALIDATION: /wEWZgKXrrj6DgKCwsjDDAKgoeW1DwKBkN74CAKv/cWXBgK//Oz1DQKM6ZIdApW x44CAon4rvAGAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs...\"] [severity \"CRITICAL\"] [ver \"OWASP_CRS/ [hostname \"website.corp.net\"] [uri \"/Liste.aspx\"] [unique_id \"Xt2vlKC-YX738FovDc0GkwAAAAs\"], referer: http://corp.net/Liste.aspx?ECRAN=REEL_MIXTE",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "failure",
        "type": [
            "error"
        ]
    },
    "action": {
        "name": "error",
        "outcome": "failure",
        "outcome_reason": "XSS Filter - Category 3: Javascript URI Vector",
        "properties": {
            "modsecmessage": "Pattern match \"(?i)((?:=|U\\\\\\\\s*R\\\\\\\\s*L\\\\\\\\s*\\\\\\\\()\\\\\\\\s*[^>]*\\\\\\\\s*S\\\\\\\\s*C\\\\\\\\s*R\\\\\\\\s*I\\\\\\\\s*P\\\\\\\\s*T\\\\\\\\s*:|&colon;|[\\\\\\\\s\\\\\\\\S]allowscriptaccess[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]src[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]data:text\\\\\\\\/html[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]xlink:href[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]base64[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]xmlns[\\\\\\\\s\\\\\\\\S]|[\\\\\\\\s\\\\\\\\S]xht ...\" at ARGS:__EVENTVALIDATION.",
            "ruledata": "Matched Data: kSrcX found within ARGS:__EVENTVALIDATION: /wEWZgKXrrj6DgKCwsjDDAKgoeW1DwKBkN74CAKv/cWXBgK//Oz1DQKM6ZIdApW x44CAon4rvAGAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs9Q0CjOmSHQKv/cWXBgK//Oz1DQKM6ZIdAq/9xZcGAr/87PUNAozpkh0Cr/3FlwYCv/zs...",
            "rulefile": "/usr/apache/conf/waf/modsecurity_crs_xss_attacks.conf",
            "ruleid": "973338",
            "ruleline": "28",
            "rulerev": "1",
            "ruleseverity": "CRITICAL",
            "uniqueid": "Xt2vlKC-YX738FovDc0GkwAAAAs"
        },
        "type": "warning"
    },
    "destination": {
        "address": "website.corp.net",
        "domain": "website.corp.net",
        "registered_domain": "corp.net",
        "size_in_char": 16,
        "subdomain": "website",
        "top_level_domain": "net"
    },
    "process": {
        "id": 11852,
        "pid": 11852,
        "thread": {
            "id": 4036848496
        }
    },
    "related": {
        "hosts": [
            "website.corp.net"
        ],
        "ip": [
            "1.1.1.1"
        ]
    },
    "source": {
        "address": "1.1.1.1",
        "ip": "1.1.1.1",
        "port": 35323
    },
    "url": {
        "original": "/Liste.aspx",
        "path": "/Liste.aspx"
    }
}
{
    "message": "[Thu Feb 29 11:47:27.072780 2024] [ssl:info] [pid 12596] [client 1.1.1.1:57535] AH01964: Connection to child 114 established (server app.corp.com:443)",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "success",
        "type": [
            "info"
        ]
    },
    "action": {
        "name": "info",
        "outcome": "success",
        "outcome_reason": "Connection to child 114 established (server app.corp.com:443)"
    },
    "process": {
        "id": 12596
    },
    "related": {
        "ip": [
            "1.1.1.1"
        ]
    },
    "source": {
        "address": "1.1.1.1",
        "ip": "1.1.1.1",
        "port": 57535
    }
}
{
    "message": "[Thu Feb 29 14:23:43.643358 2024] [ssl:info] [pid 24237] (70014)End of file found: [client 1.1.1.1 :42114] AH01991: SSL input filter read failed.",
    "event": {
        "category": [
            "web"
        ],
        "outcome": "success",
        "type": [
            "info"
        ]
    },
    "action": {
        "name": "info",
        "outcome": "success",
        "outcome_reason": "SSL input filter read failed."
    },
    "process": {
        "id": 24237
    }
}

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
action.properties.matchoffset keyword
action.properties.modsecmessage keyword Modsecurity emitted message
action.properties.ruledata keyword Modsecurity rule data
action.properties.rulefile keyword Modsecurity rule file
action.properties.ruleid keyword Modsecurity rule line
action.properties.ruleline keyword Modsecurity rule line
action.properties.rulerev keyword Modsecurity rule revision
action.properties.ruleseverity keyword Modsecurity rule severity
action.properties.timestamp keyword Timestamp
action.properties.uniqueid keyword Unique ID
destination.address keyword Destination network address.
destination.domain keyword The domain name of the destination.
destination.port long Port of the destination.
destination.size_in_char number Size of the destination name
event.category keyword Event category. The second categorization field in the hierarchy.
http.request.method keyword HTTP request method.
http.request.referrer keyword Referrer for this HTTP request.
http.response.bytes long Total size in bytes of the response (body and headers).
http.response.status_code long HTTP response status code.
http.version keyword HTTP version.
process.id number Process ID (legacy)
process.pid long Process id.
process.thread.id long Thread ID.
source.domain keyword The domain name of the source.
source.ip ip IP address of the source.
source.port long Port of the source.
url.original wildcard Unmodified original url as seen in the event source.
user.name keyword Short name or login of the user.
user_agent.original keyword Unparsed user_agent string.

For more information on the Intake Format, please find the code of the Parser, Smart Descriptions, and Supported Events here.

Further readings