Files
mtusi2026lab7/evidence/track1/result.json
T

285 lines
9.2 KiB
JSON

{
"started": "2026-11-22T19:38:01Z",
"base_url": "https://127.0.0.1:8443",
"matrix_before": {
"openbao": {
"login with stolen SecretID": "n/a (в lab6 секреты лежали в файлах)"
},
"postgres": {
"connect": "ALLOWED as messenger_owner",
"read users.password_hash": "ALLOWED (5)",
"read messages.text": "ALLOWED (5)",
"read sessions": "ALLOWED (5)",
"read chat membership": "ALLOWED (5)",
"enumerate attachment object keys": "ALLOWED (50)",
"UPDATE attachments.status (rolled back)": "ALLOWED",
"DELETE attachments (rolled back)": "ALLOWED",
"UPDATE users.password_hash (rolled back)": "ALLOWED",
"INSERT messages (rolled back)": "ALLOWED",
"CREATE TABLE": "ALLOWED",
"CREATE ROLE": "DENIED InsufficientPrivilege",
"COPY TO PROGRAM (RCE на сервере БД)": "DENIED InsufficientPrivilege"
},
"s3": {
"LIST originals/": "ALLOWED (285)",
"LIST whole bucket": "ALLOWED (1148)",
"GET original by key from DB (чужие файлы)": "ALLOWED (111817)",
"GET variants/": "ALLOWED (NoSuchKey: доступ есть, объекта нет)",
"PUT variants/ (подмена превью)": "ALLOWED",
"DELETE originals/ (несуществующий ключ)": "ALLOWED",
"PUT вне своих prefix": "ALLOWED",
"CreateBucket": "ALLOWED (True)"
},
"nats": {
"connect": "ALLOWED",
"consumer info (видеть очередь)": "ALLOWED",
"purge stream (уничтожить очередь)": "ALLOWED",
"delete stream": "ALLOWED",
"create consumer (тайное копирование заданий)": "ALLOWED",
"subscribe attachments.> (подслушивать)": "DENIED (permissions violation)"
},
"redis": {
"connect (сессии)": "DENIED AuthenticationError: Authentication required."
},
"api": {
"call API replica with worker cert (bypass LB)": "DENIED BrokenPipeError (identity не lb → соединение закрыто)"
}
},
"matrix_compromised": {
"openbao": {
"login with stolen SecretID": "ALLOWED (policies ['messenger-worker'], TTL 300s)",
"read worker secrets (DB/S3)": "ALLOWED",
"read API secrets (Redis, роль БД API)": "DENIED (403)",
"list secret/ (поиск чужих путей)": "DENIED (403)",
"write policy / sys/*": "DENIED (403)",
"issue SecretID другим ролям": "DENIED (403)"
},
"postgres": {
"connect": "ALLOWED as messenger_worker_b",
"read users.password_hash": "DENIED InsufficientPrivilege",
"read messages.text": "DENIED InsufficientPrivilege",
"read sessions": "DENIED InsufficientPrivilege",
"read chat membership": "DENIED InsufficientPrivilege",
"enumerate attachment object keys": "ALLOWED (50)",
"UPDATE attachments.status (rolled back)": "ALLOWED",
"DELETE attachments (rolled back)": "DENIED InsufficientPrivilege",
"UPDATE users.password_hash (rolled back)": "DENIED InsufficientPrivilege",
"INSERT messages (rolled back)": "DENIED InsufficientPrivilege",
"CREATE TABLE": "DENIED InsufficientPrivilege",
"CREATE ROLE": "DENIED InsufficientPrivilege",
"COPY TO PROGRAM (RCE на сервере БД)": "DENIED InsufficientPrivilege"
},
"s3": {
"LIST originals/": "DENIED AccessDenied",
"LIST whole bucket": "DENIED AccessDenied",
"GET original by key from DB (чужие файлы)": "ALLOWED (111817)",
"GET variants/": "DENIED AccessDenied",
"PUT variants/ (подмена превью)": "ALLOWED",
"DELETE originals/ (несуществующий ключ)": "ALLOWED",
"PUT вне своих prefix": "DENIED AccessDenied",
"CreateBucket": "DENIED AccessDenied"
},
"nats": {
"connect": "ALLOWED",
"consumer info (видеть очередь)": "ALLOWED",
"purge stream (уничтожить очередь)": "DENIED (permissions violation)",
"delete stream": "DENIED (permissions violation)",
"create consumer (тайное копирование заданий)": "DENIED (permissions violation)",
"subscribe attachments.> (подслушивать)": "DENIED (permissions violation)"
},
"redis": {
"connect (сессии)": "DENIED AuthenticationError: Authentication required."
},
"api": {
"call API replica with worker cert (bypass LB)": "DENIED BrokenPipeError (identity не lb → соединение закрыто)"
}
},
"stolen": {
"stolen_jobs": [
"f8631f3a-70ff-4700-b398-3dad3e927bf7",
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed",
"43fe7de7-4c5d-4899-870c-b75f6d3e4905"
]
},
"jobs_after_theft": {
"queued": 6
},
"response": {
"service": "worker",
"started": "2026-11-22T19:38:28Z",
"access_cut_after_s": 11.2,
"processing_restored_after_s": 21.2,
"timeline": [
{
"step": "1 OpenBao: revoke all SecretID + tokens of messenger-worker",
"at": "2026-11-22T19:38:28Z",
"seconds": 0.2,
"result": {
"service": "worker",
"role": "messenger-worker",
"secret_ids_destroyed": 1,
"tokens_revoked": 3
}
},
{
"step": "2 PKI: rotate worker leaf, revoke old serial, reload CRL/pins",
"at": "2026-11-22T19:38:31Z",
"seconds": 3.5,
"result": {
"at": "2026-11-22T19:38:28Z",
"pki": {
"identity": "worker",
"old_serial": "70432b83622e508c8d6406bd7ea94b828c2d36f3",
"new_serial": "7ce2f74406b2dcd8c947eda0d14f17b8643fa2b9",
"revoked": [
"70432b83622e508c8d6406bd7ea94b828c2d36f3"
]
},
"reloaded": [
"lb:USR2",
"otel-gw:USR2",
"prometheus-gw:USR2",
"loki-gw:USR2",
"tempo-gw:USR2",
"nats:HUP",
"postgres:reload",
"openbao:HUP"
],
"total_s": 3.5
}
},
{
"step": "3 PostgreSQL: emergency role switch (old NOLOGIN + kill)",
"at": "2026-11-22T19:38:34Z",
"seconds": 3.1,
"result": {
"rotated": "db",
"service": "worker",
"at": "2026-11-22T19:38:34Z",
"old_role": "messenger_worker_b",
"new_role": "messenger_worker_a",
"kv_version": 3,
"services_switched_after_s": null,
"old_sessions_terminated": 0,
"old_credential_check": "REJECTED .3\", port 5432 failed: FATAL: password authentication failed for user \"messenger_worker_b\"",
"total_s": 3.0
}
},
{
"step": "4 S3: emergency key rotation (old key removed)",
"at": "2026-11-22T19:38:39Z",
"seconds": 4.4,
"result": {
"rotated": "s3",
"service": "worker",
"at": "2026-11-22T19:38:39Z",
"kv_version": 4,
"replicas": 0,
"services_switched_after_s": null,
"old_credential_check": "REJECTED 403 InvalidAccessKeyId",
"total_s": 4.3
}
},
{
"step": "5 OpenBao: issue new SecretID for worker",
"at": "2026-11-22T19:38:39Z",
"seconds": 0.1,
"result": {
"service": "worker",
"secret_id": "rotated (file updated, value not shown)",
"old_secret_id_destroyed": "already"
}
},
{
"step": "6 recreate worker containers, wait healthy",
"at": "2026-11-22T19:38:47Z",
"seconds": 8.2,
"result": 2
},
{
"step": "7 republish jobs lost from the broker (from PostgreSQL)",
"at": "2026-11-22T19:38:49Z",
"seconds": 1.7,
"result": {
"republished": 3,
"jobs": [
"f8631f3a-70ff-4700-b398-3dad3e927bf7",
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed",
"43fe7de7-4c5d-4899-870c-b75f6d3e4905"
]
}
}
]
},
"matrix_after": {
"openbao": {
"login with stolen SecretID": "DENIED (HTTP 400)",
"fallback: secrets stolen earlier (loot)": "используются"
},
"postgres": {
"connect": "DENIED SSL error: sslv3 alert certificate revoked"
},
"s3": {
"LIST originals/": "DENIED InvalidAccessKeyId",
"LIST whole bucket": "DENIED InvalidAccessKeyId",
"GET variants/": "DENIED InvalidAccessKeyId",
"PUT variants/ (подмена превью)": "DENIED InvalidAccessKeyId",
"DELETE originals/ (несуществующий ключ)": "DENIED InvalidAccessKeyId",
"PUT вне своих prefix": "DENIED InvalidAccessKeyId",
"CreateBucket": "DENIED InvalidAccessKeyId"
},
"nats": {
"connect": "DENIED ConnectionRefusedError: connection closed by server (certificate not pinned / not mapped)"
},
"redis": {
"connect (сессии)": "DENIED AuthenticationError: Authentication required."
},
"api": {
"call API replica with worker cert (bypass LB)": "DENIED BrokenPipeError (identity не lb → соединение закрыто)"
}
},
"steal_after": {
"stolen_jobs": [],
"error": "ConnectionRefusedError: connection closed by server (certificate not pinned / not mapped)"
},
"recovery_all_ready_after_s": 26.0,
"final_status": {
"ready": 6
},
"stolen_jobs_events": {
"f8631f3a-70ff-4700-b398-3dad3e927bf7": [
"enqueued",
"published",
"republished_stuck",
"published",
"claimed",
"committed",
"published_version_changed",
"staging_cleaned"
],
"7a520f6d-2bc5-4e9b-b8ca-aeab81ae1fed": [
"enqueued",
"published",
"republished_stuck",
"published",
"claimed",
"committed",
"published_version_changed",
"staging_cleaned"
],
"43fe7de7-4c5d-4899-870c-b75f6d3e4905": [
"enqueued",
"published",
"republished_stuck",
"published",
"claimed",
"committed",
"published_version_changed",
"staging_cleaned"
]
},
"invariants": {
"ok": true,
"violations": {}
}
}