elastic / detection-rules

https://www.elastic.co/guide/en/security/current/detection-engine-overview.html
Other
1.92k stars 492 forks source link

[New Rule] Openssl Client or Server Activity #3930

Closed Aegrah closed 1 month ago

Aegrah commented 2 months ago

Summary

This rule identifies when the openssl client or server is used to establish a connection. Attackers may use openssl to establish a secure connection to a remote server or to create a secure server to receive connections. This activity may be used to exfiltrate data or establish a command and control channel.

Telemetry

As openssl is also used for benign activity, this rule is intended to be tuned by the user. I chose to not use a sequence, as this allows for bypasses. In this specific case, I think relying solely on a process event is more robust.

process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
process.name == "openssl" and (
  (process.args == "s_client" and process.args : ("-connect", "*:*")) or
  (process.args == "s_server" and process.args == "-port")
)
{0598954E-6F6E-4801-8277-BAD05C0043CB}

1 hit in telemetry last 30d, only TPs in my own stack for testing.

protectionsmachine commented 2 months ago

Rule: New - Guidelines

These guidelines serve as a reminder set of considerations when proposing a new rule.

Documentation and Context

Rule Metadata Checks

New BBR Rules

Testing and Validation