# Windows Notification Analysis MCP Server
## 개요
Windows 알림 데이터베이스(wpndatabase.db)를 E01 이미지에서 추출하고 분석하는 MCP(Model Context Protocol) 서버입니다.
E01 포렌식 이미지에서 Windows 사용자별 알림 데이터베이스를 자동으로 찾아 추출하고, 알림 내역을 파싱하여 분석 가능한 형태로 제공합니다.
MCP를 지원하는 에이전트(Claude Desktop 등)와 연동하여 포렌식 분석을 수행할 수 있습니다.
### 주요 기능
- **E01 이미지 처리**: E01 포렌식 이미지에서 직접 파일 탐색 및 추출
- **자동 DB 검색**: Windows 사용자별 알림 데이터베이스 자동 탐지
- **알림 파싱**: SQLite 데이터베이스에서 알림 데이터 추출 및 XML 파싱
- **다양한 검색 기능**: 키워드 검색, 앱별 필터링, 타임라인 분석
- **민감 정보 탐지**: 비밀번호, 코드 등 민감한 정보 자동 추출
- **통계 분석**: 알림 패턴 분석 및 통계 생성
## 설치 방법 (Windows 기준)
Python 3.12 환경에 최적화되어 있습니다. 의존성 관리를 위해 uv 사용을 권장합니다.
### 1. Python 3.12 가상환경 생성
```powershell
uv python install 3.12
uv venv .venv --python 3.12
.venv\Scripts\activate
```
### 2. 의존성 설치
pytsk3와 libewf의 호환성을 위해 반드시 아래 명령어로 설치하세요.
```powershell
uv pip install -r requirements.txt
```
### 사용 방법 (Claude Desktop)
claude_desktop_config.json 파일에 아래 설정을 추가하세요. (경로는 본인의 설치 위치에 맞게 수정해야 합니다.)
```JSON
{
"mcpServers": {
"notification-forensics": {
"command": "C:\\Path\\To\\Your\\notification-mcp-server\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Path\\To\\Your\\notification-mcp-server\\server.py"
]
}
}
}
```
**주의사항**
경로 설정: 위 설정 파일의 경로(C:\\Path\\To...)는 반드시 실제 프로젝트가 위치한 경로로 변경해야함
### 제공되는 도구 (Tools)
**E01 이미지 분석**
scan_e01_for_notification_dbs - E01 이미지에서 알림 데이터베이스 스캔
extract_notification_db - E01에서 알림 DB 추출
auto_analyze_e01_notifications - 자동 종합 분석
**알림 데이터 파싱**
parse_all_notifications - 모든 알림 파싱
search_notifications - 키워드로 알림 검색
get_notifications_by_app - 특정 앱의 알림 조회
get_notification_timeline - 시간순 타임라인 생성
**분석 및 통계**
get_notification_statistics - 통계 분석
list_notification_apps - 알림 발송 앱 목록
extract_sensitive_content - 민감한 정보 추출
### 제공되는 도구 (Tools) 상세 설명
#### 1. `scan_e01_for_notification_dbs`
E01 이미지에서 알림 데이터베이스 검색
```json
{
"e01_path": "/path/to/image.E01",
"partition_offset": 0,
"max_results": 10
}
```
#### 2. `extract_notification_db`
특정 사용자의 알림 DB 추출
```json
{
"e01_path": "/path/to/image.E01",
"username": "john.doe",
"partition_offset": 0
}
```
#### 3. `parse_all_notifications`
모든 알림 파싱
```json
{
"db_path": "/path/to/wpndatabase.db",
"limit": 1000
}
```
#### 4. `search_notifications`
키워드로 알림 검색
```json
{
"db_path": "/path/to/wpndatabase.db",
"keyword": "password",
"limit": 100
}
```
#### 5. `get_notifications_by_app`
특정 앱의 알림 조회
```json
{
"db_path": "/path/to/wpndatabase.db",
"app_id": "Outlook",
"limit": 100
}
```
#### 6. `get_notification_timeline`
시간순 알림 타임라인 생성
```json
{
"db_path": "/path/to/wpndatabase.db",
"start_time": 1609459200,
"end_time": 1640995199,
"limit": 1000
}
```
#### 7. `get_notification_statistics`
알림 통계 생성
```json
{
"db_path": "/path/to/wpndatabase.db"
}
```
#### 8. `list_notification_apps`
알림을 보낸 앱 목록 조회
```json
{
"db_path": "/path/to/wpndatabase.db"
}
```
#### 9. `extract_sensitive_content`
민감한 정보 포함 알림 추출
```json
{
"db_path": "/path/to/wpndatabase.db",
"custom_keywords": ["confidential", "secret"]
}
```
#### 10. `auto_analyze_e01_notifications`
E01 이미지 자동 종합 분석
```json
{
"e01_path": "/path/to/image.E01",
"partition_offset": 0,
"include_sensitive": true
}
```
## 핵심 모듈 설명
### `e01_handler.py`
- E01 포렌식 이미지 마운트
- NTFS 파일 시스템 탐색
- 파일 추출 기능
### `notification_parser.py`
- SQLite 데이터베이스 연결 및 쿼리
- 알림 데이터 파싱
- 검색 및 필터링 기능
- 통계 분석
### `xml_parser.py`
- Windows 알림 XML 구조 파싱
- 메타데이터 추출
- 텍스트 콘텐츠 정리
## 출력 데이터 형식
### 알림 데이터 예시
```json
{
"id": 12345,
"order": 1,
"handler_type": "toast",
"app_id": "Microsoft.Outlook",
"notification_type": "email",
"arrival_time": 1640995200,
"arrival_time_readable": "2021-12-31 23:00:00",
"payload_data": {
"title": "New Email",
"body": "You have received a new message...",
"sender": "john@example.com"
}
}
```
### 통계 데이터 예시
```json
{
"total_notifications": 1500,
"unique_apps": 15,
"time_range": {
"earliest": "2021-01-01 00:00:00",
"latest": "2021-12-31 23:59:59"
},
"app_distribution": {
"Microsoft.Outlook": 450,
"Slack": 320,
"Microsoft Teams": 280
}
}
```