Files
sigma-rules/rules/windows
Samirbous a0672c7d2a [New Rule] Potential Privileged Escalation via KrbRelayUp (#1940)
* [New Rule] Potential Privileged Escalation via KrbRelayUp

Identifies a suspicious local successful logon event where the Logon Package is kerberos, the remote address is set to localhost and the target user SID is the builtin local Administrator account, this may indicate an attempt to leverage a Kerberos relay attack variant that can be used to elevate privilege locally from filtered administrator token to a token with full System privileges.

https://github.com/Dec0ne/KrbRelayUp

DATA :

```
{
        "_index" : ".ds-logs-system.security-default-2022.04.12-000003",
        "_id" : "Cwy1YoABQhClK0XGfqEU",
        "_source" : {
          "agent" : {
            "name" : "02694w-win10",
            "id" : "77a829ec-a564-44d5-9bc4-61eeefbf783a",
            "type" : "filebeat",
            "ephemeral_id" : "6c751494-97a3-46aa-bab2-5baf01d17d04",
            "version" : "8.0.0"
          },
          "process" : {
            "name" : "-",
            "pid" : 0,
            "executable" : "-"
          },
          "winlog" : {
            "computer_name" : "02694w-win10.corpcorp.com",
            "process" : {
              "pid" : 688,
              "thread" : {
                "id" : 9384
              }
            },
            "keywords" : [
              "Audit Success"
            ],
            "logon" : {
              "id" : "0x0",
              "type" : "Network"
            },
            "channel" : "Security",
            "event_data" : {
              "LogonGuid" : "{daac0d7c-3273-752c-bf5d-ea1c60851819}",
              "TargetOutboundDomainName" : "-",
              "VirtualAccount" : "%%1843",
              "LogonType" : "3",
              "TransmittedServices" : "-",
              "SubjectLogonId" : "0x0",
              "LmPackageName" : "-",
              "TargetOutboundUserName" : "-",
              "KeyLength" : "0",
              "RestrictedAdminMode" : "-",
              "TargetLogonId" : "0xebd3d4",
              "SubjectUserName" : "-",
              "TargetLinkedLogonId" : "0x0",
              "ElevatedToken" : "%%1842",
              "SubjectDomainName" : "-",
              "TargetUserName" : "Administrator",
              "ImpersonationLevel" : "%%1833",
              "LogonProcessName" : "Kerberos",
              "TargetDomainName" : "CORPCORP.COM",
              "SubjectUserSid" : "S-1-0-0",
              "AuthenticationPackageName" : "Kerberos",
              "TargetUserSid" : "S-1-5-21-308926384-506822093-3341789130-500"
            },
            "opcode" : "Info",
            "version" : 2,
            "record_id" : "59063",
            "task" : "Logon",
            "event_id" : "4624",
            "provider_guid" : "{54849625-5478-4994-a5ba-3e3b0328c30d}",
            "activity_id" : "{e22af019-58dd-0002-43f0-2ae2dd58d801}",
            "api" : "wineventlog",
            "provider_name" : "Microsoft-Windows-Security-Auditing"
          },
          "log" : {
            "level" : "information"
          },
          "elastic_agent" : {
            "id" : "77a829ec-a564-44d5-9bc4-61eeefbf783a",
            "version" : "8.0.0",
            "snapshot" : false
          },
          "source" : {
            "port" : 50480,
            "ip" : "127.0.0.1",
            "domain" : "-"
          },
          "message" : """An account was successfully logged on.

Subject:
	Security ID:		S-1-0-0
	Account Name:		-
	Account Domain:		-
	Logon ID:		0x0

Logon Information:
	Logon Type:		3
	Restricted Admin Mode:	-
	Virtual Account:		No
	Elevated Token:		Yes

Impersonation Level:		Impersonation

New Logon:
	Security ID:		S-1-5-21-308926384-506822093-3341789130-500
	Account Name:		Administrator
	Account Domain:		CORPCORP.COM
	Logon ID:		0xEBD3D4
	Linked Logon ID:		0x0
	Network Account Name:	-
	Network Account Domain:	-
	Logon GUID:		{daac0d7c-3273-752c-bf5d-ea1c60851819}

Process Information:
	Process ID:		0x0
	Process Name:		-

Network Information:
	Workstation Name:	-
	Source Network Address:	127.0.0.1
	Source Port:		50480

Detailed Authentication Information:
	Logon Process:		Kerberos
	Authentication Package:	Kerberos
	Transited Services:	-
	Package Name (NTLM only):	-
	Key Length:		0

This event is generated when a logon session is created. It is generated on the computer that was accessed.

The subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).

The New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.

The network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The impersonation level field indicates the extent to which a process in the logon session can impersonate.

The authentication information fields provide detailed information about this specific logon request.
	- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.
	- Transited services indicate which intermediate services have participated in this logon request.
	- Package name indicates which sub-protocol was used among the NTLM protocols.
	- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.""",
          "input" : {
            "type" : "winlog"
          },
          "@timestamp" : "2022-04-25T21:07:15.306Z",
          "ecs" : {
            "version" : "1.12.0"
          },
          "related" : {
            "ip" : [
              "127.0.0.1"
            ],
            "user" : [
              "Administrator"
            ]
          },
          "data_stream" : {
            "namespace" : "default",
            "type" : "logs",
            "dataset" : "system.security"
          },
          "host" : {
            "hostname" : "02694w-win10",
            "os" : {
              "build" : "18363.815",
              "kernel" : "10.0.18362.815 (WinBuild.160101.0800)",
              "name" : "Windows 10 Enterprise",
              "family" : "windows",
              "type" : "windows",
              "version" : "10.0",
              "platform" : "windows"
            },
            "ip" : [
              "fe80::7587:a5c1:5a7b:68f6",
              "172.16.66.25"
            ],
            "name" : "02694w-win10.corpcorp.com",
            "id" : "6a3c3ef2-208f-4d6f-90ee-b34f4e3fd160",
            "mac" : [
              "00:50:56:03:c6:93"
            ],
            "architecture" : "x86_64"
          },
          "event" : {
            "agent_id_status" : "verified",
            "ingested" : "2022-04-25T21:51:43Z",
            "code" : "4624",
            "provider" : "Microsoft-Windows-Security-Auditing",
            "kind" : "event",
            "created" : "2022-04-25T21:51:08.433Z",
            "action" : "logged-in",
            "category" : [
              "authentication"
            ],
            "type" : [
              "start"
            ],
            "dataset" : "system.security",
            "outcome" : "success"
          },
          "user" : {
            "domain" : "CORPCORP.COM",
            "name" : "Administrator",
            "id" : "S-1-5-21-308926384-506822093-3341789130-500"
          }
        }
      }
```

* Update privilege_escalation_krbrelayup_suspicious_logon.toml

* Update privilege_escalation_krbrelayup_suspicious_logon.toml

* Update privilege_escalation_krbrelayup_suspicious_logon.toml

* Update privilege_escalation_krbrelayup_suspicious_logon.toml

* Update privilege_escalation_krbrelayup_suspicious_logon.toml

* Update rules/windows/privilege_escalation_krbrelayup_suspicious_logon.toml

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>

* Update rules/windows/privilege_escalation_krbrelayup_suspicious_logon.toml

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>

* Update etc/non-ecs-schema.json

Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>

* relinted

Co-authored-by: Jonhnathan <jonhnathancesar@gmail.com>
Co-authored-by: Justin Ibarra <brokensound77@users.noreply.github.com>
2022-04-27 01:39:54 +02:00
..