MDR
Managed Detection and Response
외부 보안 전문가가 24/7 위협을 모니터링하고 대응하는 관리형 보안 서비스. 자체 SOC 구축이 어려운 중소기업이나, 내부 팀을 보완하려는 대기업에게 적합합니다.
Managed Detection and Response
외부 보안 전문가가 24/7 위협을 모니터링하고 대응하는 관리형 보안 서비스. 자체 SOC 구축이 어려운 중소기업이나, 내부 팀을 보완하려는 대기업에게 적합합니다.
MDR(Managed Detection and Response)은 외부 보안 전문 업체가 고객사의 보안 이벤트를 24시간 모니터링하고, 위협을 탐지하여 대응까지 수행하는 서비스입니다. 기존 MSSP(Managed Security Service Provider)가 주로 알림 전달에 그쳤다면, MDR은 실제 위협 분석과 대응 조치까지 포함합니다.
MDR 서비스는 일반적으로 EDR/XDR 솔루션을 기반으로 합니다. 고객사에 에이전트를 설치하고, 수집된 텔레메트리를 MDR 업체의 SOC에서 분석합니다. AI/ML 기반 자동 탐지와 함께 숙련된 위협 헌터가 수동 분석을 수행하여 False Positive를 걸러내고 실제 위협에 집중합니다.
대표적인 MDR 업체로는 CrowdStrike Falcon Complete, SentinelOne Vigilance, Palo Alto Unit 42 MDR, Arctic Wolf 등이 있습니다. 국내에서는 SK쉴더스, 안랩, 이글루코퍼레이션 등이 MDR 서비스를 제공합니다. 클라우드 환경 특화 MDR로는 Red Canary, Expel 등이 주목받고 있습니다.
MDR의 핵심 가치는 보안 인력 부족 문제 해결입니다. 숙련된 보안 분석가를 채용하고 유지하는 것은 비용이 많이 들고 어렵습니다. MDR을 통해 전문가 팀을 "대여"하여 자체 SOC 구축 대비 빠르게 보안 역량을 확보할 수 있습니다. 특히 야간/주말 모니터링 공백을 메우는 데 효과적입니다.
# MDR 서비스 연동 API 예제 (가상의 MDR 플랫폼)
import requests
from datetime import datetime, timedelta
from typing import Dict, List, Optional
import hashlib
import hmac
import json
class MDRClient:
"""MDR 서비스 API 클라이언트"""
def __init__(self, api_key: str, api_secret: str, base_url: str):
self.api_key = api_key
self.api_secret = api_secret
self.base_url = base_url
def _sign_request(self, method: str, path: str, body: str = "") -> Dict[str, str]:
"""API 요청 서명 생성"""
timestamp = datetime.utcnow().isoformat()
string_to_sign = f"{method}\n{path}\n{timestamp}\n{body}"
signature = hmac.new(
self.api_secret.encode(),
string_to_sign.encode(),
hashlib.sha256
).hexdigest()
return {
"X-API-Key": self.api_key,
"X-Timestamp": timestamp,
"X-Signature": signature,
"Content-Type": "application/json"
}
# ==========================================
# 1. 인시던트 조회
# ==========================================
def get_incidents(self, status: str = "open", days: int = 7) -> List[Dict]:
"""MDR에서 탐지한 인시던트 목록 조회"""
path = "/api/v1/incidents"
params = {
"status": status,
"start_time": (datetime.utcnow() - timedelta(days=days)).isoformat(),
"end_time": datetime.utcnow().isoformat()
}
headers = self._sign_request("GET", path)
response = requests.get(
f"{self.base_url}{path}",
headers=headers,
params=params
)
if response.status_code == 200:
return response.json()["incidents"]
else:
raise Exception(f"API Error: {response.status_code}")
def get_incident_detail(self, incident_id: str) -> Dict:
"""인시던트 상세 정보 조회"""
path = f"/api/v1/incidents/{incident_id}"
headers = self._sign_request("GET", path)
response = requests.get(f"{self.base_url}{path}", headers=headers)
return response.json()
# ==========================================
# 2. 대응 조치 요청
# ==========================================
def request_containment(self, incident_id: str, action: str,
targets: List[str], reason: str) -> Dict:
"""
MDR 팀에 차단/격리 조치 요청
action: "isolate_host", "block_ip", "disable_account", "quarantine_file"
"""
path = f"/api/v1/incidents/{incident_id}/actions"
body = {
"action_type": action,
"targets": targets,
"reason": reason,
"requested_by": "customer_soc",
"urgency": "high"
}
headers = self._sign_request("POST", path, json.dumps(body))
response = requests.post(
f"{self.base_url}{path}",
headers=headers,
json=body
)
return response.json()
def approve_action(self, action_id: str, approved: bool, comment: str = "") -> Dict:
"""MDR 팀의 대응 조치 승인/거부"""
path = f"/api/v1/actions/{action_id}/approval"
body = {
"approved": approved,
"comment": comment,
"approved_by": "security_manager"
}
headers = self._sign_request("POST", path, json.dumps(body))
response = requests.post(
f"{self.base_url}{path}",
headers=headers,
json=body
)
return response.json()
# ==========================================
# 3. 위협 인텔리전스 조회
# ==========================================
def query_threat_intel(self, indicators: List[str]) -> Dict:
"""IOC(Indicator of Compromise) 조회"""
path = "/api/v1/threat-intel/lookup"
body = {"indicators": indicators}
headers = self._sign_request("POST", path, json.dumps(body))
response = requests.post(
f"{self.base_url}{path}",
headers=headers,
json=body
)
return response.json()
# ==========================================
# 4. 리포트 및 메트릭
# ==========================================
def get_monthly_report(self, year: int, month: int) -> Dict:
"""월간 MDR 리포트 조회"""
path = f"/api/v1/reports/monthly/{year}/{month}"
headers = self._sign_request("GET", path)
response = requests.get(f"{self.base_url}{path}", headers=headers)
return response.json()
def get_metrics(self) -> Dict:
"""SLA 메트릭 조회 (MTTD, MTTR 등)"""
path = "/api/v1/metrics"
headers = self._sign_request("GET", path)
response = requests.get(f"{self.base_url}{path}", headers=headers)
return response.json()
# ==========================================
# 5. 사용 예시
# ==========================================
def main():
client = MDRClient(
api_key="your-api-key",
api_secret="your-api-secret",
base_url="https://mdr.example.com"
)
# 열린 인시던트 조회
incidents = client.get_incidents(status="open", days=7)
print(f"Open incidents: {len(incidents)}")
for incident in incidents:
print(f"""
ID: {incident['id']}
Severity: {incident['severity']}
Title: {incident['title']}
Status: {incident['status']}
Detected: {incident['detected_at']}
Assigned Analyst: {incident['analyst']}
""")
# 상세 정보 조회
detail = client.get_incident_detail(incident['id'])
# Critical 인시던트에 대해 호스트 격리 요청
if incident['severity'] == 'critical':
affected_hosts = detail.get('affected_hosts', [])
if affected_hosts:
result = client.request_containment(
incident_id=incident['id'],
action="isolate_host",
targets=affected_hosts,
reason="Critical malware detected, immediate containment required"
)
print(f"Containment requested: {result['action_id']}")
# 메트릭 조회
metrics = client.get_metrics()
print(f"""
=== MDR SLA Metrics ===
MTTD (Mean Time to Detect): {metrics['mttd_minutes']} minutes
MTTR (Mean Time to Respond): {metrics['mttr_minutes']} minutes
Incidents this month: {metrics['incidents_count']}
False Positive Rate: {metrics['false_positive_rate']}%
""")
if __name__ == "__main__":
main()
CISO: "보안팀이 3명인데 24/7 모니터링을 어떻게 하죠? 주말에 랜섬웨어 터지면 대응이 안 돼요."
보안담당자: "MDR 서비스 도입을 검토해보면 어떨까요? 야간/주말 커버리지를 맡기고, 저희 팀은 낮 시간대와 내부 보안 정책에 집중하면 됩니다."
CISO: "비용 대비 효과는요?"
보안담당자: "24/7 SOC 자체 구축하려면 최소 8명 이상 필요하고 SIEM, SOAR 도구 비용도 있어요. MDR은 그 1/3 비용으로 더 빠른 MTTR을 보장합니다."
면접관: "MSSP와 MDR의 차이점이 뭔가요?"
지원자: "MSSP는 전통적으로 방화벽, IDS 같은 보안 장비를 관리하고 알림을 전달하는 역할이었습니다. MDR은 여기서 한 발 더 나아가 실제 위협 분석, 인시던트 조사, 대응 조치까지 수행합니다. MSSP가 '경보 전달'이라면 MDR은 '위협 대응'입니다."
리뷰어: "MDR 팀한테 자동 격리 권한 줬어요? containment 액션이 바로 실행되면 업무 영향 클 수 있어요."
작성자: "Critical만 MDR 팀 판단으로 즉시 실행하고, High 이하는 우리 팀 승인 후 실행하도록 workflow 설정했어요."