์ฝ˜ํ…์ธ  ๋Œ€ํ‘œ ์ด๋ฏธ์ง€ - ๐Ÿ›ก๏ธ ๋ณด์•ˆ ๋กœ๊ทธ ๊ด€๋ฆฌ์™€ ์นจํ•ด ๋Œ€์‘ ์ž๋™ํ™”: ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ์™„๋ฒฝ ๊ฐ€์ด๋“œ ๐Ÿš€

๐Ÿ›ก๏ธ ๋ณด์•ˆ ๋กœ๊ทธ ๊ด€๋ฆฌ์™€ ์นจํ•ด ๋Œ€์‘ ์ž๋™ํ™”: ๊ฐœ๋ฐœ์ž๋ฅผ ์œ„ํ•œ ์™„๋ฒฝ ๊ฐ€์ด๋“œ ๐Ÿš€

์‹œ์Šคํ…œ์„ ์ง€ํ‚ค๋Š” ๋˜‘๋˜‘ํ•œ ์ž๋™ํ™” ์ „๋žต

์•ผ, ์†”์งํžˆ ๋งํ•ด์„œ ๋ณด์•ˆ ๋กœ๊ทธ ๊ด€๋ฆฌํ•œ๋‹ค๊ณ  ํ•˜๋ฃจ ์ข…์ผ ๋ชจ๋‹ˆํ„ฐ๋งŒ ์ณ๋‹ค๋ณด๊ณ  ์žˆ์„ ์ˆ˜๋Š” ์—†์ž–์•„? ๐Ÿ˜… ํŠนํžˆ ์š”์ฆ˜์ฒ˜๋Ÿผ ํ•ดํ‚น ์‹œ๋„๊ฐ€ ์ดˆ๋‹น ์ˆ˜๋ฐฑ ๊ฑด์”ฉ ์ผ์–ด๋‚˜๋Š” ์„ธ์ƒ์—์„œ๋Š” ๋”๋”์šฑ ๊ทธ๋ž˜. ๊ทธ๋ž˜์„œ ์˜ค๋Š˜์€ ๋ณด์•ˆ ๋กœ๊ทธ ๊ด€๋ฆฌ์™€ ์นจํ•ด ๋Œ€์‘์„ ์ž๋™ํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์นœ๊ตฌ์ฒ˜๋Ÿผ ํŽธํ•˜๊ฒŒ ์ด์•ผ๊ธฐํ•ด๋ณผ๊ฒŒ!

์ด ๊ธ€์„ ์ฝ๊ณ  ๋‚˜๋ฉด ๋„ˆ๋„ ์‹œ์Šคํ…œ ๋ณด์•ˆ์„ ํ•œ์ธต ์—…๊ทธ๋ ˆ์ด๋“œํ•  ์ˆ˜ ์žˆ์„ ๊ฑฐ์•ผ. ์žฌ๋Šฅ๋„ท ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ ๋ณด์•ˆ ๊ด€๋ จ ์žฌ๋Šฅ์„ ๊ณต์œ ํ•˜๊ฑฐ๋‚˜ ๋ฐฐ์šธ ๋•Œ๋„ ์ด๋Ÿฐ ์ง€์‹์ด ์ •๋ง ์œ ์šฉํ•˜๊ฑฐ๋“ ! ๐ŸŽฏ

๐Ÿ” ๋ณด์•ˆ ๋กœ๊ทธ๊ฐ€ ๋ญ๊ธธ๋ž˜ ์ด๋ ‡๊ฒŒ ์ค‘์š”ํ• ๊นŒ?

๋ณด์•ˆ ๋กœ๊ทธ๋Š” ์‰ฝ๊ฒŒ ๋งํ•ด์„œ ์‹œ์Šคํ…œ์—์„œ ์ผ์–ด๋‚˜๋Š” ๋ชจ๋“  ๋ณด์•ˆ ๊ด€๋ จ ์‚ฌ๊ฑด์˜ ๊ธฐ๋ก์ด์•ผ. ๋ˆ„๊ฐ€ ์–ธ์ œ ๋กœ๊ทธ์ธํ–ˆ๋Š”์ง€, ์–ด๋–ค ํŒŒ์ผ์— ์ ‘๊ทผํ–ˆ๋Š”์ง€, ์ด์ƒํ•œ ํŠธ๋ž˜ํ”ฝ์ด ๋ฐœ์ƒํ–ˆ๋Š”์ง€ ๋“ฑ๋“ฑ ๋ชจ๋“  ๊ฒŒ ๊ธฐ๋ก๋˜์ง€.

์ƒ๊ฐํ•ด๋ด. ์ง‘์— ๋„๋‘‘์ด ๋“ค์—ˆ๋Š”๋ฐ CCTV๊ฐ€ ์—†๋‹ค๋ฉด? ๋ˆ„๊ฐ€ ์–ธ์ œ ๋“ค์–ด์™”๋Š”์ง€ ์•Œ ์ˆ˜๊ฐ€ ์—†์ž–์•„. ๋ณด์•ˆ ๋กœ๊ทธ๊ฐ€ ๋ฐ”๋กœ ๊ทธ CCTV ์—ญํ• ์„ ํ•˜๋Š” ๊ฑฐ์•ผ! ๐Ÿ“น

๐Ÿ“Š ๋ณด์•ˆ ๋กœ๊ทธ์˜ ์ฃผ์š” ์œ ํ˜•๋“ค

1. ์‹œ์Šคํ…œ ๋กœ๊ทธ (System Logs) ๐Ÿ’ป

์šด์˜์ฒด์ œ ๋ ˆ๋ฒจ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ชจ๋“  ์ด๋ฒคํŠธ๋ฅผ ๊ธฐ๋กํ•ด. Windows์˜ ๊ฒฝ์šฐ Event Viewer, Linux๋Š” /var/log ๋””๋ ‰ํ† ๋ฆฌ์— ์ €์žฅ๋˜์ง€.

2. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋กœ๊ทธ (Application Logs) ๐ŸŽฎ

์›น ์„œ๋ฒ„, ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค, ๊ฐ์ข… ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ๋“ค์ด์•ผ. Apache์˜ access.log๋‚˜ error.log๊ฐ€ ๋Œ€ํ‘œ์ ์ด์ง€.

3. ๋ณด์•ˆ ์žฅ๋น„ ๋กœ๊ทธ (Security Device Logs) ๐Ÿ”

๋ฐฉํ™”๋ฒฝ, IDS/IPS, WAF ๊ฐ™์€ ๋ณด์•ˆ ์žฅ๋น„๋“ค์ด ์ƒ์„ฑํ•˜๋Š” ๋กœ๊ทธ์•ผ. ๊ณต๊ฒฉ ์‹œ๋„๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๊ฐ์ง€ํ•˜๊ณ  ๊ธฐ๋กํ•ด.

4. ๋„คํŠธ์›Œํฌ ๋กœ๊ทธ (Network Logs) ๐ŸŒ

๋„คํŠธ์›Œํฌ ํŠธ๋ž˜ํ”ฝ, ํŒจํ‚ท ์ •๋ณด, ์—ฐ๊ฒฐ ์ƒํƒœ ๋“ฑ์„ ๊ธฐ๋กํ•˜๋Š” ๋กœ๊ทธ์•ผ. ์ด์ƒํ•œ ํŠธ๋ž˜ํ”ฝ ํŒจํ„ด์„ ์ฐพ๋Š” ๋ฐ ํ•„์ˆ˜์ ์ด์ง€.

์‹œ์Šคํ…œ ์•ฑ ๋ณด์•ˆ์žฅ๋น„ ๋„คํŠธ์›Œํฌ ์ค‘์•™ ๋กœ๊ทธ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ SIEM / Log Aggregator ์ˆ˜์ง‘ โ†’ ๋ถ„์„ โ†’ ๋Œ€์‘

โš™๏ธ ๋กœ๊ทธ ๊ด€๋ฆฌ ์ž๋™ํ™”์˜ ํ•ต์‹ฌ ์›๋ฆฌ

์ž, ์ด์ œ ๋ณธ๊ฒฉ์ ์œผ๋กœ ์ž๋™ํ™” ์ด์•ผ๊ธฐ๋ฅผ ํ•ด๋ณผ๊นŒ? ๋กœ๊ทธ ๊ด€๋ฆฌ ์ž๋™ํ™”๋Š” ํฌ๊ฒŒ ์ˆ˜์ง‘(Collection) โ†’ ์ •๊ทœํ™”(Normalization) โ†’ ๋ถ„์„(Analysis) โ†’ ๋Œ€์‘(Response) 4๋‹จ๊ณ„๋กœ ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ์–ด.

๐Ÿ“ฅ 1๋‹จ๊ณ„: ๋กœ๊ทธ ์ˆ˜์ง‘ ์ž๋™ํ™”

์ฒซ ๋ฒˆ์งธ ๋‹จ๊ณ„๋Š” ์—ฌ๊ธฐ์ €๊ธฐ ํฉ์–ด์ง„ ๋กœ๊ทธ๋“ค์„ ํ•œ๊ณณ์œผ๋กœ ๋ชจ์œผ๋Š” ๊ฑฐ์•ผ. ์ˆ˜๋™์œผ๋กœ ํ•˜๋‚˜ํ•˜๋‚˜ ๋ณต์‚ฌ ๋ถ™์—ฌ๋„ฃ๊ธฐ ํ•  ์ˆ˜๋Š” ์—†์ž–์•„? ๐Ÿ˜ค

๐Ÿ”ง ์ฃผ์š” ๋กœ๊ทธ ์ˆ˜์ง‘ ๋„๊ตฌ๋“ค

Fluentd ๐ŸŒŠ

์˜คํ”ˆ์†Œ์Šค ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘๊ธฐ๋กœ, ๋‹ค์–‘ํ•œ ์†Œ์Šค์—์„œ ๋กœ๊ทธ๋ฅผ ์ˆ˜์ง‘ํ•ด์„œ ์—ฌ๋Ÿฌ ๋ชฉ์ ์ง€๋กœ ์ „์†กํ•  ์ˆ˜ ์žˆ์–ด. Ruby๋กœ ์ž‘์„ฑ๋๊ณ  ํ”Œ๋Ÿฌ๊ทธ์ธ ์ƒํƒœ๊ณ„๊ฐ€ ์—„์ฒญ ํ’๋ถ€ํ•˜์ง€.

# Fluentd ์„ค์ • ์˜ˆ์‹œ
<source>
  @type tail
  path /var/log/apache2/access.log
  pos_file /var/log/td-agent/apache2.pos
  tag apache.access
  format apache2
</source>

<match apache.access>
  @type elasticsearch
  host localhost
  port 9200
  index_name apache-logs
</match>

Logstash ๐Ÿ“ฆ

Elastic Stack์˜ ์ผ๋ถ€๋กœ, ๊ฐ•๋ ฅํ•œ ํŒŒ์‹ฑ ๊ธฐ๋Šฅ์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด. Grok ํŒจํ„ด์„ ์‚ฌ์šฉํ•ด์„œ ๋น„์ •ํ˜• ๋กœ๊ทธ๋ฅผ ๊ตฌ์กฐํ™”๋œ ๋ฐ์ดํ„ฐ๋กœ ๋ณ€ํ™˜ํ•  ์ˆ˜ ์žˆ์ง€.

# Logstash ์„ค์ • ์˜ˆ์‹œ
input {
  file {
    path => "/var/log/nginx/access.log"
    start_position => "beginning"
  }
}

filter {
  grok {
    match => { "message" => "%{COMBINEDAPACHELOG}" }
  }
  date {
    match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
  }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "nginx-logs-%{+YYYY.MM.dd}"
  }
}

Filebeat ๐ŸŽต

๊ฒฝ๋Ÿ‰ ๋กœ๊ทธ ์ˆ˜์ง‘๊ธฐ๋กœ, ์‹œ์Šคํ…œ ๋ฆฌ์†Œ์Šค๋ฅผ ์ ๊ฒŒ ์‚ฌ์šฉํ•˜๋ฉด์„œ๋„ ํšจ์œจ์ ์œผ๋กœ ๋กœ๊ทธ๋ฅผ ์ „์†กํ•ด. Logstash๋ณด๋‹ค ๊ฐ€๋ณ๊ณ  ๋น ๋ฅด์ง€.

๐Ÿ’ก ์‹ค์ „ ํŒ: ๋กœ๊ทธ ์ˆ˜์ง‘๊ธฐ๋ฅผ ์„ ํƒํ•  ๋•Œ๋Š” ์‹œ์Šคํ…œ ํ™˜๊ฒฝ๊ณผ ๋กœ๊ทธ ๋ณผ๋ฅจ์„ ๊ณ ๋ คํ•ด์•ผ ํ•ด. ์†Œ๊ทœ๋ชจ ์‹œ์Šคํ…œ์ด๋ผ๋ฉด Filebeat๋กœ ์ถฉ๋ถ„ํ•˜๊ณ , ๋ณต์žกํ•œ ํŒŒ์‹ฑ์ด ํ•„์š”ํ•˜๋ฉด Logstash๋ฅผ ์“ฐ๋Š” ๊ฒŒ ์ข‹์•„. Fluentd๋Š” Kubernetes ํ™˜๊ฒฝ์—์„œ ํŠนํžˆ ๊ฐ•๋ ฅํ•˜์ง€! ๐Ÿš€

๐Ÿ”„ 2๋‹จ๊ณ„: ๋กœ๊ทธ ์ •๊ทœํ™”

๊ฐ ์‹œ์Šคํ…œ๋งˆ๋‹ค ๋กœ๊ทธ ํ˜•์‹์ด ๋‹ค ๋‹ค๋ฅด์ž–์•„? Apache๋Š” Apache๋Œ€๋กœ, Nginx๋Š” Nginx๋Œ€๋กœ, Windows๋Š” ๋˜ ๋‹ค๋ฅด๊ฒŒ... ์ด๊ฑธ ํ†ต์ผ๋œ ํ˜•์‹์œผ๋กœ ๋ฐ”๊ฟ”์ฃผ๋Š” ๊ฒŒ ์ •๊ทœํ™”์•ผ.

์˜ˆ๋ฅผ ๋“ค์–ด๋ณผ๊ฒŒ:

์›๋ณธ Apache ๋กœ๊ทธ:

192.168.1.100 - - [15/Jan/2024:10:30:45 +0900] "GET /admin HTTP/1.1" 403 512

์ •๊ทœํ™”๋œ JSON ํ˜•์‹:

{
  "timestamp": "2024-01-15T10:30:45+09:00",
  "source_ip": "192.168.1.100",
  "method": "GET",
  "uri": "/admin",
  "status_code": 403,
  "bytes": 512,
  "log_type": "web_access",
  "severity": "warning"
}

์ด๋ ‡๊ฒŒ ์ •๊ทœํ™”ํ•˜๋ฉด ๋‚˜์ค‘์— ๋ถ„์„ํ•  ๋•Œ ํ›จ์”ฌ ํŽธํ•ด์ ธ. ๋ชจ๋“  ๋กœ๊ทธ๋ฅผ ๊ฐ™์€ ๋ฐฉ์‹์œผ๋กœ ์ฟผ๋ฆฌํ•  ์ˆ˜ ์žˆ๊ฑฐ๋“ ! ๐ŸŽฏ

๐Ÿ”ฌ 3๋‹จ๊ณ„: ๋กœ๊ทธ ๋ถ„์„ ์ž๋™ํ™”

์ด์ œ ์ง„์งœ ํ•ต์‹ฌ์ด์•ผ! ์ˆ˜์ง‘ํ•˜๊ณ  ์ •๋ฆฌํ•œ ๋กœ๊ทธ์—์„œ ์˜๋ฏธ ์žˆ๋Š” ํŒจํ„ด๊ณผ ์ด์ƒ ์ง•ํ›„๋ฅผ ์ž๋™์œผ๋กœ ์ฐพ์•„๋‚ด๋Š” ๋‹จ๊ณ„์ง€.

๐Ÿค– ๋ถ„์„ ๊ธฐ๋ฒ•๋“ค

1. ๊ทœ์น™ ๊ธฐ๋ฐ˜ ๋ถ„์„ (Rule-based Analysis) ๐Ÿ“‹

๋ฏธ๋ฆฌ ์ •์˜๋œ ๊ทœ์น™์— ๋”ฐ๋ผ ๋กœ๊ทธ๋ฅผ ๋ถ„์„ํ•˜๋Š” ๋ฐฉ์‹์ด์•ผ. ์˜ˆ๋ฅผ ๋“ค์–ด "5๋ถ„ ๋‚ด์— ๊ฐ™์€ IP์—์„œ ๋กœ๊ทธ์ธ ์‹คํŒจ๊ฐ€ 10๋ฒˆ ์ด์ƒ ๋ฐœ์ƒํ•˜๋ฉด ๊ฒฝ๊ณ "๊ฐ™์€ ๊ฑฐ์ง€.

# Elasticsearch Watcher ์˜ˆ์‹œ
PUT _watcher/watch/failed_login_attempts
{
  "trigger": {
    "schedule": { "interval": "5m" }
  },
  "input": {
    "search": {
      "request": {
        "indices": ["security-logs-*"],
        "body": {
          "query": {
            "bool": {
              "must": [
                { "match": { "event_type": "login_failed" }},
                { "range": { "@timestamp": { "gte": "now-5m" }}}
              ]
            }
          },
          "aggs": {
            "by_ip": {
              "terms": { "field": "source_ip", "min_doc_count": 10 }
            }
          }
        }
      }
    }
  },
  "condition": {
    "compare": { "ctx.payload.aggregations.by_ip.buckets.length": { "gt": 0 }}
  },
  "actions": {
    "send_alert": {
      "email": {
        "to": "security@company.com",
        "subject": "Brute Force Attack Detected",
        "body": "Multiple failed login attempts detected from {{ctx.payload.aggregations.by_ip.buckets.0.key}}"
      }
    }
  }
}

2. ํ†ต๊ณ„ ๊ธฐ๋ฐ˜ ๋ถ„์„ (Statistical Analysis) ๐Ÿ“Š

์ •์ƒ์ ์ธ ํŒจํ„ด์˜ ํ†ต๊ณ„์  ๊ธฐ์ค€์„ ์„ ๋งŒ๋“ค๊ณ , ๊ทธ๊ฒƒ์—์„œ ๋ฒ—์–ด๋‚˜๋Š” ์ด์ƒ์น˜๋ฅผ ํƒ์ง€ํ•˜๋Š” ๋ฐฉ์‹์ด์•ผ.

# Python์œผ๋กœ ๊ฐ„๋‹จํ•œ ์ด์ƒ์น˜ ํƒ์ง€
import pandas as pd
import numpy as np
from scipy import stats

def detect_anomalies(data, threshold=3):
    """
    Z-score๋ฅผ ์ด์šฉํ•œ ์ด์ƒ์น˜ ํƒ์ง€
    """
    z_scores = np.abs(stats.zscore(data))
    anomalies = np.where(z_scores > threshold)[0]
    return anomalies

# ์‹œ๊ฐ„๋‹น ์š”์ฒญ ์ˆ˜ ๋ถ„์„
hourly_requests = df.groupby(df['timestamp'].dt.hour).size()
anomaly_hours = detect_anomalies(hourly_requests)

print(f"์ด์ƒ ํŠธ๋ž˜ํ”ฝ ๊ฐ์ง€ ์‹œ๊ฐ„๋Œ€: {anomaly_hours}")

3. ๋จธ์‹ ๋Ÿฌ๋‹ ๊ธฐ๋ฐ˜ ๋ถ„์„ (ML-based Analysis) ๐Ÿง 

์ตœ๊ทผ์—๋Š” ๋จธ์‹ ๋Ÿฌ๋‹์„ ํ™œ์šฉํ•ด์„œ ๋” ์ •๊ตํ•œ ํŒจํ„ด ์ธ์‹์„ ํ•˜๊ณ  ์žˆ์–ด. ํŠนํžˆ ๋น„์ง€๋„ ํ•™์Šต์œผ๋กœ ์•Œ๋ ค์ง€์ง€ ์•Š์€ ๊ณต๊ฒฉ๋„ ํƒ์ง€ํ•  ์ˆ˜ ์žˆ์ง€!

# Scikit-learn์„ ์ด์šฉํ•œ ์ด์ƒ ํƒ์ง€
from sklearn.ensemble import IsolationForest
import pandas as pd

# ๋กœ๊ทธ ๋ฐ์ดํ„ฐ ๋กœ๋“œ ๋ฐ ํŠน์ง• ์ถ”์ถœ
df = pd.read_csv('security_logs.csv')
features = df[['request_count', 'error_rate', 'response_time', 'unique_ips']]

# Isolation Forest ๋ชจ๋ธ ํ•™์Šต
model = IsolationForest(contamination=0.1, random_state=42)
predictions = model.fit_predict(features)

# ์ด์ƒ์น˜ ํƒ์ง€ (-1์ด ์ด์ƒ์น˜)
anomalies = df[predictions == -1]
print(f"ํƒ์ง€๋œ ์ด์ƒ ๋กœ๊ทธ: {len(anomalies)}๊ฑด")
print(anomalies[['timestamp', 'source_ip', 'event_type']])

โš ๏ธ ์ฃผ์˜์‚ฌํ•ญ: ๋จธ์‹ ๋Ÿฌ๋‹ ๋ชจ๋ธ์€ ํ•™์Šต ๋ฐ์ดํ„ฐ์˜ ํ’ˆ์งˆ์ด ์ •๋ง ์ค‘์š”ํ•ด. ์ž˜๋ชป๋œ ๋ฐ์ดํ„ฐ๋กœ ํ•™์Šตํ•˜๋ฉด ์˜คํƒ(False Positive)์ด๋‚˜ ๋ฏธํƒ(False Negative)์ด ๋งŽ์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์–ด. ์ •๊ธฐ์ ์œผ๋กœ ๋ชจ๋ธ์„ ์žฌํ•™์Šตํ•˜๊ณ  ํŠœ๋‹ํ•˜๋Š” ๊ฒŒ ํ•„์ˆ˜์•ผ!

โšก 4๋‹จ๊ณ„: ์นจํ•ด ๋Œ€์‘ ์ž๋™ํ™”

์ด์ƒ ์ง•ํ›„๋ฅผ ๋ฐœ๊ฒฌํ–ˆ๋‹ค๋ฉด ์ด์ œ ๋Œ€์‘ํ•ด์•ผ์ง€! ์‚ฌ๋žŒ์ด ์ผ์ผ์ด ๋Œ€์‘ํ•˜๊ธฐ์—” ์‹œ๊ฐ„์ด ๋„ˆ๋ฌด ์˜ค๋ž˜ ๊ฑธ๋ ค. ์ž๋™ํ™”๋œ ๋Œ€์‘ ์‹œ์Šคํ…œ์ด ํ•„์š”ํ•œ ์ด์œ ์•ผ. ๐Ÿšจ

๐Ÿ›ก๏ธ ์ž๋™ ๋Œ€์‘ ์‹œ๋‚˜๋ฆฌ์˜ค๋“ค

์‹œ๋‚˜๋ฆฌ์˜ค 1: ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ(Brute Force) ์ฐจ๋‹จ

๋กœ๊ทธ์ธ ์‹คํŒจ๊ฐ€ ๋ฐ˜๋ณต๋˜๋Š” IP๋ฅผ ์ž๋™์œผ๋กœ ์ฐจ๋‹จํ•˜๋Š” ์Šคํฌ๋ฆฝํŠธ์•ผ:

#!/bin/bash
# auto_block_bruteforce.sh

LOG_FILE="/var/log/auth.log"
THRESHOLD=5
TIME_WINDOW=300  # 5๋ถ„

# ์ตœ๊ทผ 5๋ถ„๊ฐ„ ๋กœ๊ทธ์ธ ์‹คํŒจ ํšŸ์ˆ˜ ํ™•์ธ
failed_ips=$(grep "Failed password" $LOG_FILE | \
  awk -v time_window=$TIME_WINDOW '
    BEGIN { now = systime() }
    {
      timestamp = mktime(substr($0, 1, 15))
      if (now - timestamp <= time_window) {
        for(i=1; i<=NF; i++) {
          if($i ~ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/) {
            ip[$i]++
          }
        }
      }
    }
    END {
      for(i in ip) {
        if(ip[i] >= '$THRESHOLD') print i
      }
    }
  ')

# ์ฐจ๋‹จ ๊ทœ์น™ ์ถ”๊ฐ€
for ip in $failed_ips; do
  # ์ด๋ฏธ ์ฐจ๋‹จ๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธ
  if ! iptables -L INPUT -n | grep -q $ip; then
    echo "$(date): Blocking IP $ip due to brute force attempt"
    iptables -A INPUT -s $ip -j DROP
    
    # ๋กœ๊ทธ ๊ธฐ๋ก
    logger "Auto-blocked IP $ip for brute force attack"
    
    # ์•Œ๋ฆผ ์ „์†ก
    curl -X POST https://hooks.slack.com/services/YOUR/WEBHOOK/URL \
      -H 'Content-Type: application/json' \
      -d "{\"text\":\"๐Ÿšจ IP $ip blocked for brute force attack\"}"
  fi
done

์ด ์Šคํฌ๋ฆฝํŠธ๋ฅผ cron์œผ๋กœ 5๋ถ„๋งˆ๋‹ค ์‹คํ–‰ํ•˜๋ฉด ์ž๋™์œผ๋กœ ๊ณต๊ฒฉ์ž๋ฅผ ์ฐจ๋‹จํ•  ์ˆ˜ ์žˆ์–ด!

์‹œ๋‚˜๋ฆฌ์˜ค 2: SQL Injection ์‹œ๋„ ํƒ์ง€ ๋ฐ ์ฐจ๋‹จ

์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฉํ™”๋ฒฝ(WAF) ๊ทœ์น™์„ ๋™์ ์œผ๋กœ ์—…๋ฐ์ดํŠธํ•˜๋Š” Python ์Šคํฌ๋ฆฝํŠธ:

import re
import requests
from datetime import datetime, timedelta

class SQLInjectionDetector:
    def __init__(self):
        self.sql_patterns = [
            r"(\%27)|(\')|(\-\-)|(\%23)|(#)",
            r"((\%3D)|(=))[^\n]*((\%27)|(\')|(\-\-)|(\%3B)|(;))",
            r"\w*((\%27)|(\'))((\%6F)|o|(\%4F))((\%72)|r|(\%52))",
            r"((\%27)|(\'))union",
            r"exec(\s|\+)+(s|x)p\w+",
        ]
        self.blocked_ips = set()
    
    def analyze_log_entry(self, log_entry):
        """๋กœ๊ทธ ์—”ํŠธ๋ฆฌ์—์„œ SQL Injection ํŒจํ„ด ๊ฒ€์‚ฌ"""
        uri = log_entry.get('uri', '')
        
        for pattern in self.sql_patterns:
            if re.search(pattern, uri, re.IGNORECASE):
                return True
        return False
    
    def block_ip(self, ip_address):
        """IP ์ฃผ์†Œ๋ฅผ WAF์— ์ฐจ๋‹จ ๊ทœ์น™ ์ถ”๊ฐ€"""
        if ip_address in self.blocked_ips:
            return
        
        # CloudFlare API ์˜ˆ์‹œ
        api_url = "https://api.cloudflare.com/client/v4/zones/ZONE_ID/firewall/access_rules/rules"
        headers = {
            "X-Auth-Email": "your@email.com",
            "X-Auth-Key": "your_api_key",
            "Content-Type": "application/json"
        }
        data = {
            "mode": "block",
            "configuration": {
                "target": "ip",
                "value": ip_address
            },
            "notes": f"Auto-blocked for SQL injection attempt at {datetime.now()}"
        }
        
        response = requests.post(api_url, headers=headers, json=data)
        
        if response.status_code == 200:
            self.blocked_ips.add(ip_address)
            print(f"โœ… Successfully blocked {ip_address}")
            self.send_alert(ip_address, "SQL Injection")
        else:
            print(f"โŒ Failed to block {ip_address}: {response.text}")
    
    def send_alert(self, ip_address, attack_type):
        """๋ณด์•ˆํŒ€์— ์•Œ๋ฆผ ์ „์†ก"""
        webhook_url = "https://hooks.slack.com/services/YOUR/WEBHOOK"
        message = {
            "text": f"๐Ÿšจ *Security Alert*\n"
                   f"Attack Type: {attack_type}\n"
                   f"Source IP: {ip_address}\n"
                   f"Action: Automatically blocked\n"
                   f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}"
        }
        requests.post(webhook_url, json=message)

# ์‹ค์‹œ๊ฐ„ ๋กœ๊ทธ ๋ชจ๋‹ˆํ„ฐ๋ง
detector = SQLInjectionDetector()

def process_logs():
    # Elasticsearch์—์„œ ์ตœ๊ทผ ๋กœ๊ทธ ๊ฐ€์ ธ์˜ค๊ธฐ
    from elasticsearch import Elasticsearch
    
    es = Elasticsearch(['localhost:9200'])
    query = {
        "query": {
            "range": {
                "@timestamp": {
                    "gte": "now-1m"
                }
            }
        }
    }
    
    results = es.search(index="web-logs-*", body=query)
    
    for hit in results['hits']['hits']:
        log_entry = hit['_source']
        
        if detector.analyze_log_entry(log_entry):
            source_ip = log_entry.get('source_ip')
            print(f"โš ๏ธ SQL Injection attempt detected from {source_ip}")
            detector.block_ip(source_ip)

# 1๋ถ„๋งˆ๋‹ค ์‹คํ–‰
if __name__ == "__main__":
    import time
    while True:
        process_logs()
        time.sleep(60)

์‹œ๋‚˜๋ฆฌ์˜ค 3: ๋žœ์„ฌ์›จ์–ด ํ–‰์œ„ ํƒ์ง€ ๋ฐ ๊ฒฉ๋ฆฌ

ํŒŒ์ผ ์‹œ์Šคํ…œ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ํ†ตํ•ด ๋Œ€๋Ÿ‰์˜ ํŒŒ์ผ ์•”ํ˜ธํ™” ์‹œ๋„๋ฅผ ํƒ์ง€ํ•˜๊ณ  ํ•ด๋‹น ํ”„๋กœ์„ธ์Šค๋ฅผ ์ž๋™์œผ๋กœ ์ข…๋ฃŒํ•˜๋Š” ์‹œ์Šคํ…œ:

import os
import psutil
import time
from collections import defaultdict
from datetime import datetime, timedelta

class RansomwareDetector:
    def __init__(self):
        self.file_operations = defaultdict(list)
        self.alert_threshold = 50  # 1๋ถ„์— 50๊ฐœ ์ด์ƒ ํŒŒ์ผ ์ˆ˜์ •
        self.time_window = 60  # 60์ดˆ
        self.suspicious_extensions = [
            '.encrypted', '.locked', '.crypto', '.crypt',
            '.cerber', '.locky', '.zepto'
        ]
    
    def monitor_file_operations(self, pid, operation, filepath):
        """ํ”„๋กœ์„ธ์Šค์˜ ํŒŒ์ผ ์ž‘์—… ๋ชจ๋‹ˆํ„ฐ๋ง"""
        current_time = datetime.now()
        
        # ์˜์‹ฌ์Šค๋Ÿฌ์šด ํ™•์žฅ์ž ์ฒดํฌ
        _, ext = os.path.splitext(filepath)
        if ext.lower() in self.suspicious_extensions:
            self.quarantine_process(pid, "Suspicious file extension")
            return
        
        # ํŒŒ์ผ ์ž‘์—… ๊ธฐ๋ก
        self.file_operations[pid].append({
            'time': current_time,
            'operation': operation,
            'filepath': filepath
        })
        
        # ์˜ค๋ž˜๋œ ๊ธฐ๋ก ์ œ๊ฑฐ
        cutoff_time = current_time - timedelta(seconds=self.time_window)
        self.file_operations[pid] = [
            op for op in self.file_operations[pid]
            if op['time'] > cutoff_time
        ]
        
        # ์ž„๊ณ„๊ฐ’ ์ฒดํฌ
        if len(self.file_operations[pid]) > self.alert_threshold:
            self.quarantine_process(pid, "Excessive file modifications")
    
    def quarantine_process(self, pid, reason):
        """์˜์‹ฌ์Šค๋Ÿฌ์šด ํ”„๋กœ์„ธ์Šค ๊ฒฉ๋ฆฌ"""
        try:
            process = psutil.Process(pid)
            process_info = {
                'name': process.name(),
                'exe': process.exe(),
                'cmdline': ' '.join(process.cmdline()),
                'connections': process.connections()
            }
            
            print(f"๐Ÿšจ RANSOMWARE ALERT!")
            print(f"PID: {pid}")
            print(f"Process: {process_info['name']}")
            print(f"Reason: {reason}")
            print(f"File operations: {len(self.file_operations[pid])}")
            
            # ํ”„๋กœ์„ธ์Šค ์ข…๋ฃŒ
            process.terminate()
            process.wait(timeout=3)
            
            # ๊ฐ•์ œ ์ข…๋ฃŒ๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ
            if process.is_running():
                process.kill()
            
            # ๋„คํŠธ์›Œํฌ ์—ฐ๊ฒฐ ์ฐจ๋‹จ
            for conn in process_info['connections']:
                if conn.status == 'ESTABLISHED':
                    remote_ip = conn.raddr.ip
                    os.system(f"iptables -A OUTPUT -d {remote_ip} -j DROP")
            
            # ์ƒ์„ธ ๋กœ๊ทธ ๊ธฐ๋ก
            self.log_incident(pid, process_info, reason)
            
            # ๊ธด๊ธ‰ ์•Œ๋ฆผ
            self.send_emergency_alert(pid, process_info, reason)
            
            print(f"โœ… Process {pid} has been quarantined")
            
        except psutil.NoSuchProcess:
            print(f"Process {pid} already terminated")
        except Exception as e:
            print(f"Error quarantining process: {e}")
    
    def log_incident(self, pid, process_info, reason):
        """์นจํ•ด ์‚ฌ๊ณ  ์ƒ์„ธ ๋กœ๊ทธ ๊ธฐ๋ก"""
        log_entry = {
            'timestamp': datetime.now().isoformat(),
            'incident_type': 'ransomware_attempt',
            'pid': pid,
            'process_name': process_info['name'],
            'executable': process_info['exe'],
            'command_line': process_info['cmdline'],
            'reason': reason,
            'file_operations': self.file_operations[pid]
        }
        
        # JSON ํ˜•์‹์œผ๋กœ ์ €์žฅ
        import json
        with open('/var/log/security/ransomware_incidents.log', 'a') as f:
            f.write(json.dumps(log_entry) + '\n')
    
    def send_emergency_alert(self, pid, process_info, reason):
        """๊ธด๊ธ‰ ์•Œ๋ฆผ ๋ฐœ์†ก"""
        import requests
        
        message = f"""
๐Ÿšจ **CRITICAL SECURITY ALERT - RANSOMWARE DETECTED** ๐Ÿšจ

**Time:** {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
**Severity:** CRITICAL
**Incident Type:** Ransomware Activity

**Process Details:**
- PID: {pid}
- Name: {process_info['name']}
- Executable: {process_info['exe']}
- Command: {process_info['cmdline']}

**Detection Reason:** {reason}
**File Operations:** {len(self.file_operations[pid])} files affected

**Action Taken:** Process terminated and quarantined
**Status:** Threat neutralized

**Next Steps:**
1. Investigate affected files
2. Check for data exfiltration
3. Scan system for additional malware
4. Review backup integrity
        """
        
        # Slack ์•Œ๋ฆผ
        requests.post(
            "https://hooks.slack.com/services/YOUR/WEBHOOK",
            json={"text": message}
        )
        
        # ์ด๋ฉ”์ผ ์•Œ๋ฆผ
        # SMS ์•Œ๋ฆผ
        # PagerDuty ๋“ฑ ์ถ”๊ฐ€ ์•Œ๋ฆผ ์ฑ„๋„

# ์‹ค์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋ง ์‹œ์ž‘
detector = RansomwareDetector()
print("๐Ÿ›ก๏ธ Ransomware detection system activated")
์ž๋™ ์นจํ•ด ๋Œ€์‘ ํ”„๋กœ์„ธ์Šค 1. ํƒ์ง€ ์ด์ƒ์ง•ํ›„ 2. ๋ถ„์„ ์œ„ํ˜‘ํ‰๊ฐ€ 3. ์ฐจ๋‹จ ์ฆ‰์‹œ๋Œ€์‘ 4. ์•Œ๋ฆผ ๋ณด๊ณ ์ „์†ก ํ‰๊ท  ๋Œ€์‘ ์‹œ๊ฐ„ ์ˆ˜๋™ 4-6์‹œ๊ฐ„ ํ‰๊ท  ๋Œ€์‘ ์‹œ๊ฐ„ ์ž๋™ <1๋ถ„ ์ž๋™ํ™” ํšจ๊ณผ โœ“ ๋Œ€์‘ ์‹œ๊ฐ„ 99% ๋‹จ์ถ• โœ“ ์ธ์  ์˜ค๋ฅ˜ ์ตœ์†Œํ™” โœ“ 24/7 ๋ฌด์ค‘๋‹จ ๋ชจ๋‹ˆํ„ฐ๋ง โœ“ ํ”ผํ•ด ๋ฒ”์œ„ ์ตœ์†Œํ™”

๐Ÿ—๏ธ SIEM ์‹œ์Šคํ…œ ๊ตฌ์ถ•ํ•˜๊ธฐ

SIEM(Security Information and Event Management)์€ ๋ณด์•ˆ ๋กœ๊ทธ ๊ด€๋ฆฌ์™€ ์นจํ•ด ๋Œ€์‘ ์ž๋™ํ™”์˜ ํ•ต์‹ฌ ํ”Œ๋žซํผ์ด์•ผ. ์—ฌ๋Ÿฌ ์†Œ์Šค์—์„œ ๋กœ๊ทธ๋ฅผ ์ˆ˜์ง‘ํ•˜๊ณ , ์ƒ๊ด€ ๋ถ„์„ํ•˜๊ณ , ์‹ค์‹œ๊ฐ„์œผ๋กœ ์œ„ํ˜‘์„ ํƒ์ง€ํ•˜๋Š” ํ†ตํ•ฉ ์‹œ์Šคํ…œ์ด์ง€.

๐ŸŽฏ ์˜คํ”ˆ์†Œ์Šค SIEM ์†”๋ฃจ์…˜๋“ค

1. ELK Stack (Elasticsearch, Logstash, Kibana) ๐Ÿ“Š

๊ฐ€์žฅ ์ธ๊ธฐ ์žˆ๋Š” ์˜คํ”ˆ์†Œ์Šค ๋กœ๊ทธ ๋ถ„์„ ํ”Œ๋žซํผ์ด์•ผ. ํ™•์žฅ์„ฑ์ด ๋›ฐ์–ด๋‚˜๊ณ  ์ปค๋ฎค๋‹ˆํ‹ฐ๊ฐ€ ํ™œ๋ฐœํ•˜์ง€.

ELK Stack ์„ค์น˜ ๋ฐ ์„ค์ •

# Docker Compose๋กœ ELK Stack ๊ตฌ์ถ•
version: '3.7'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
    container_name: elasticsearch
    environment:
      - discovery.type=single-node
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
      - xpack.security.enabled=true
      - ELASTIC_PASSWORD=your_password
    ports:
      - "9200:9200"
    volumes:
      - esdata:/usr/share/elasticsearch/data
    networks:
      - elk

  logstash:
    image: docker.elastic.co/logstash/logstash:8.11.0
    container_name: logstash
    volumes:
      - ./logstash/pipeline:/usr/share/logstash/pipeline
      - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
    ports:
      - "5044:5044"
      - "9600:9600"
    environment:
      - "LS_JAVA_OPTS=-Xms1g -Xmx1g"
    networks:
      - elk
    depends_on:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana:8.11.0
    container_name: kibana
    ports:
      - "5601:5601"
    environment:
      - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
      - ELASTICSEARCH_USERNAME=elastic
      - ELASTICSEARCH_PASSWORD=your_password
    networks:
      - elk
    depends_on:
      - elasticsearch

volumes:
  esdata:
    driver: local

networks:
  elk:
    driver: bridge

Kibana์—์„œ ๋ณด์•ˆ ๋Œ€์‹œ๋ณด๋“œ ๊ตฌ์„ฑ:

# Kibana Dev Tools์—์„œ ์‹คํ–‰
# ๋ณด์•ˆ ์ด๋ฒคํŠธ ์ธ๋ฑ์Šค ํŒจํ„ด ์ƒ์„ฑ
PUT _index_template/security-logs
{
  "index_patterns": ["security-logs-*"],
  "template": {
    "settings": {
      "number_of_shards": 3,
      "number_of_replicas": 1
    },
    "mappings": {
      "properties": {
        "@timestamp": { "type": "date" },
        "event_type": { "type": "keyword" },
        "severity": { "type": "keyword" },
        "source_ip": { "type": "ip" },
        "destination_ip": { "type": "ip" },
        "user": { "type": "keyword" },
        "action": { "type": "keyword" },
        "result": { "type": "keyword" },
        "message": { "type": "text" }
      }
    }
  }
}

# ๋ณด์•ˆ ์•Œ๋ฆผ ๊ทœ์น™ ์ƒ์„ฑ
PUT _watcher/watch/high_severity_events
{
  "trigger": {
    "schedule": { "interval": "1m" }
  },
  "input": {
    "search": {
      "request": {
        "indices": ["security-logs-*"],
        "body": {
          "query": {
            "bool": {
              "must": [
                { "term": { "severity": "critical" }},
                { "range": { "@timestamp": { "gte": "now-1m" }}}
              ]
            }
          }
        }
      }
    }
  },
  "condition": {
    "compare": { "ctx.payload.hits.total.value": { "gt": 0 }}
  },
  "actions": {
    "log_alert": {
      "logging": {
        "text": "Critical security event detected: {{ctx.payload.hits.total.value}} events"
      }
    },
    "webhook_alert": {
      "webhook": {
        "method": "POST",
        "url": "https://your-webhook-url.com/alert",
        "body": "{{#toJson}}ctx.payload{{/toJson}}"
      }
    }
  }
}

2. Wazuh ๐Ÿ›ก๏ธ

ํ˜ธ์ŠคํŠธ ๊ธฐ๋ฐ˜ ์นจ์ž… ํƒ์ง€ ์‹œ์Šคํ…œ(HIDS)์œผ๋กœ, ํŒŒ์ผ ๋ฌด๊ฒฐ์„ฑ ๋ชจ๋‹ˆํ„ฐ๋ง, ๋กœ๊ทธ ๋ถ„์„, ์ทจ์•ฝ์  ํƒ์ง€ ๋“ฑ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ด.

# Wazuh Agent ์„ค์น˜ (Ubuntu/Debian)
curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add -
echo "deb https://packages.wazuh.com/4.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list
apt-get update
apt-get install wazuh-agent

# Wazuh Manager ์„œ๋ฒ„ ์„ค์ •
echo "WAZUH_MANAGER='your-manager-ip'" >> /var/ossec/etc/ossec.conf

# ์—์ด์ „ํŠธ ์‹œ์ž‘
systemctl start wazuh-agent
systemctl enable wazuh-agent

์ปค์Šคํ…€ ๊ทœ์น™ ์ž‘์„ฑ:

<!-- /var/ossec/etc/rules/local_rules.xml -->
<group name="custom_security,">
  
  <!-- SSH ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ ํƒ์ง€ -->
  <rule id="100001" level="10">
    <if_matched_sid>5710</if_matched_sid>
    <same_source_ip />
    <description>Multiple SSH authentication failures from same source</description>
    <group>authentication_failures,pci_dss_10.2.4,pci_dss_10.2.5,</group>
  </rule>

  <!-- ์›น ์Šค์บ๋‹ ํƒ์ง€ -->
  <rule id="100002" level="8">
    <if_sid>31100</if_sid>
    <url>/admin|/phpmyadmin|/wp-admin</url>
    <description>Web scanning attempt detected</description>
    <group>web_scan,</group>
  </rule>

  <!-- ๊ถŒํ•œ ์ƒ์Šน ์‹œ๋„ -->
  <rule id="100003" level="12">
    <if_sid>5401</if_sid>
    <match>sudo|su</match>
    <user>^(?!root|admin)</user>
    <description>Privilege escalation attempt by non-privileged user</description>
    <group>privilege_escalation,</group>
  </rule>

</group>

3. OSSEC ๐Ÿ”

Wazuh์˜ ๊ธฐ๋ฐ˜์ด ๋œ ์˜คํ”ˆ์†Œ์Šค HIDS์•ผ. ๊ฐ€๋ณ๊ณ  ํšจ์œจ์ ์ด๋ฉฐ ๋‹ค์–‘ํ•œ ํ”Œ๋žซํผ์„ ์ง€์›ํ•˜์ง€.

# OSSEC ์„œ๋ฒ„ ์„ค์น˜
wget https://github.com/ossec/ossec-hids/archive/3.7.0.tar.gz
tar -xzf 3.7.0.tar.gz
cd ossec-hids-3.7.0
./install.sh

# ์„ค์น˜ ์ค‘ ์„ ํƒ ์‚ฌํ•ญ
# - Installation type: server
# - Email notification: yes
# - Integrity check: yes
# - Rootkit detection: yes
# - Active response: yes

# ์„ค์ • ํŒŒ์ผ ํŽธ์ง‘
vi /var/ossec/etc/ossec.conf

Active Response ์„ค์ • (์ž๋™ ๋Œ€์‘):

<ossec_config>
  <active-response>
    <!-- SSH ๊ณต๊ฒฉ์ž ์ž๋™ ์ฐจ๋‹จ -->
    <command>firewall-drop</command>
    <location>local</location>
    <level>10</level>
    <timeout>600</timeout>
  </active-response>

  <active-response>
    <!-- ์›น ๊ณต๊ฒฉ ์ฐจ๋‹จ -->
    <command>firewall-drop</command>
    <location>local</location>
    <rules_id>31151,31152,31153</rules_id>
    <timeout>3600</timeout>
  </active-response>
</ossec_config>

๐Ÿ’ก ์‹ค์ „ ํŒ: SIEM ์‹œ์Šคํ…œ์„ ์ฒ˜์Œ ๊ตฌ์ถ•ํ•  ๋•Œ๋Š” ELK Stack์œผ๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฑธ ์ถ”์ฒœํ•ด. ํ•™์Šต ๊ณก์„ ์ด ์™„๋งŒํ•˜๊ณ  ์ž๋ฃŒ๋„ ๋งŽ๊ฑฐ๋“ . ๊ทธ๋‹ค์Œ Wazuh๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ํ˜ธ์ŠคํŠธ ๋ ˆ๋ฒจ ๋ณด์•ˆ๊นŒ์ง€ ์ปค๋ฒ„ํ•  ์ˆ˜ ์žˆ์–ด. ์žฌ๋Šฅ๋„ท ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ SIEM ๊ตฌ์ถ• ๊ฒฝํ—˜์ด ์žˆ๋Š” ์ „๋ฌธ๊ฐ€๋ฅผ ์ฐพ์•„ ๋ฉ˜ํ† ๋ง์„ ๋ฐ›๋Š” ๊ฒƒ๋„ ์ข‹์€ ๋ฐฉ๋ฒ•์ด์•ผ! ๐ŸŽ“

๐Ÿค– AI/ML ๊ธฐ๋ฐ˜ ์œ„ํ˜‘ ํƒ์ง€

์ตœ๊ทผ์—๋Š” ์ธ๊ณต์ง€๋Šฅ๊ณผ ๋จธ์‹ ๋Ÿฌ๋‹์„ ํ™œ์šฉํ•œ ์œ„ํ˜‘ ํƒ์ง€๊ฐ€ ๋Œ€์„ธ์•ผ. ๊ธฐ์กด ๊ทœ์น™ ๊ธฐ๋ฐ˜ ์‹œ์Šคํ…œ์œผ๋กœ๋Š” ํƒ์ง€ํ•˜๊ธฐ ์–ด๋ ค์šด ์ œ๋กœ๋ฐ์ด ๊ณต๊ฒฉ์ด๋‚˜ APT(Advanced Persistent Threat)๋„ ์ฐพ์•„๋‚ผ ์ˆ˜ ์žˆ๊ฑฐ๋“ !

๐Ÿง  ๋จธ์‹ ๋Ÿฌ๋‹ ๋ชจ๋ธ ๊ตฌ์ถ•

1. ์ด์ƒ ํƒ์ง€ ๋ชจ๋ธ (Anomaly Detection)

์ •์ƒ ํ–‰์œ„ ํŒจํ„ด์„ ํ•™์Šตํ•˜๊ณ , ๊ทธ๊ฒƒ์—์„œ ๋ฒ—์–ด๋‚˜๋Š” ์ด์ƒ ํ–‰์œ„๋ฅผ ํƒ์ง€ํ•˜๋Š” ๋ชจ๋ธ์ด์•ผ:

import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import IsolationForest
from sklearn.model_selection import train_test_split
import joblib

class SecurityAnomalyDetector:
    def __init__(self):
        self.scaler = StandardScaler()
        self.model = IsolationForest(
            contamination=0.1,  # 10%๋ฅผ ์ด์ƒ์น˜๋กœ ๊ฐ€์ •
            random_state=42,
            n_estimators=100
        )
        
    def prepare_features(self, df):
        """๋กœ๊ทธ ๋ฐ์ดํ„ฐ์—์„œ ํŠน์ง• ์ถ”์ถœ"""
        features = pd.DataFrame()
        
        # ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ํŠน์ง•
        df['hour'] = pd.to_datetime(df['timestamp']).dt.hour
        df['day_of_week'] = pd.to_datetime(df['timestamp']).dt.dayofweek
        
        # ํ†ต๊ณ„์  ํŠน์ง•
        features['requests_per_minute'] = df.groupby(
            pd.Grouper(key='timestamp', freq='1min')
        ).size()
        
        features['unique_ips'] = df.groupby(
            pd.Grouper(key='timestamp', freq='1min')
        )['source_ip'].nunique()
        
        features['error_rate'] = df.groupby(
            pd.Grouper(key='timestamp', freq='1min')
        )['status_code'].apply(lambda x: (x >= 400).sum() / len(x))
        
        features['avg_response_time'] = df.groupby(
            pd.Grouper(key='timestamp', freq='1min')
        )['response_time'].mean()
        
        features['failed_auth_count'] = df.groupby(
            pd.Grouper(key='timestamp', freq='1min')
        )['auth_result'].apply(lambda x: (x == 'failed').sum())
        
        # ์—”ํŠธ๋กœํ”ผ ๊ณ„์‚ฐ (๋ฌด์ž‘์œ„์„ฑ ์ธก์ •)
        features['uri_entropy'] = df.groupby(
            pd.Grouper(key='timestamp', freq='1min')
        )['uri'].apply(self.calculate_entropy)
        
        return features.fillna(0)
    
    def calculate_entropy(self, series):
        """์—”ํŠธ๋กœํ”ผ ๊ณ„์‚ฐ"""
        from scipy.stats import entropy
        value_counts = series.value_counts()
        return entropy(value_counts)
    
    def train(self, training_data):
        """๋ชจ๋ธ ํ•™์Šต"""
        features = self.prepare_features(training_data)
        
        # ์ •๊ทœํ™”
        features_scaled = self.scaler.fit_transform(features)
        
        # ๋ชจ๋ธ ํ•™์Šต
        self.model.fit(features_scaled)
        
        print("โœ… Model training completed")
        
        # ๋ชจ๋ธ ์ €์žฅ
        joblib.dump(self.model, 'anomaly_detector.pkl')
        joblib.dump(self.scaler, 'scaler.pkl')
    
    def predict(self, new_data):
        """์ด์ƒ ํƒ์ง€"""
        features = self.prepare_features(new_data)
        features_scaled = self.scaler.transform(features)
        
        # ์˜ˆ์ธก (-1: ์ด์ƒ, 1: ์ •์ƒ)
        predictions = self.model.predict(features_scaled)
        
        # ์ด์ƒ ์ ์ˆ˜ ๊ณ„์‚ฐ
        anomaly_scores = self.model.score_samples(features_scaled)
        
        # ๊ฒฐ๊ณผ ์ •๋ฆฌ
        results = pd.DataFrame({
            'timestamp': features.index,
            'is_anomaly': predictions == -1,
            'anomaly_score': anomaly_scores
        })
        
        return results[results['is_anomaly']]

# ์‚ฌ์šฉ ์˜ˆ์‹œ
detector = SecurityAnomalyDetector()

# ํ•™์Šต ๋ฐ์ดํ„ฐ ๋กœ๋“œ (์ •์ƒ ํŠธ๋ž˜ํ”ฝ)
training_logs = pd.read_csv('normal_traffic_logs.csv')
detector.train(training_logs)

# ์‹ค์‹œ๊ฐ„ ํƒ์ง€
new_logs = pd.read_csv('realtime_logs.csv')
anomalies = detector.predict(new_logs)

print(f"๐Ÿšจ Detected {len(anomalies)} anomalies")
print(anomalies)

2. ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ๋ฐ˜ ์นจ์ž… ํƒ์ง€ (Deep Learning IDS)

LSTM(Long Short-Term Memory) ๋„คํŠธ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•œ ์‹œ๊ณ„์—ด ํŒจํ„ด ๋ถ„์„:

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
import numpy as np
import pandas as pd

class DeepLearningIDS:
    def __init__(self, sequence_length=10):
        self.sequence_length = sequence_length
        self.model = None
        self.build_model()
    
    def build_model(self):
        """LSTM ๊ธฐ๋ฐ˜ ๋ชจ๋ธ ๊ตฌ์ถ•"""
        self.model = keras.Sequential([
            layers.LSTM(128, return_sequences=True, 
                       input_shape=(self.sequence_length, 10)),
            layers.Dropout(0.3),
            layers.LSTM(64, return_sequences=False),
            layers.Dropout(0.3),
            layers.Dense(32, activation='relu'),
            layers.Dense(1, activation='sigmoid')
        ])
        
        self.model.compile(
            optimizer='adam',
            loss='binary_crossentropy',
            metrics=['accuracy', 'precision', 'recall']
        )
    
    def create_sequences(self, data, labels):
        """์‹œ๊ณ„์—ด ์‹œํ€€์Šค ์ƒ์„ฑ"""
        X, y = [], []
        
        for i in range(len(data) - self.sequence_length):
            X.append(data[i:i + self.sequence_length])
            y.append(labels[i + self.sequence_length])
        
        return np.array(X), np.array(y)
    
    def train(self, training_data, labels, epochs=50, batch_size=32):
        """๋ชจ๋ธ ํ•™์Šต"""
        X_train, y_train = self.create_sequences(training_data, labels)
        
        # ์กฐ๊ธฐ ์ข…๋ฃŒ ์ฝœ๋ฐฑ
        early_stopping = keras.callbacks.EarlyStopping(
            monitor='val_loss',
            patience=5,
            restore_best_weights=True
        )
        
        # ํ•™์Šต
        history = self.model.fit(
            X_train, y_train,
            epochs=epochs,
            batch_size=batch_size,
            validation_split=0.2,
            callbacks=[early_stopping],
            verbose=1
        )
        
        # ๋ชจ๋ธ ์ €์žฅ
        self.model.save('deep_ids_model.h5')
        
        return history
    
    def predict(self, new_data):
        """์นจ์ž… ํƒ์ง€"""
        sequences = []
        
        for i in range(len(new_data) - self.sequence_length):
            sequences.append(new_data[i:i + self.sequence_length])
        
        X = np.array(sequences)
        predictions = self.model.predict(X)
        
        # ์ž„๊ณ„๊ฐ’ ๊ธฐ๋ฐ˜ ๋ถ„๋ฅ˜ (0.5 ์ด์ƒ์ด๋ฉด ๊ณต๊ฒฉ)
        is_attack = predictions > 0.5
        
        return predictions, is_attack
    
    def evaluate(self, test_data, test_labels):
        """๋ชจ๋ธ ํ‰๊ฐ€"""
        X_test, y_test = self.create_sequences(test_data, test_labels)
        
        results = self.model.evaluate(X_test, y_test)
        
        print(f"Test Loss: {results[0]:.4f}")
        print(f"Test Accuracy: {results[1]:.4f}")
        print(f"Test Precision: {results[2]:.4f}")
        print(f"Test Recall: {results[3]:.4f}")
        
        return results

# ์‚ฌ์šฉ ์˜ˆ์‹œ
ids = DeepLearningIDS(sequence_length=10)

# ๋ฐ์ดํ„ฐ ์ค€๋น„
# features: [requests_per_sec, error_rate, unique_ips, ...]
# labels: 0 (์ •์ƒ) or 1 (๊ณต๊ฒฉ)

training_features = np.random.rand(10000, 10)  # ์‹ค์ œ๋กœ๋Š” ์‹ค์ œ ๋ฐ์ดํ„ฐ ์‚ฌ์šฉ
training_labels = np.random.randint(0, 2, 10000)

# ํ•™์Šต
history = ids.train(training_features, training_labels, epochs=30)

# ์‹ค์‹œ๊ฐ„ ํƒ์ง€
new_features = np.random.rand(100, 10)
predictions, is_attack = ids.predict(new_features)

attack_indices = np.where(is_attack)[0]
print(f"๐Ÿšจ Detected attacks at indices: {attack_indices}")

3. ํ–‰์œ„ ๊ธฐ๋ฐ˜ ๋ถ„์„ (Behavioral Analysis)

์‚ฌ์šฉ์ž๋‚˜ ์—”ํ‹ฐํ‹ฐ์˜ ์ •์ƒ ํ–‰์œ„ ํŒจํ„ด์„ ํ•™์Šตํ•˜๊ณ  ์ดํƒˆ์„ ํƒ์ง€ํ•˜๋Š” UEBA(User and Entity Behavior Analytics):

import pandas as pd
import numpy as np
from sklearn.cluster import DBSCAN
from sklearn.preprocessing import StandardScaler

class BehaviorAnalyzer:
    def __init__(self):
        self.user_profiles = {}
        self.scaler = StandardScaler()
    
    def build_user_profile(self, user_id, historical_data):
        """์‚ฌ์šฉ์ž ํ–‰์œ„ ํ”„๋กœํ•„ ์ƒ์„ฑ"""
        user_data = historical_data[historical_data['user_id'] == user_id]
        
        profile = {
            'typical_login_hours': user_data['login_hour'].mode()[0],
            'avg_session_duration': user_data['session_duration'].mean(),
            'std_session_duration': user_data['session_duration'].std(),
            'typical_locations': user_data['location'].value_counts().head(3).index.tolist(),
            'avg_files_accessed': user_data['files_accessed'].mean(),
            'typical_applications': user_data['application'].value_counts().head(5).index.tolist(),
            'avg_data_transfer': user_data['data_transfer_mb'].mean(),
            'std_data_transfer': user_data['data_transfer_mb'].std()
        }
        
        self.user_profiles[user_id] = profile
        return profile
    
    def calculate_anomaly_score(self, user_id, current_activity):
        """ํ˜„์žฌ ํ™œ๋™์˜ ์ด์ƒ ์ ์ˆ˜ ๊ณ„์‚ฐ"""
        if user_id not in self.user_profiles:
            return 0.5  # ํ”„๋กœํ•„ ์—†์Œ
        
        profile = self.user_profiles[user_id]
        anomaly_score = 0
        
        # ๋กœ๊ทธ์ธ ์‹œ๊ฐ„ ์ด์ƒ
        hour_diff = abs(current_activity['login_hour'] - profile['typical_login_hours'])
        if hour_diff > 6:
            anomaly_score += 0.2
        
        # ์„ธ์…˜ ์‹œ๊ฐ„ ์ด์ƒ
        session_z_score = abs(
            (current_activity['session_duration'] - profile['avg_session_duration']) /
            (profile['std_session_duration'] + 1e-6)
        )
        if session_z_score > 3:
            anomaly_score += 0.2
        
        # ์œ„์น˜ ์ด์ƒ
        if current_activity['location'] not in profile['typical_locations']:
            anomaly_score += 0.2
        
        # ํŒŒ์ผ ์ ‘๊ทผ ์ด์ƒ
        if current_activity['files_accessed'] > profile['avg_files_accessed'] * 3:
            anomaly_score += 0.2
        
        # ๋ฐ์ดํ„ฐ ์ „์†ก ์ด์ƒ
        data_z_score = abs(
            (current_activity['data_transfer_mb'] - profile['avg_data_transfer']) /
            (profile['std_data_transfer'] + 1e-6)
        )
        if data_z_score > 3:
            anomaly_score += 0.2
        
        return min(anomaly_score, 1.0)
    
    def detect_insider_threat(self, user_id, activity_sequence):
        """๋‚ด๋ถ€์ž ์œ„ํ˜‘ ํƒ์ง€"""
        threat_indicators = []
        
        # ์—ฐ์†์ ์ธ ์ด์ƒ ํ–‰์œ„
        anomaly_scores = [
            self.calculate_anomaly_score(user_id, activity)
            for activity in activity_sequence
        ]
        
        if np.mean(anomaly_scores) > 0.6:
            threat_indicators.append("Consistently abnormal behavior")
        
        # ๋ฏผ๊ฐํ•œ ๋ฐ์ดํ„ฐ ์ ‘๊ทผ ํŒจํ„ด
        sensitive_access = sum(
            1 for activity in activity_sequence
            if activity.get('accessed_sensitive_data', False)
        )
        
        if sensitive_access > len(activity_sequence) * 0.5:
            threat_indicators.append("Excessive sensitive data access")
        
        # ๋น„์ •์ƒ ์‹œ๊ฐ„๋Œ€ ํ™œ๋™
        off_hours_activity = sum(
            1 for activity in activity_sequence
            if activity['login_hour'] < 6 or activity['login_hour'] > 22
        )
        
        if off_hours_activity > len(activity_sequence) * 0.3:
            threat_indicators.append("Unusual off-hours activity")
        
        # ๋Œ€๋Ÿ‰ ๋ฐ์ดํ„ฐ ๋‹ค์šด๋กœ๋“œ
        total_download = sum(
            activity.get('data_transfer_mb', 0)
            for activity in activity_sequence
        )
        
        if total_download > 10000:  # 10GB ์ด์ƒ
            threat_indicators.append("Massive data exfiltration attempt")
        
        threat_level = len(threat_indicators) / 4.0  # 0-1 ์Šค์ผ€์ผ
        
        return {
            'user_id': user_id,
            'threat_level': threat_level,
            'indicators': threat_indicators,
            'anomaly_scores': anomaly_scores,
            'recommendation': self.get_recommendation(threat_level)
        }
    
    def get_recommendation(self, threat_level):
        """์œ„ํ˜‘ ์ˆ˜์ค€์— ๋”ฐ๋ฅธ ๊ถŒ์žฅ ์กฐ์น˜"""
        if threat_level >= 0.75:
            return "CRITICAL: Immediately suspend account and investigate"
        elif threat_level >= 0.5:
            return "HIGH: Require additional authentication and monitor closely"
        elif threat_level >= 0.25:
            return "MEDIUM: Flag for review and increase monitoring"
        else:
            return "LOW: Continue normal monitoring"

# ์‚ฌ์šฉ ์˜ˆ์‹œ
analyzer = BehaviorAnalyzer()

# ์‚ฌ์šฉ์ž ํ”„๋กœํ•„ ๊ตฌ์ถ•
historical_data = pd.read_csv('user_activity_history.csv')
for user_id in historical_data['user_id'].unique():
    analyzer.build_user_profile(user_id, historical_data)

# ์‹ค์‹œ๊ฐ„ ๋ถ„์„
current_activities = [
    {
        'login_hour': 23,
        'session_duration': 180,
        'location': 'Unknown',
        'files_accessed': 50,
        'data_transfer_mb': 5000,
        'accessed_sensitive_data': True
    },
    # ... more activities
]

threat_assessment = analyzer.detect_insider_threat('user123', current_activities)
print(f"๐Ÿšจ Threat Assessment:")
print(f"Level: {threat_assessment['threat_level']:.2f}")
print(f"Indicators: {threat_assessment['indicators']}")
print(f"Recommendation: {threat_assessment['recommendation']}")

๐Ÿ”— ํ†ตํ•ฉ ๋ณด์•ˆ ์ž๋™ํ™” ํ”Œ๋žซํผ ๊ตฌ์ถ•

์ด์ œ ์ง€๊ธˆ๊นŒ์ง€ ๋ฐฐ์šด ๋ชจ๋“  ๊ฑธ ํ•˜๋‚˜๋กœ ํ†ตํ•ฉํ•ด๋ณผ ์‹œ๊ฐ„์ด์•ผ! SOAR(Security Orchestration, Automation and Response) ํ”Œ๋žซํผ์„ ๊ตฌ์ถ•ํ•ด๋ณด์ž.

๐ŸŽญ SOAR ์•„ํ‚คํ…์ฒ˜

SOAR๋Š” ์—ฌ๋Ÿฌ ๋ณด์•ˆ ๋„๊ตฌ๋“ค์„ ์—ฐ๊ฒฐํ•˜๊ณ , ์ž๋™ํ™”๋œ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์‹คํ–‰ํ•˜๋ฉฐ, ์นจํ•ด ๋Œ€์‘์„ ์กฐ์œจํ•˜๋Š” ํ”Œ๋žซํผ์ด์•ผ.

import asyncio
import aiohttp
import json
from datetime import datetime
from typing import Dict, List, Any

class SOARPlatform:
    def __init__(self):
        self.integrations = {}
        self.playbooks = {}
        self.incident_queue = asyncio.Queue()
        self.active_incidents = {}
        
    def register_integration(self, name: str, integration):
        """๋ณด์•ˆ ๋„๊ตฌ ํ†ตํ•ฉ ๋“ฑ๋ก"""
        self.integrations[name] = integration
        print(f"โœ… Registered integration: {name}")
    
    def create_playbook(self, name: str, steps: List[Dict]):
        """์ž๋™ํ™” ํ”Œ๋ ˆ์ด๋ถ ์ƒ์„ฑ"""
        self.playbooks[name] = {
            'name': name,
            'steps': steps,
            'created_at': datetime.now()
        }
        print(f"โœ… Created playbook: {name}")
    
    async def execute_playbook(self, playbook_name: str, context: Dict):
        """ํ”Œ๋ ˆ์ด๋ถ ์‹คํ–‰"""
        if playbook_name not in self.playbooks:
            print(f"โŒ Playbook not found: {playbook_name}")
            return
        
        playbook = self.playbooks[playbook_name]
        print(f"๐ŸŽฌ Executing playbook: {playbook_name}")
        
        results = []
        
        for step in playbook['steps']:
            action = step['action']
            params = step.get('params', {})
            
            # ์ปจํ…์ŠคํŠธ ๋ณ€์ˆ˜ ์น˜ํ™˜
            params = self.substitute_variables(params, context)
            
            print(f"  โ–ถ Step: {action}")
            
            try:
                result = await self.execute_action(action, params)
                results.append({
                    'action': action,
                    'status': 'success',
                    'result': result
                })
                
                # ๊ฒฐ๊ณผ๋ฅผ ์ปจํ…์ŠคํŠธ์— ์ถ”๊ฐ€
                context[f'{action}_result'] = result
                
            except Exception as e:
                print(f"  โŒ Error in step {action}: {e}")
                results.append({
                    'action': action,
                    'status': 'failed',
                    'error': str(e)
                })
                
                # ์‹คํŒจ ์‹œ ์ค‘๋‹จํ• ์ง€ ๊ฒฐ์ •
                if step.get('critical', False):
                    break
        
        return results
    
    def substitute_variables(self, params: Dict, context: Dict) -> Dict:
        """๋ณ€์ˆ˜ ์น˜ํ™˜"""
        result = {}
        for key, value in params.items():
            if isinstance(value, str) and value.startswith('{{') and value.endswith('}}'):
                var_name = value[2:-2].strip()
                result[key] = context.get(var_name, value)
            else:
                result[key] = value
        return result
    
    async def execute_action(self, action: str, params: Dict) -> Any:
        """์•ก์…˜ ์‹คํ–‰"""
        if action == 'block_ip':
            return await self.block_ip(params['ip_address'])
        elif action == 'isolate_host':
            return await self.isolate_host(params['hostname'])
        elif action == 'send_alert':
            return await self.send_alert(params['message'], params['severity'])
        elif action == 'create_ticket':
            return await self.create_ticket(params['title'], params['description'])
        elif action == 'collect_evidence':
            return await self.collect_evidence(params['target'])
        elif action == 'run_scan':
            return await self.run_scan(params['target'], params['scan_type'])
        else:
            raise ValueError(f"Unknown action: {action}")
    
    async def block_ip(self, ip_address: str) -> Dict:
        """IP ์ฐจ๋‹จ"""
        # ๋ฐฉํ™”๋ฒฝ API ํ˜ธ์ถœ
        firewall = self.integrations.get('firewall')
        if firewall:
            result = await firewall.block_ip(ip_address)
            print(f"    โœ“ Blocked IP: {ip_address}")
            return result
        return {'status': 'no_firewall_integration'}
    
    async def isolate_host(self, hostname: str) -> Dict:
        """ํ˜ธ์ŠคํŠธ ๊ฒฉ๋ฆฌ"""
        # EDR API ํ˜ธ์ถœ
        edr = self.integrations.get('edr')
        if edr:
            result = await edr.isolate_host(hostname)
            print(f"    โœ“ Isolated host: {hostname}")
            return result
        return {'status': 'no_edr_integration'}
    
    async def send_alert(self, message: str, severity: str) -> Dict:
        """์•Œ๋ฆผ ์ „์†ก"""
        # Slack, Email, SMS ๋“ฑ
        notification = self.integrations.get('notification')
        if notification:
            result = await notification.send(message, severity)
            print(f"    โœ“ Alert sent: {severity}")
            return result
        return {'status': 'no_notification_integration'}
    
    async def create_ticket(self, title: str, description: str) -> Dict:
        """ํ‹ฐ์ผ“ ์ƒ์„ฑ"""
        # JIRA, ServiceNow ๋“ฑ
        ticketing = self.integrations.get('ticketing')
        if ticketing:
            result = await ticketing.create_ticket(title, description)
            print(f"    โœ“ Ticket created: {title}")
            return result
        return {'status': 'no_ticketing_integration'}
    
    async def collect_evidence(self, target: str) -> Dict:
        """์ฆ๊ฑฐ ์ˆ˜์ง‘"""
        # ํฌ๋ Œ์‹ ๋„๊ตฌ
        forensics = self.integrations.get('forensics')
        if forensics:
            result = await forensics.collect(target)
            print(f"    โœ“ Evidence collected from: {target}")
            return result
        return {'status': 'no_forensics_integration'}
    
    async def run_scan(self, target: str, scan_type: str) -> Dict:
        """๋ณด์•ˆ ์Šค์บ” ์‹คํ–‰"""
        scanner = self.integrations.get('scanner')
        if scanner:
            result = await scanner.scan(target, scan_type)
            print(f"    โœ“ Scan completed: {scan_type} on {target}")
            return result
        return {'status': 'no_scanner_integration'}
    
    async def handle_incident(self, incident: Dict):
        """์นจํ•ด ์‚ฌ๊ณ  ์ฒ˜๋ฆฌ"""
        incident_id = incident['id']
        incident_type = incident['type']
        
        print(f"\n๐Ÿšจ Handling incident: {incident_id} ({incident_type})")
        
        # ์ ์ ˆํ•œ ํ”Œ๋ ˆ์ด๋ถ ์„ ํƒ
        playbook_name = self.select_playbook(incident_type)
        
        if playbook_name:
            # ํ”Œ๋ ˆ์ด๋ถ ์‹คํ–‰
            context = {
                'incident_id': incident_id,
                'incident_type': incident_type,
                **incident.get('data', {})
            }
            
            results = await self.execute_playbook(playbook_name, context)
            
            # ๊ฒฐ๊ณผ ์ €์žฅ
            self.active_incidents[incident_id] = {
                'incident': incident,
                'playbook': playbook_name,
                'results': results,
                'status': 'completed',
                'completed_at': datetime.now()
            }
            
            print(f"โœ… Incident {incident_id} handled successfully")
        else:
            print(f"โš ๏ธ No playbook found for incident type: {incident_type}")
    
    def select_playbook(self, incident_type: str) -> str:
        """์‚ฌ๊ณ  ์œ ํ˜•์— ๋”ฐ๋ฅธ ํ”Œ๋ ˆ์ด๋ถ ์„ ํƒ"""
        playbook_mapping = {
            'brute_force': 'respond_to_brute_force',
            'malware': 'respond_to_malware',
            'data_exfiltration': 'respond_to_data_exfiltration',
            'sql_injection': 'respond_to_sql_injection',
            'ddos': 'respond_to_ddos'
        }
        return playbook_mapping.get(incident_type)
    
    async def start(self):
        """SOAR ํ”Œ๋žซํผ ์‹œ์ž‘"""
        print("๐Ÿš€ SOAR Platform started")
        
        while True:
            incident = await self.incident_queue.get()
            await self.handle_incident(incident)

# ์‚ฌ์šฉ ์˜ˆ์‹œ
async def main():
    soar = SOARPlatform()
    
    # ํ†ตํ•ฉ ๋“ฑ๋ก (์‹ค์ œ๋กœ๋Š” ๊ฐ ํ†ตํ•ฉ ํด๋ž˜์Šค ๊ตฌํ˜„ ํ•„์š”)
    # soar.register_integration('firewall', FirewallIntegration())
    # soar.register_integration('edr', EDRIntegration())
    # soar.register_integration('notification', NotificationIntegration())
    
    # ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ ๋Œ€์‘ ํ”Œ๋ ˆ์ด๋ถ
    soar.create_playbook('respond_to_brute_force', [
        {
            'action': 'block_ip',
            'params': {'ip_address': '{{source_ip}}'},
            'critical': True
        },
        {
            'action': 'send_alert',
            'params': {
                'message': 'Brute force attack blocked from {{source_ip}}',
                'severity': 'high'
            }
        },
        {
            'action': 'create_ticket',
            'params': {
                'title': 'Brute Force Attack Detected',
                'description': 'Source IP: {{source_ip}}, Target: {{target}}'
            }
        },
        {
            'action': 'collect_evidence',
            'params': {'target': '{{source_ip}}'}
        }
    ])
    
    # ๋ฉ€์›จ์–ด ๋Œ€์‘ ํ”Œ๋ ˆ์ด๋ถ
    soar.create_playbook('respond_to_malware', [
        {
            'action': 'isolate_host',
            'params': {'hostname': '{{infected_host}}'},
            'critical': True
        },
        {
            'action': 'send_alert',
            'params': {
                'message': '๐Ÿšจ CRITICAL: Malware detected on {{infected_host}}',
                'severity': 'critical'
            }
        },
        {
            'action': 'collect_evidence',
            'params': {'target': '{{infected_host}}'}
        },
        {
            'action': 'run_scan',
            'params': {
                'target': '{{infected_host}}',
                'scan_type': 'full_malware_scan'
            }
        },
        {
            'action': 'create_ticket',
            'params': {
                'title': 'Malware Incident',
                'description': 'Host {{infected_host}} infected with {{malware_name}}'
            }
        }
    ])
    
    # ์‚ฌ๊ณ  ๋ฐœ์ƒ ์‹œ๋ฎฌ๋ ˆ์ด์…˜
    await soar.incident_queue.put({
        'id': 'INC-2024-001',
        'type': 'brute_force',
        'data': {
            'source_ip': '192.168.1.100',
            'target': 'ssh_server',
            'attempts': 50
        }
    })
    
    await soar.incident_queue.put({
        'id': 'INC-2024-002',
        'type': 'malware',
        'data': {
            'infected_host': 'workstation-42',
            'malware_name': 'Trojan.Generic',
            'detection_time': datetime.now().isoformat()
        }
    })
    
    # SOAR ํ”Œ๋žซํผ ์‹คํ–‰
    await soar.start()

# asyncio.run(main())

๐Ÿ“Š ๋ณด์•ˆ ๋ฉ”ํŠธ๋ฆญ๊ณผ ๋ฆฌํฌํŒ…

์ž๋™ํ™” ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ–ˆ๋‹ค๋ฉด ์ด์ œ ํšจ๊ณผ๋ฅผ ์ธก์ •ํ•˜๊ณ  ์ง€์†์ ์œผ๋กœ ๊ฐœ์„ ํ•ด์•ผ ํ•ด. ๋ณด์•ˆ ๋ฉ”ํŠธ๋ฆญ์„ ์ถ”์ ํ•˜๊ณ  ์ •๊ธฐ์ ์œผ๋กœ ๋ฆฌํฌํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ฒŒ ์ค‘์š”ํ•˜์ง€!

๐Ÿ“ˆ ํ•ต์‹ฌ ๋ณด์•ˆ ๋ฉ”ํŠธ๋ฆญ

๋ฉ”ํŠธ๋ฆญ ์„ค๋ช… ๋ชฉํ‘œ
MTTD
(Mean Time To Detect)
์นจํ•ด ๋ฐœ์ƒ๋ถ€ํ„ฐ ํƒ์ง€๊นŒ์ง€ ํ‰๊ท  ์‹œ๊ฐ„ < 5๋ถ„
MTTR
(Mean Time To Respond)
ํƒ์ง€๋ถ€ํ„ฐ ๋Œ€์‘ ์™„๋ฃŒ๊นŒ์ง€ ํ‰๊ท  ์‹œ๊ฐ„ < 15๋ถ„
False Positive Rate ์˜คํƒ๋ฅ  (์ •์ƒ์„ ๊ณต๊ฒฉ์œผ๋กœ ์ž˜๋ชป ํŒ๋‹จ) < 5%
False Negative Rate ๋ฏธํƒ๋ฅ  (๊ณต๊ฒฉ์„ ์ •์ƒ์œผ๋กœ ์ž˜๋ชป ํŒ๋‹จ) < 1%
Incident Volume ์ผ์ผ ๋ณด์•ˆ ์‚ฌ๊ณ  ๋ฐœ์ƒ ๊ฑด์ˆ˜ ์ถ”์„ธ ๊ฐ์†Œ
Automation Rate ์ž๋™์œผ๋กœ ์ฒ˜๋ฆฌ๋œ ์‚ฌ๊ณ  ๋น„์œจ > 80%
Coverage Rate ๋ชจ๋‹ˆํ„ฐ๋ง ์ปค๋ฒ„๋ฆฌ์ง€ ๋น„์œจ > 95%

๐Ÿ“‹ ์ž๋™ ๋ฆฌํฌํŠธ ์ƒ์„ฑ

import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage

class SecurityReporter:
    def __init__(self, db_connection):
        self.db = db_connection
    
    def generate_daily_report(self, date=None):
        """์ผ์ผ ๋ณด์•ˆ ๋ฆฌํฌํŠธ ์ƒ์„ฑ"""
        if date is None:
            date = datetime.now().date()
        
        report = {
            'date': date,
            'summary': self.get_summary(date),
            'incidents': self.get_incidents(date),
            'top_threats': self.get_top_threats(date),
            'metrics': self.calculate_metrics(date),
            'trends': self.analyze_trends(date)
        }
        
        return report
    
    def get_summary(self, date):
        """์š”์•ฝ ์ •๋ณด"""
        query = f"""
        SELECT 
            COUNT(*) as total_events,
            SUM(CASE WHEN severity = 'critical' THEN 1 ELSE 0 END) as critical_events,
            SUM(CASE WHEN severity = 'high' THEN 1 ELSE 0 END) as high_events,
            SUM(CASE WHEN auto_resolved = true THEN 1 ELSE 0 END) as auto_resolved,
            COUNT(DISTINCT source_ip) as unique_attackers
        FROM security_events
        WHERE DATE(timestamp) = '{date}'
        """
        
        result = pd.read_sql(query, self.db)
        return result.to_dict('records')[0]
    
    def get_incidents(self, date):
        """์‚ฌ๊ณ  ๋ชฉ๋ก"""
        query = f"""
        SELECT 
            incident_id,
            incident_type,
            severity,
            source_ip,
            target,
            status,
            response_time_seconds
        FROM incidents
        WHERE DATE(created_at) = '{date}'
        ORDER BY severity DESC, created_at DESC
        LIMIT 10
        """
        
        return pd.read_sql(query, self.db)
    
    def get_top_threats(self, date):
        """์ฃผ์š” ์œ„ํ˜‘"""
        query = f"""
        SELECT 
            threat_type,
            COUNT(*) as count,
            COUNT(DISTINCT source_ip) as unique_sources
        FROM security_events
        WHERE DATE(timestamp) = '{date}'
        GROUP BY threat_type
        ORDER BY count DESC
        LIMIT 5
        """
        
        return pd.read_sql(query, self.db)
    
    def calculate_metrics(self, date):
        """๋ฉ”ํŠธ๋ฆญ ๊ณ„์‚ฐ"""
        # MTTD ๊ณ„์‚ฐ
        mttd_query = f"""
        SELECT AVG(detection_time_seconds) as mttd
        FROM incidents
        WHERE DATE(created_at) = '{date}'
        """
        
        # MTTR ๊ณ„์‚ฐ
        mttr_query = f"""
        SELECT AVG(response_time_seconds) as mttr
        FROM incidents
        WHERE DATE(created_at) = '{date}' AND status = 'resolved'
        """
        
        mttd = pd.read_sql(mttd_query, self.db)['mttd'][0] or 0
        mttr = pd.read_sql(mttr_query, self.db)['mttr'][0] or 0
        
        return {
            'mttd_seconds': mttd,
            'mttd_minutes': mttd / 60,
            'mttr_seconds': mttr,
            'mttr_minutes': mttr / 60
        }
    
    def analyze_trends(self, date, days=7):
        """ํŠธ๋ Œ๋“œ ๋ถ„์„"""
        start_date = date - timedelta(days=days)
        
        query = f"""
        SELECT 
            DATE(timestamp) as date,
            COUNT(*) as event_count,
            SUM(CASE WHEN severity IN ('critical', 'high') THEN 1 ELSE 0 END) as high_severity_count
        FROM security_events
        WHERE DATE(timestamp) BETWEEN '{start_date}' AND '{date}'
        GROUP BY DATE(timestamp)
        ORDER BY date
        """
        
        return pd.read_sql(query, self.db)
    
    def create_visualizations(self, report):
        """์‹œ๊ฐํ™” ์ƒ์„ฑ"""
        fig, axes = plt.subplots(2, 2, figsize=(15, 10))
        
        # 1. ์œ„ํ˜‘ ์œ ํ˜•๋ณ„ ๋ถ„ํฌ
        top_threats = report['top_threats']
        axes[0, 0].bar(top_threats['threat_type'], top_threats['count'])
        axes[0, 0].set_title('Top Threats')
        axes[0, 0].set_xlabel('Threat Type')
        axes[0, 0].set_ylabel('Count')
        axes[0, 0].tick_params(axis='x', rotation=45)
        
        # 2. ์‹ฌ๊ฐ๋„ ๋ถ„ํฌ
        summary = report['summary']
        severity_data = {
            'Critical': summary['critical_events'],
            'High': summary['high_events'],
            'Others': summary['total_events'] - summary['critical_events'] - summary['high_events']
        }
        axes[0, 1].pie(severity_data.values(), labels=severity_data.keys(), autopct='%1.1f%%')
        axes[0, 1].set_title('Severity Distribution')
        
        # 3. ํŠธ๋ Œ๋“œ
        trends = report['trends']
        axes[1, 0].plot(trends['date'], trends['event_count'], marker='o', label='Total Events')
        axes[1, 0].plot(trends['date'], trends['high_severity_count'], marker='s', label='High Severity')
        axes[1, 0].set_title('7-Day Trend')
        axes[1, 0].set_xlabel('Date')
        axes[1, 0].set_ylabel('Count')
        axes[1, 0].legend()
        axes[1, 0].tick_params(axis='x', rotation=45)
        
        # 4. ๋ฉ”ํŠธ๋ฆญ
        metrics = report['metrics']
        metric_names = ['MTTD\n(minutes)', 'MTTR\n(minutes)']
        metric_values = [metrics['mttd_minutes'], metrics['mttr_minutes']]
        axes[1, 1].bar(metric_names, metric_values, color=['#3498db', '#e74c3c'])
        axes[1, 1].set_title('Response Metrics')
        axes[1, 1].set_ylabel('Minutes')
        
        plt.tight_layout()
        plt.savefig('security_report.png', dpi=300, bbox_inches='tight')
        plt.close()
    
    def send_email_report(self, report, recipients):
        """์ด๋ฉ”์ผ๋กœ ๋ฆฌํฌํŠธ ์ „์†ก"""
        # HTML ๋ฆฌํฌํŠธ ์ƒ์„ฑ
        html_content = self.generate_html_report(report)
        
        # ์ด๋ฉ”์ผ ๊ตฌ์„ฑ
        msg = MIMEMultipart('related')
        msg['Subject'] = f"Security Daily Report - {report['date']}"
        msg['From'] = 'security@company.com'
        msg['To'] = ', '.join(recipients)
        
        # HTML ๋ณธ๋ฌธ
        html_part = MIMEText(html_content, 'html')
        msg.attach(html_part)
        
        # ์ด๋ฏธ์ง€ ์ฒจ๋ถ€
        with open('security_report.png', 'rb') as f:
            img = MIMEImage(f.read())
            img.add_header('Content-ID', '<report_chart>')
            msg.attach(img)
        
        # ์ „์†ก
        with smtplib.SMTP('smtp.company.com', 587) as server:
            server.starttls()
            server.login('security@company.com', 'password')
            server.send_message(msg)
        
        print(f"โœ… Report sent to {len(recipients)} recipients")
    
    def generate_html_report(self, report):
        """HTML ๋ฆฌํฌํŠธ ์ƒ์„ฑ"""
        summary = report['summary']
        metrics = report['metrics']
        
        html = f"""
        <html>
        <head>
            <style>.tx-container{max-width:100%;
margin:0 auto;
font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
line-height:1.8;
color:#2d3436;}
.tx-header{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
padding:40px 25px;
border-radius:16px;
text-align:center;
margin-bottom:35px;
box-shadow:0 8px 20px rgba(102,126,234,0.25);}
.tx-section{margin:30px 0;
padding:20px;
background:#f8f9fa;
border-radius:12px;
border-left:4px solid #667eea;}
.tx-highlight{background:linear-gradient(120deg,#ffeaa7 0%,#fdcb6e 100%);
padding:2px 8px;
border-radius:4px;
font-weight:600;}
.tx-box{background:#ffffff;
padding:20px;
margin:20px 0;
border-radius:10px;
box-shadow:0 3px 10px rgba(0,0,0,0.08);
border-top:3px solid #a29bfe;}
.tx-tip{background:#e8f5e9;
padding:15px;
border-radius:8px;
margin:15px 0;
border-left:4px solid #66bb6a;}
.tx-warning{background:#fff3e0;
padding:15px;
border-radius:8px;
margin:15px 0;
border-left:4px solid #ffa726;}
.tx-table{width:100%;
border-collapse:collapse;
margin:20px 0;
background:#fff;
border-radius:8px;
overflow:hidden;
box-shadow:0 2px 8px rgba(0,0,0,0.1);}
.tx-table th{background:#667eea;
color:#fff;
padding:12px;
text-align:left;
font-weight:600;}
.tx-table td{padding:12px;
border-bottom:1px solid #e9ecef;}
.tx-table tr:hover{background:#f1f3f5;}
.tx-point{color:#667eea;
font-weight:700;}
h2{color:#2d3436;
padding:15px 20px;
background:linear-gradient(120deg,#a29bfe 0%,#6c5ce7 100%);
border-radius:10px;
margin:30px 0 20px 0;
box-shadow:0 4px 12px rgba(108,92,231,0.2);}
h3{color:#2d3436;
padding:12px 18px;
background:linear-gradient(120deg,#fab1a0 0%,#fd79a8 100%);
border-radius:8px;
margin:25px 0 15px 0;}
h4{color:#2d3436;
padding:10px 15px;
background:linear-gradient(120deg,#81ecec 0%,#74b9ff 100%);
border-radius:6px;
margin:20px 0 10px 0;}</style>
        </head>
        <body>
            <h1>๐Ÿ›ก๏ธ Security Daily Report</h1>
            <p><strong>Date:</strong> {report['date']}</p>
            
            <div class="summary">
                <h2>๐Ÿ“Š Summary</h2>
                <div class="metric">
                    <div class="metric-value">{summary['total_events']}</div>
                    <div class="metric-label">Total Events</div>
                </div>
                <div class="metric">
                    <div class="metric-value" style="color: #e74c3c;">{summary['critical_events']}</div>
                    <div class="metric-label">Critical</div>
                </div>
                <div class="metric">
                    <div class="metric-value" style="color: #f39c12;">{summary['high_events']}</div>
                    <div class="metric-label">High</div>
                </div>
                <div class="metric">
                    <div class="metric-value" style="color: #27ae60;">{summary['auto_resolved']}</div>
                    <div class="metric-label">Auto Resolved</div>
                </div>
            </div>
            
            <h2>โฑ๏ธ Response Metrics</h2>
            <div class="metric">
                <div class="metric-value">{metrics['mttd_minutes']:.1f}</div>
                <div class="metric-label">MTTD (minutes)</div>
            </div>
            <div class="metric">
                <div class="metric-value">{metrics['mttr_minutes']:.1f}</div>
                <div class="metric-label">MTTR (minutes)</div>
            </div>
            
            <h2>๐ŸŽฏ Top Threats</h2>
            <table>
                <tr>
                    <th>Threat Type</th>
                    <th>Count</th>
                    <th>Unique Sources</th>
                </tr>
        """
        
        for _, row in report['top_threats'].iterrows():
            html += f"""
                <tr>
                    <td>{row['threat_type']}</td>
                    <td>{row['count']}</td>
                    <td>{row['unique_sources']}</td>
                </tr>
            """
        
        html += """
            </table>
            
            <h2>๐Ÿ“ˆ Visualizations</h2>
            <img src="cid:report_chart" style="max-width: 100%;">
            
            <p style="margin-top: 30px; color: #7f8c8d; font-size: 12px;">
                This is an automated report generated by the Security Automation Platform.
            </p>
        </body>
        </html>
        """
        
        return html

# ์‚ฌ์šฉ ์˜ˆ์‹œ
# reporter = SecurityReporter(db_connection)
# report = reporter.generate_daily_report()
# reporter.create_visualizations(report)
# reporter.send_email_report(report, ['security-team@company.com'])

๐ŸŽ“ ์‹ค์ „ ๊ตฌํ˜„ ๊ฐ€์ด๋“œ

์ž, ์ด์ œ ์‹ค์ œ๋กœ ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•  ๋•Œ ๋‹จ๊ณ„๋ณ„๋กœ ์–ด๋–ป๊ฒŒ ์ง„ํ–‰ํ•ด์•ผ ํ•˜๋Š”์ง€ ์ •๋ฆฌํ•ด๋ณผ๊ฒŒ!

๐Ÿš€ Phase 1: ๊ธฐ์ดˆ ์ธํ”„๋ผ ๊ตฌ์ถ• (1-2์ฃผ)

1๋‹จ๊ณ„: ๋กœ๊ทธ ์ˆ˜์ง‘ ํ™˜๊ฒฝ ๊ตฌ์ถ•

  • โœ“ Filebeat/Fluentd ์„ค์น˜ ๋ฐ ์„ค์ •
  • โœ“ ์ค‘์•™ ๋กœ๊ทธ ์ €์žฅ์†Œ ๊ตฌ์ถ• (Elasticsearch)
  • โœ“ ๋กœ๊ทธ ์ •๊ทœํ™” ํŒŒ์ดํ”„๋ผ์ธ ๊ตฌ์„ฑ
  • โœ“ ๊ธฐ๋ณธ ์ธ๋ฑ์‹ฑ ๋ฐ ๋ณด์กด ์ •์ฑ… ์„ค์ •

2๋‹จ๊ณ„: ์‹œ๊ฐํ™” ๋Œ€์‹œ๋ณด๋“œ ๊ตฌ์ถ•

  • โœ“ Kibana ์„ค์น˜ ๋ฐ ์„ค์ •
  • โœ“ ๊ธฐ๋ณธ ๋ณด์•ˆ ๋Œ€์‹œ๋ณด๋“œ ์ƒ์„ฑ
  • โœ“ ์ฃผ์š” ๋ฉ”ํŠธ๋ฆญ ์‹œ๊ฐํ™”
  • โœ“ ์‹ค์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ทฐ ๊ตฌ์„ฑ

โšก Phase 2: ํƒ์ง€ ๊ทœ์น™ ๊ตฌํ˜„ (2-3์ฃผ)

3๋‹จ๊ณ„: ๊ธฐ๋ณธ ํƒ์ง€ ๊ทœ์น™ ์ž‘์„ฑ

  • โœ“ ๋ฌด์ฐจ๋ณ„ ๋Œ€์ž… ๊ณต๊ฒฉ ํƒ์ง€
  • โœ“ SQL Injection ์‹œ๋„ ํƒ์ง€
  • โœ“ ๋น„์ •์ƒ ํŠธ๋ž˜ํ”ฝ ํŒจํ„ด ํƒ์ง€
  • โœ“ ๊ถŒํ•œ ์ƒ์Šน ์‹œ๋„ ํƒ์ง€

4๋‹จ๊ณ„: ์•Œ๋ฆผ ์‹œ์Šคํ…œ ๊ตฌ์ถ•

  • โœ“ Slack/Email ํ†ตํ•ฉ
  • โœ“ ์‹ฌ๊ฐ๋„๋ณ„ ์•Œ๋ฆผ ๋ผ์šฐํŒ…
  • โœ“ ์•Œ๋ฆผ ํ…œํ”Œ๋ฆฟ ์ž‘์„ฑ
  • โœ“ ์—์Šค์ปฌ๋ ˆ์ด์…˜ ์ •์ฑ… ์ˆ˜๋ฆฝ

๐Ÿค– Phase 3: ์ž๋™ํ™” ๊ตฌํ˜„ (3-4์ฃผ)

5๋‹จ๊ณ„: ๊ธฐ๋ณธ ์ž๋™ ๋Œ€์‘ ๊ตฌํ˜„

  • โœ“ IP ์ฐจ๋‹จ ์ž๋™ํ™”
  • โœ“ ๊ณ„์ • ์ž ๊ธˆ ์ž๋™ํ™”
  • โœ“ ๋กœ๊ทธ ์ˆ˜์ง‘ ์ž๋™ํ™”
  • โœ“ ์ฆ๊ฑฐ ๋ณด์กด ์ž๋™ํ™”

6๋‹จ๊ณ„: ํ”Œ๋ ˆ์ด๋ถ ๊ฐœ๋ฐœ

  • โœ“ ์ฃผ์š” ๊ณต๊ฒฉ ์‹œ๋‚˜๋ฆฌ์˜ค๋ณ„ ํ”Œ๋ ˆ์ด๋ถ
  • โœ“ ํ”Œ๋ ˆ์ด๋ถ ํ…Œ์ŠคํŠธ ๋ฐ ๊ฒ€์ฆ
  • โœ“ ๋ฌธ์„œํ™” ๋ฐ ๊ต์œก
  • โœ“ ์ •๊ธฐ ์—…๋ฐ์ดํŠธ ํ”„๋กœ์„ธ์Šค ์ˆ˜๋ฆฝ

๐Ÿง  Phase 4: ๊ณ ๊ธ‰ ๊ธฐ๋Šฅ ๊ตฌํ˜„ (4-6์ฃผ)

7๋‹จ๊ณ„: ๋จธ์‹ ๋Ÿฌ๋‹ ๋ชจ๋ธ ๋„์ž…

  • โœ“ ์ด์ƒ ํƒ์ง€ ๋ชจ๋ธ ํ•™์Šต
  • โœ“ ํ–‰์œ„ ๋ถ„์„ ์‹œ์Šคํ…œ ๊ตฌ์ถ•
  • โœ“ ๋ชจ๋ธ ์„ฑ๋Šฅ ๋ชจ๋‹ˆํ„ฐ๋ง
  • โœ“ ์ง€์†์ ์ธ ๋ชจ๋ธ ๊ฐœ์„ 

8๋‹จ๊ณ„: SOAR ํ”Œ๋žซํผ ํ†ตํ•ฉ

  • โœ“ ๋‹ค์–‘ํ•œ ๋ณด์•ˆ ๋„๊ตฌ ํ†ตํ•ฉ
  • โœ“ ์›Œํฌํ”Œ๋กœ์šฐ ์ž๋™ํ™”
  • โœ“ ์ผ€์ด์Šค ๊ด€๋ฆฌ ์‹œ์Šคํ…œ
  • โœ“ ๋ฆฌํฌํŒ… ์ž๋™ํ™”

๐Ÿ’ก ์‹ค์ „ ํŒ: ์ฒ˜์Œ๋ถ€ํ„ฐ ์™„๋ฒฝํ•œ ์‹œ์Šคํ…œ์„ ๋งŒ๋“ค๋ ค๊ณ  ํ•˜์ง€ ๋งˆ! ์ž‘์€ ๊ฒƒ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ด์„œ ์ ์ง„์ ์œผ๋กœ ํ™•์žฅํ•˜๋Š” ๊ฒŒ ํ›จ์”ฌ ํšจ๊ณผ์ ์ด์•ผ. ํŠนํžˆ ์žฌ๋Šฅ๋„ท ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ ๊ฒฝํ—˜ ๋งŽ์€ ๋ณด์•ˆ ์ „๋ฌธ๊ฐ€์˜ ์กฐ์–ธ์„ ๊ตฌํ•˜๋ฉด ์‹œํ–‰์ฐฉ์˜ค๋ฅผ ๋งŽ์ด ์ค„์ผ ์ˆ˜ ์žˆ์–ด. ๐ŸŽฏ

๐Ÿ”ง ์‹ค๋ฌด ์ฒดํฌ๋ฆฌ์ŠคํŠธ

โœ… ์ผ์ผ ์ ๊ฒ€ ์‚ฌํ•ญ

  • โ–ก ๋กœ๊ทธ ์ˆ˜์ง‘ ์ƒํƒœ ํ™•์ธ (๋ชจ๋“  ์†Œ์Šค์—์„œ ์ •์ƒ ์ˆ˜์ง‘ ์ค‘์ธ๊ฐ€?)
  • โ–ก ๋Œ€์‹œ๋ณด๋“œ ์ด์ƒ ์ง•ํ›„ ํ™•์ธ
  • โ–ก ์ž๋™ ๋Œ€์‘ ์‹œ์Šคํ…œ ๋™์ž‘ ํ™•์ธ
  • โ–ก ์•Œ๋ฆผ ์‹œ์Šคํ…œ ์ •์ƒ ์ž‘๋™ ํ™•์ธ
  • โ–ก ๋””์Šคํฌ ์šฉ๋Ÿ‰ ๋ฐ ์‹œ์Šคํ…œ ๋ฆฌ์†Œ์Šค ํ™•์ธ
  • โ–ก ๋ฏธํ•ด๊ฒฐ ์‚ฌ๊ณ  ๊ฒ€ํ† 

โœ… ์ฃผ๊ฐ„ ์ ๊ฒ€ ์‚ฌํ•ญ

  • โ–ก ํƒ์ง€ ๊ทœ์น™ ํšจ๊ณผ์„ฑ ๋ถ„์„ (์˜คํƒ/๋ฏธํƒ ๋น„์œจ)
  • โ–ก ํ”Œ๋ ˆ์ด๋ถ ์‹คํ–‰ ๊ฒฐ๊ณผ ๊ฒ€ํ† 
  • โ–ก ๋ณด์•ˆ ๋ฉ”ํŠธ๋ฆญ ํŠธ๋ Œ๋“œ ๋ถ„์„
  • โ–ก ์ƒˆ๋กœ์šด ์œ„ํ˜‘ ์ธํ…”๋ฆฌ์ „์Šค ์—…๋ฐ์ดํŠธ
  • โ–ก ์‹œ์Šคํ…œ ๋ฐฑ์—… ํ™•์ธ
  • โ–ก ํŒ€ ํšŒ์˜ ๋ฐ ๊ฐœ์„  ์‚ฌํ•ญ ๋…ผ์˜

โœ… ์›”๊ฐ„ ์ ๊ฒ€ ์‚ฌํ•ญ

  • โ–ก ์ „์ฒด ์‹œ์Šคํ…œ ์„ฑ๋Šฅ ํ‰๊ฐ€
  • โ–ก ๋จธ์‹ ๋Ÿฌ๋‹ ๋ชจ๋ธ ์žฌํ•™์Šต ๋ฐ ํŠœ๋‹
  • โ–ก ๋ณด์•ˆ ์ •์ฑ… ๋ฐ ๊ทœ์น™ ์—…๋ฐ์ดํŠธ
  • โ–ก ์นจํ•ด ๋Œ€์‘ ํ›ˆ๋ จ ์‹ค์‹œ
  • โ–ก ์›”๊ฐ„ ๋ณด์•ˆ ๋ฆฌํฌํŠธ ์ž‘์„ฑ ๋ฐ ๊ณต์œ 
  • โ–ก ์‹œ์Šคํ…œ ์—…๋ฐ์ดํŠธ ๋ฐ ํŒจ์น˜
  • โ–ก ์žฌํ•ด ๋ณต๊ตฌ ๊ณ„ํš ํ…Œ์ŠคํŠธ

๐ŸŽฏ ๋งˆ๋ฌด๋ฆฌํ•˜๋ฉฐ

์™€, ์—ฌ๊ธฐ๊นŒ์ง€ ์ •๋ง ๊ธด ์—ฌ์ •์ด์—ˆ์ง€? ๐Ÿ˜… ๋ณด์•ˆ ๋กœ๊ทธ ๊ด€๋ฆฌ์™€ ์นจํ•ด ๋Œ€์‘ ์ž๋™ํ™”๋Š” ํ•œ ๋ฒˆ์— ์™„์„ฑ๋˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ์ง€์†์ ์œผ๋กœ ๊ฐœ์„ ํ•˜๊ณ  ๋ฐœ์ „์‹œ์ผœ์•ผ ํ•˜๋Š” ํ”„๋กœ์„ธ์Šค์•ผ.

ํ•ต์‹ฌ์„ ์ •๋ฆฌํ•˜์ž๋ฉด:

1. ๋กœ๊ทธ๋Š” ๋ณด์•ˆ์˜ ์‹œ์ž‘์  ๐Ÿ“
๋ชจ๋“  ๋ณด์•ˆ ํ™œ๋™์˜ ๊ธฐ๋ฐ˜์ด ๋˜๋Š” ๋กœ๊ทธ๋ฅผ ์ฒด๊ณ„์ ์œผ๋กœ ์ˆ˜์ง‘ํ•˜๊ณ  ๊ด€๋ฆฌํ•ด์•ผ ํ•ด.

2. ์ž๋™ํ™”๋Š” ์„ ํƒ์ด ์•„๋‹Œ ํ•„์ˆ˜ ๐Ÿค–
์‚ฌ๋žŒ์ด 24์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋งํ•  ์ˆ˜ ์—†์œผ๋‹ˆ ์ž๋™ํ™” ์‹œ์Šคํ…œ์ด ๋ฐ˜๋“œ์‹œ ํ•„์š”ํ•ด.

3. ์ง€์†์ ์ธ ๊ฐœ์„ ์ด ์ค‘์š” ๐Ÿ“ˆ
๊ณต๊ฒฉ ๊ธฐ๋ฒ•์€ ๊ณ„์† ์ง„ํ™”ํ•˜๋‹ˆ๊นŒ ์šฐ๋ฆฌ ๋ฐฉ์–ด ์‹œ์Šคํ…œ๋„ ํ•จ๊ป˜ ๋ฐœ์ „ํ•ด์•ผ ํ•ด.

4. ํ˜‘์—…๊ณผ ์ง€์‹ ๊ณต์œ  ๐Ÿค
ํ˜ผ์ž์„œ ๋ชจ๋“  ๊ฑธ ๋‹ค ์•Œ ์ˆ˜๋Š” ์—†์–ด. ์žฌ๋Šฅ๋„ท ๊ฐ™์€ ํ”Œ๋žซํผ์—์„œ ์ „๋ฌธ๊ฐ€๋“ค๊ณผ ์†Œํ†ตํ•˜๊ณ  ๋ฐฐ์šฐ๋Š” ๊ฒŒ ์ •๋ง ์ค‘์š”ํ•ด!

โš ๏ธ ๋งˆ์ง€๋ง‰ ๋‹น๋ถ€: ๋ณด์•ˆ ์ž๋™ํ™” ์‹œ์Šคํ…œ์„ ๊ตฌ์ถ•ํ•  ๋•Œ๋Š” ๋ฐ˜๋“œ์‹œ ํ…Œ์ŠคํŠธ ํ™˜๊ฒฝ์—์„œ ์ถฉ๋ถ„ํžˆ ๊ฒ€์ฆํ•œ ํ›„์— ํ”„๋กœ๋•์…˜์— ์ ์šฉํ•ด์•ผ ํ•ด. ์ž˜๋ชป๋œ ์ž๋™ ๋Œ€์‘ ๊ทœ์น™์ด ์ •์ƒ ์„œ๋น„์Šค๊นŒ์ง€ ์ฐจ๋‹จํ•  ์ˆ˜ ์žˆ๊ฑฐ๋“ . ์•ˆ์ „ํ•˜๊ฒŒ, ๊ทธ๋ฆฌ๊ณ  ๋‹จ๊ณ„์ ์œผ๋กœ ์ง„ํ–‰ํ•˜์ž! ๐Ÿ›ก๏ธ

๋ณด์•ˆ์€ ๋์ด ์—†๋Š” ์‹ธ์›€์ด์ง€๋งŒ, ์ œ๋Œ€๋กœ ๋œ ์ž๋™ํ™” ์‹œ์Šคํ…œ์„ ๊ฐ–์ถ”๋ฉด ํ›จ์”ฌ ํšจ์œจ์ ์œผ๋กœ ๋Œ€์‘ํ•  ์ˆ˜ ์žˆ์–ด. ์ด ๊ธ€์ด ๋„ˆ์˜ ๋ณด์•ˆ ์‹œ์Šคํ…œ ๊ตฌ์ถ•์— ๋„์›€์ด ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ์–ด! ๐Ÿ’ช

๊ถ๊ธˆํ•œ ์ ์ด ์žˆ๊ฑฐ๋‚˜ ๋” ๊นŠ์ด ์žˆ๋Š” ๋‚ด์šฉ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ์žฌ๋Šฅ๋„ท์—์„œ ๋ณด์•ˆ ์ „๋ฌธ๊ฐ€๋“ค์„ ์ฐพ์•„๋ณด๋Š” ๊ฒƒ๋„ ์ข‹์€ ๋ฐฉ๋ฒ•์ด์•ผ. ์‹ค์ „ ๊ฒฝํ—˜์ด ํ’๋ถ€ํ•œ ์ „๋ฌธ๊ฐ€๋“ค์˜ ์กฐ์–ธ์€ ์ •๋ง ๊ฐ’์ง€๊ฑฐ๋“ ! ๐ŸŽ“

๊ทธ๋Ÿผ ์•ˆ์ „ํ•œ ์ฝ”๋”ฉ ํ•˜๊ณ , ์‹œ์Šคํ…œ ์ž˜ ์ง€์ผœ! ํ™”์ดํŒ…! ๐Ÿš€๐Ÿ”

๋Œ“๊ธ€ ์ž‘์„ฑ

์ด ๊ธ€์— ๋Œ€ํ•œ ์—ฌ๋Ÿฌ๋ถ„์˜ ์ƒ๊ฐ์„ ๋“ค๋ ค์ฃผ์„ธ์š”

๋Œ“๊ธ€ 0
๋Œ“๊ธ€์„ ๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘์ž…๋‹ˆ๋‹ค.

์•„์ง ๋Œ“๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค.