@tera-system/core 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MANIFEST.json +4 -4
- package/RELEASES.md +36 -0
- package/agents/red-team-agent.md +286 -27
- package/agents/security-auditor.md +112 -17
- package/agents/security-observer.md +94 -0
- package/core/tera-system/SECURITY_TEAM_CHARTER.md +60 -20
- package/core/tera-system/_TEMPLATE_EVIDENCE_MANIFEST.md +59 -0
- package/core/tera-system/_TEMPLATE_MATRIX_API_TOP10.md +112 -0
- package/core/tera-system/_TEMPLATE_MATRIX_ASVS_L2.md +261 -0
- package/core/tera-system/_TEMPLATE_MATRIX_WSTG.md +209 -0
- package/core/tera-system/_TEMPLATE_SECURITY_TARGET_SNAPSHOT.md +50 -0
- package/package.json +2 -2
|
@@ -97,6 +97,10 @@ Your purpose is to answer one question honestly:
|
|
|
97
97
|
|
|
98
98
|
A blocked attack is NOT a success if the system did not log it. Detection, logging, and alerting are part of security. If the red team's attempts are invisible in the logs, that is an independent finding.
|
|
99
99
|
|
|
100
|
+
You operate at the intersection of **Red Team observation** and **Blue Team / Detection Engineering / Security Observability**:
|
|
101
|
+
|
|
102
|
+
### 3.1 Observation role (during the engagement)
|
|
103
|
+
|
|
100
104
|
You monitor:
|
|
101
105
|
1. **Application, auth, reverse proxy, and database logs** — did the attacks appear?
|
|
102
106
|
2. **CPU, memory, connections, errors, timeouts** — any resource impact or instability?
|
|
@@ -104,6 +108,40 @@ You monitor:
|
|
|
104
108
|
4. **Canary data integrity** — before vs after each attack wave.
|
|
105
109
|
5. **Alerts and detection time** — how fast did the system notice?
|
|
106
110
|
|
|
111
|
+
### 3.2 Blue Team / Detection Engineering role (assessment output)
|
|
112
|
+
|
|
113
|
+
You evaluate the target's **detection and observability posture** — this is a distinct deliverable, not just "did it crash":
|
|
114
|
+
|
|
115
|
+
1. **Logging adequacy** — are security-relevant events (auth failures, admin calls, uploads, privilege changes, export/download) captured at all? With enough context (actor, source, result)?
|
|
116
|
+
2. **Alerting** — is there ANY alerting/triggering? What is the detection latency (time from attack to system noticing)?
|
|
117
|
+
3. **Timestamps & correlation** — are log lines timestamped (UTC, consistent format)? Can a forensic analyst reconstruct the timeline of an attack?
|
|
118
|
+
4. **Attack visibility** — do malicious 200s (JWT forgery, BFLA, IDOR) look identical to legitimate requests, or is there an indicator? Are attacks distinguishable from normal traffic?
|
|
119
|
+
5. **Secrets in logs** — do logs capture secrets, hashes, env dumps, raw SQL, payloads? (This amplifies findings like env leak.)
|
|
120
|
+
6. **Blind spots** — which attack classes produced NO log trace at all?
|
|
121
|
+
|
|
122
|
+
Each finding gets: what the system SHOULD have captured, what it ACTUALLY captured, and the gap.
|
|
123
|
+
|
|
124
|
+
### 3.3 Runtime Surface + Target Integrity support (for the auditor)
|
|
125
|
+
|
|
126
|
+
You provide two inputs that the auditor (القاضي) needs for independent verification:
|
|
127
|
+
|
|
128
|
+
1. **Runtime surface (source B for reconciliation)** — during the engagement, record the actual endpoints/routes you observe being exercised (from logs, network, and your read-only checks):
|
|
129
|
+
```text
|
|
130
|
+
RUNTIME_SURFACE.md
|
|
131
|
+
Observed endpoints: [list every path observed during the engagement]
|
|
132
|
+
Observation method: [logs / network / requests]
|
|
133
|
+
```
|
|
134
|
+
This becomes source B in the auditor's Surface Reconciliation (§6.2.3).
|
|
135
|
+
|
|
136
|
+
2. **Target change detection** — record whether the running application changed during the round:
|
|
137
|
+
```text
|
|
138
|
+
Target PID: [stable across rounds? YES/NO]
|
|
139
|
+
Runtime restarted: YES/NO + timestamps
|
|
140
|
+
Process start time: [baseline vs end]
|
|
141
|
+
HTTP behavior drift: [unusual changes in responses mid-round]
|
|
142
|
+
```
|
|
143
|
+
This feeds `SECURITY_TARGET_SNAPSHOT.md` closing block (P2). If the runtime restarted or changed mid-round, flag it immediately — the round may be INVALID.
|
|
144
|
+
|
|
107
145
|
---
|
|
108
146
|
|
|
109
147
|
## 4. Reference Hierarchy
|
|
@@ -176,6 +214,19 @@ Allowed Write Targets: [repository root]/security-reports/[ROUND-ID]/observer/
|
|
|
176
214
|
|
|
177
215
|
## 7. Observer Report Format
|
|
178
216
|
|
|
217
|
+
The observer produces **two outputs** per round:
|
|
218
|
+
|
|
219
|
+
### 7.0 Outputs overview
|
|
220
|
+
|
|
221
|
+
```text
|
|
222
|
+
1. Observer Report (executive — §7.1) ← operational monitoring
|
|
223
|
+
2. Blue Team Assessment (technical — §7.2) ← detection engineering
|
|
224
|
+
3. RUNTIME_SURFACE.md (source B — §3.3) ← for the auditor's reconciliation
|
|
225
|
+
4. Target integrity notes (P2 — §3.3) ← runtime restarted / process changed
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 7.1 Observer Report (executive — operational)
|
|
229
|
+
|
|
179
230
|
```text
|
|
180
231
|
Observer Report
|
|
181
232
|
Round ID:
|
|
@@ -208,6 +259,48 @@ Handback to Orchestrator:
|
|
|
208
259
|
- Status: Normal / Anomalies Found / STOP_EVENT
|
|
209
260
|
- Key Detection Gaps: [list]
|
|
210
261
|
- Recommended Next Action:
|
|
262
|
+
|
|
263
|
+
Target Integrity (P2):
|
|
264
|
+
- Target PID stable: YES / NO
|
|
265
|
+
- Runtime restarted during round: YES / NO [timestamps]
|
|
266
|
+
- Process start time: baseline [t] → end [t]
|
|
267
|
+
- HTTP behavior drift mid-round: None / [describe]
|
|
268
|
+
- Runtime surface recorded: RUNTIME_SURFACE.md (source B)
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### 7.2 Blue Team Assessment (technical — Detection Engineering)
|
|
272
|
+
|
|
273
|
+
```text
|
|
274
|
+
Blue Team / Detection Engineering Assessment
|
|
275
|
+
Round ID:
|
|
276
|
+
Target:
|
|
277
|
+
|
|
278
|
+
Detection Posture by Layer:
|
|
279
|
+
| Layer (logs/WAF/IDS/alerting/rate-limit/lockout) | Present? | Detected attacks? | Latency | Notes |
|
|
280
|
+
|
|
281
|
+
Logging Adequacy:
|
|
282
|
+
- Security-relevant events captured: [list which attack classes left traces]
|
|
283
|
+
- Context captured per event (actor/source/result): Yes / Partial / No
|
|
284
|
+
- Timestamps: Present / Absent / Inconsistent — format & timezone
|
|
285
|
+
|
|
286
|
+
Alerting:
|
|
287
|
+
- Alerting system present: Yes / No
|
|
288
|
+
- Detection latency measured: [time]
|
|
289
|
+
- Malicious 200s distinguishable: Yes / No — [explanation]
|
|
290
|
+
|
|
291
|
+
Observability Gaps (independent findings):
|
|
292
|
+
| # | Gap | Attack class affected | Impact | Recommendation |
|
|
293
|
+
|
|
294
|
+
Secrets-in-Logs Assessment:
|
|
295
|
+
- Secrets/hashes/raw SQL/env dumps in logs: Yes / No — [list]
|
|
296
|
+
- Amplifies which findings: [SEC refs]
|
|
297
|
+
|
|
298
|
+
Blind Spots (attacks with NO log trace):
|
|
299
|
+
- [list]
|
|
300
|
+
|
|
301
|
+
Handback:
|
|
302
|
+
- Overall Detection Posture: Weak / Moderate / Strong
|
|
303
|
+
- Top 3 Recommendations: [1. 2. 3.]
|
|
211
304
|
```
|
|
212
305
|
|
|
213
306
|
---
|
|
@@ -221,6 +314,7 @@ Handback to Orchestrator:
|
|
|
221
314
|
- **Correlate with Test IDs.** Your report is only useful when tied to specific red team actions.
|
|
222
315
|
- **Never invent observations.** If you did not see it, say so. `[Unknown]` is a valid entry.
|
|
223
316
|
- **Stop conditions apply to you too.** If you observe real data exposure, service failure, or a stop indicator — report immediately.
|
|
317
|
+
- **Blue Team is your second deliverable.** The Blue Team Assessment (§7.2) is mandatory — measuring whether the system *detected* the attack is as valuable as the attacks themselves.
|
|
224
318
|
|
|
225
319
|
---
|
|
226
320
|
|
|
@@ -80,16 +80,33 @@
|
|
|
80
80
|
### 5.2 مراحل الجولة
|
|
81
81
|
|
|
82
82
|
```text
|
|
83
|
+
0. لقطة الهدف — SECURITY_TARGET_SNAPSHOT.md (Commit SHA + Working Tree + Build) — قبل أي هجوم
|
|
83
84
|
1. التفويض والنطاق (00_AUTHORIZATION.md) — Rules of Engagement موقعة من Majed
|
|
84
85
|
2. بوابة الاستعداد — بيئة معزولة، بيانات وهمية، Canary، حدود طلبات
|
|
85
|
-
3. Black Box —
|
|
86
|
-
4. Gray/White Box
|
|
86
|
+
3. Phase A — Black Box معزول تقنياً (URL فقط — لا وصول لكود المصدر) + العين يراقب + Runtime Surface
|
|
87
|
+
4. Phase B — Gray/White Box (بعد إغلاق A: وصول للكود + Source-Declared Surface)
|
|
87
88
|
5. الحملات الهجومية الإلزامية — 13 مجالاً
|
|
88
|
-
6. الأدلة — Request/Response فعلي
|
|
89
|
-
7.
|
|
90
|
-
8.
|
|
91
|
-
9.
|
|
92
|
-
10.
|
|
89
|
+
6. الأدلة — Evidence Pack كامل لكل استغلال ناجح (Request/Response فعلي — قاعدة إعادة البناء)
|
|
90
|
+
7. مصفوفات التغطية المعيارية — ASVS L2 + WSTG + API Top 10 (PASS/FAIL/N/A/NOT TESTED لكل بند)
|
|
91
|
+
8. Findings — تصنيف ثلاثي (Technical / Business / Exploit Chain) مع CVSS/CWE/OWASP
|
|
92
|
+
9. تجميد الأدلة — EVIDENCE_MANIFEST.md (SHA256 لكل ملف + Freeze Timestamp — لا تعديل بعدها)
|
|
93
|
+
10. الإصلاح + إعادة الاختبار — منفصل عن جلسة الهجوم (Track A Retest + Track B Fresh Clean-Room)
|
|
94
|
+
11. تدقيق مستقل — القاضي: Snapshot + Manifest + Surface Reconciliation (A∪B∪C) + الأدلة والمصفوفات والتصنيف
|
|
95
|
+
12. بوابة القبول الأمني — قرار نهائي
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 5.4 أنواع الجولات
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
Round 0 — LAB (تدريب الأدوات): تطبيق مليء بثغرات معروفة لتدريب الأدوات وسلسلة الأدلة.
|
|
102
|
+
Round 1+ — CLEAN / Discovery (اختبار الاكتشاف): تطبيق سليم إلى حد كبير يحتوي 5–7 ثغرات
|
|
103
|
+
مخفية جيداً — لا يُخبر الفريق بعددها أو أنواعها أو أماكنها — يقاس Discovery Rate
|
|
104
|
+
والفalse positives.
|
|
105
|
+
Round P — Production-like (قبل التسليم): تطبيق حقيقي قبل التسليم — بوابة Phase 7 الكاملة.
|
|
106
|
+
Round R — Retest (بعد الإصلاحات): مساران —
|
|
107
|
+
Track A: Retest بمعرفة الثغرات (bypass + regression).
|
|
108
|
+
Track B: Fresh Attack Clean-Room (جلسة جديدة بلا أي معرفة سابقة — URL/حسابات/نطاق فقط).
|
|
109
|
+
القاضي يدمج النتيجتين.
|
|
93
110
|
```
|
|
94
111
|
|
|
95
112
|
### 5.3 التفعيل (مقصود ومضبوط)
|
|
@@ -139,23 +156,33 @@ security-reports/
|
|
|
139
156
|
├── SECURITY_GATE_LOG.md ← سجل البوابات عبر الجولات
|
|
140
157
|
└── SEC-ROUND-{YYYY-MM-DD}-{NNN}/ ← جولة واحدة
|
|
141
158
|
├── 00_AUTHORIZATION.md ← التفويض والنطاق (يوقعه Majed)
|
|
142
|
-
├──
|
|
159
|
+
├── SECURITY_TARGET_SNAPSHOT.md ← لقطة الهدف: Commit SHA + Tree + Build + Runtime (نزاهة الإصدار)
|
|
160
|
+
├── 01_ATTACK_SURFACE.md ← خريطة سطح الهجوم (الشبح — المصدر A)
|
|
143
161
|
├── 02_TEST_LOG.md ← سجل الاختبارات (Test IDs + نتائج)
|
|
144
|
-
├── 03_FINDINGS.md ← Findings
|
|
145
|
-
├──
|
|
146
|
-
├──
|
|
147
|
-
├──
|
|
162
|
+
├── 03_FINDINGS.md ← Findings بالتصنيف الثلاثي (الشبح)
|
|
163
|
+
├── MATRIX_ASVS_L2.md ← مصفوفة تغطية ASVS 5.0 L2 (إلزامية)
|
|
164
|
+
├── MATRIX_WSTG.md ← مصفوفة تغطية WSTG (إلزامية)
|
|
165
|
+
├── MATRIX_API_TOP10.md ← مصفوفة تغطية API Top 10 (إلزامية)
|
|
166
|
+
├── EVIDENCE_MANIFEST.md ← بيان الأدلة: SHA256 لكل ملف + Freeze (لا تعديل بعدها)
|
|
167
|
+
├── 04_OBSERVER_REPORT.md ← تقرير العين (مراقب متزامن + Runtime Surface B)
|
|
168
|
+
├── 05_AUDIT_DECISION.md ← قرار القاضي + Surface Reconciliation (A∪B∪C)
|
|
169
|
+
├── 06_RETEST_RECORD.md ← سجل إعادة الاختبار (Track A + Track B)
|
|
148
170
|
├── defense-handoff.md ← ملف الدفاع (الدرع → للشبح في White Box)
|
|
149
171
|
├── fix-review.md ← مراجعة الإصلاحات (الدرع)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
172
|
+
├── evidence/ ← أدلة مجمّدة (لا تُعدّل بعد الـ Freeze)
|
|
173
|
+
│ └── {TEST-ID}/
|
|
174
|
+
│ ├── metadata.md ← إلزامي: Test ID/الهدف/الوقت UTC/الأداة/الدور/النتيجة/Finding
|
|
175
|
+
│ ├── request.txt ← إلزامي: الطلب الفعلي (منقح)
|
|
176
|
+
│ ├── response.txt ← إلزامي: الاستجابة الفعلية (منقحة)
|
|
177
|
+
│ ├── screenshot.png ← عند الحاجة (حالات UI)
|
|
178
|
+
│ └── tool-output.txt ← عند استخدام أداة (إلزامي وقتها)
|
|
179
|
+
└── evidence-addendum/ ← الإضافات بعد التجميد (لا تعديل للأصل)
|
|
157
180
|
```
|
|
158
181
|
|
|
182
|
+
> **قاعدة إعادة البناء:** يستطيع القاضي إعادة بناء استنتاج الشبح من ملفات الأدلة وحدها — دون سؤال الشبح.
|
|
183
|
+
> **قاعدة نزاهة الأدلة:** بعد `Evidence Freeze` في `EVIDENCE_MANIFEST.md`، أي تعديل للأدلة الأصلية يُبطلها — الإضافات في `evidence-addendum/` فقط.
|
|
184
|
+
> **قاعدة نزاهة الهدف:** `SECURITY_TARGET_SNAPSHOT.md` — إذا تغيّر Commit/Tree/Runtime أثناء الجولة → الجولة INVALID.
|
|
185
|
+
|
|
159
186
|
---
|
|
160
187
|
|
|
161
188
|
## 8. قواعدنا الحاكمة (غير قابلة للتفاوض)
|
|
@@ -165,10 +192,19 @@ security-reports/
|
|
|
165
192
|
3. **الأسرار تُنقّح** — `[REDACTED]` بدل أي قيمة حقيقية.
|
|
166
193
|
4. **فصل الأدوار ملزم** — من هاجم لا يدقق، من راقب لا يحكم.
|
|
167
194
|
5. **قرار التسليم** — بيد القاضي وحده، بعد الجولة الكاملة.
|
|
168
|
-
6. **Critical/High مفتوحة = لا تسليم.**
|
|
195
|
+
6. **Critical/High مفتوحة (بسلسلة استغلال) = لا تسليم.**
|
|
169
196
|
7. **لا توسيع للأثر** — نوقف عند إثبات كافٍ، لا نستمر في التخريب.
|
|
170
197
|
8. **بيئة معزولة** — بيانات وهمية فقط، ممنوع البيانات الحقيقية.
|
|
171
198
|
9. **التوثيق الكامل** — كل نتيجة موثقة بأدلتها في نفس الجولة.
|
|
199
|
+
10. **Evidence Pack إلزامي** — كل استغلال ناجح: metadata + request + response (+ tool-output + screenshot عند الحاجة). بلا Pack = Finding مرفوض/غير مثبت.
|
|
200
|
+
11. **قاعدة إعادة البناء** — القاضي يعيد بناء الاستنتاج من الأدلة وحدها.
|
|
201
|
+
12. **مصفوفات التغطية إلزامية** — ASVS L2 + WSTG + API Top 10 لكل جولة، بلا N/A بلا سبب خاص بالتطبيق.
|
|
202
|
+
13. **التصنيف الثلاثي** — Technical Severity / Business Impact / Exploit Chain Severity. البوابة تعتمد على السلسلة — لا تضخيم تقني.
|
|
203
|
+
14. **عزل Black Box إلزامي** — Phase A بلا وصول لكود المصدر (تقنياً وليس نصياً فقط). أي اكتشاف تطلب معرفة الكود أثناء Black Box غير صالح.
|
|
204
|
+
15. **نزاهة الهدف** — `SECURITY_TARGET_SNAPSHOT.md` قبل/بعد الجولة. تغيّر Commit/Tree/Runtime أثناء الجولة = الجولة INVALID.
|
|
205
|
+
16. **نزاهة الأدلة** — `EVIDENCE_MANIFEST.md` (SHA256 + Freeze). بعد التجميد: لا تعديل للأدلة الأصلية — الإضافات في `evidence-addendum/` فقط.
|
|
206
|
+
17. **Surface Reconciliation** — القاضي يبني A∪B∪C (مكتشف الشبح + Runtime + Source) — لا يثق بسطح الهجوم وحده.
|
|
207
|
+
18. **فصل كتابة صارم** — الشبح لا يكتب `observer/` أو `audit/`؛ العين لا تكتب إلا `observer/`؛ القاضي لا يكتب إلا `audit/`.
|
|
172
208
|
|
|
173
209
|
---
|
|
174
210
|
|
|
@@ -179,6 +215,7 @@ security-reports/
|
|
|
179
215
|
|
|
180
216
|
| Round ID | التطبيق | التاريخ | النوع | قرار القاضي | Critical/High |
|
|
181
217
|
|---|---|---|---|---|---|
|
|
218
|
+
| SEC-ROUND-2026-09-03-001 | BlogCraft LAB | 2026-09-03 | Round 0 — LAB (تدريب) | **FAIL** | 12 Critical / 3 High (18 إجمالاً) |
|
|
182
219
|
| *(تُضاف بعد كل جولة)* | | | | | |
|
|
183
220
|
|
|
184
221
|
---
|
|
@@ -191,6 +228,9 @@ security-reports/
|
|
|
191
228
|
| 2026-09-02 | **النشر للحزم** — core 0.2.12 + pro 0.2.17 على npm + bundle v0.2.16 على teranoo.com |
|
|
192
229
|
| 2026-09-02 | **استكشاف أول** — فحص BlogCraft LAB: تأكيد 7 ثغرات (env leak, data exposure, SQLi, BFLA, BOLA, JWT storage, JWT forge→admin) |
|
|
193
230
|
| 2026-09-03 | **الميثاق** — توثيق رسمي للفريق + نسخة الجوهر المُوزَّعة (هذا الملف) |
|
|
231
|
+
| 2026-09-03 | **الجولة الأولى** — SEC-ROUND-2026-09-03-001 على BlogCraft LAB: 18 Finding (12 Critical) — قرار القاضي FAIL (متوقع لجولة LAB) |
|
|
232
|
+
| 2026-09-03 | **ترقية الفريق (SCP-2026-09-03-004)** — بعد تقييم Majed: Evidence Pack إلزامي + قاعدة إعادة البناء، مصفوفات تغطية ASVS/WSTG/API، بروتوكول Discovery Rounds، دور Blue Team للعين (Detection Engineering)، تصنيف ثلاثي (Technical/Business/Exploit Chain) |
|
|
233
|
+
| 2026-09-03 | **ترقية النزاهة (SCP-2026-09-03-005)** — بعد مراجعة خبير خارجي: (1) عزل Black Box تقني، (2) SECURITY_TARGET_SNAPSHOT (نزاهة الإصدار)، (3) EVIDENCE_MANIFEST (SHA256 + Freeze)، (4) Surface Reconciliation (A∪B∪C)، (5) فصل كتابة صارم، (6) Retest ثنائي المسار (Track A + Track B Clean-Room) |
|
|
194
234
|
|
|
195
235
|
---
|
|
196
236
|
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
2
|
+
|
|
3
|
+
# EVIDENCE_MANIFEST.md — قالب بيان الأدلة (حماية النزاهة)
|
|
4
|
+
|
|
5
|
+
> **الغرض (P3):** تجميد الأدلة وضمان عدم تعديلها بعد انتهاء الجولة. ينشئه الشبح **عند إغلاق الجولة** (قبل تسليمها للقاضي).
|
|
6
|
+
> **الموقع:** `security-reports/[ROUND-ID]/EVIDENCE_MANIFEST.md`
|
|
7
|
+
> **القاعدة:** بعد `Evidence Freeze Timestamp` ممنوع تعديل/حذف أي ملف أدلة أصلي — أي إضافة لاحقة في `evidence-addendum/`.
|
|
8
|
+
|
|
9
|
+
## البيان
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
EVIDENCE_MANIFEST.md
|
|
13
|
+
Round ID: <SEC-ROUND-...>
|
|
14
|
+
Evidence Freeze Timestamp: <UTC — لحظة إغلاق الجولة>
|
|
15
|
+
Target Build ID: <من SECURITY_TARGET_SNAPSHOT>
|
|
16
|
+
Commit SHA: <من SECURITY_TARGET_SNAPSHOT>
|
|
17
|
+
Generated By: الشبح (Red Team)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## قائمة التجزئة (يُحسب كل ملف SHA256)
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
evidence/T-01-01/request.txt SHA256: <hash>
|
|
24
|
+
evidence/T-01-01/response.txt SHA256: <hash>
|
|
25
|
+
evidence/T-01-01/metadata.md SHA256: <hash>
|
|
26
|
+
evidence/T-02-03/request.txt SHA256: <hash>
|
|
27
|
+
evidence/T-03-02/response.txt SHA256: <hash>
|
|
28
|
+
evidence/T-06-01/screenshot.png SHA256: <hash>
|
|
29
|
+
evidence/T-07-02/tool-output.txt SHA256: <hash>
|
|
30
|
+
... (كل ملف تحت evidence/)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## الإضافات بعد التجميد (addendum)
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
evidence-addendum/T-99-01/request.txt SHA256: <hash>
|
|
37
|
+
evidence-addendum/T-99-01/response.txt SHA256: <hash>
|
|
38
|
+
(سبب الإضافة: <...>)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## تحقق القاضي (Auditor Verification)
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
Manifest present: YES / NO
|
|
45
|
+
Files recomputed vs manifest: N / N (match)
|
|
46
|
+
Mismatches found: [list → الأدلة المتأثرة تُبطل]
|
|
47
|
+
Files modified after freeze: [list → تُرفض]
|
|
48
|
+
Addendum files verified: [list]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## ملاحظات
|
|
54
|
+
|
|
55
|
+
- الشبح يمنع نفسه من تعديل أي ملف أدلة بعد الـ Freeze — يكتب فقط في `evidence-addendum/`.
|
|
56
|
+
- القاضي يعيد حساب كل SHA256 وقت التدقيق ويقارنها بالبيان — أي اختلاف يُبطل الدليل المتأثر.
|
|
57
|
+
- هذا البيان جزء من سجل التدقيق (Audit Record) ويُحفظ مع قرار القاضي.
|
|
58
|
+
|
|
59
|
+
*الشبح (Red Team) — [ROUND-ID] — [تاريخ]*
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<!-- © 2026 Majed Khaireddin (Alabasi1980). Tera System — Proprietary. All rights reserved. -->
|
|
2
|
+
|
|
3
|
+
# MATRIX_API_TOP10.md — قالب مصفوفة تغطية OWASP API Security Top 10 (2023)
|
|
4
|
+
|
|
5
|
+
> **الاستخدام:** ينسخ الشبح هذا القالب إلى `security-reports/[ROUND-ID]/MATRIX_API_TOP10.md` في كل جولة، ويملأ كل بند بنتيجة.
|
|
6
|
+
> **قيم النتائج (حرفياً):** `PASS` · `FAIL` (يربط Finding ID) · `N/A` (يجب سبب خاص بالتطبيق) · `NOT TESTED` (يجب سبب).
|
|
7
|
+
> **المصدر:** OWASP API Security Top 10 — 2023.
|
|
8
|
+
|
|
9
|
+
## الملف الشخصي للتطبيق
|
|
10
|
+
|
|
11
|
+
| البند | القيمة |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Round ID | |
|
|
14
|
+
| التطبيق / الإصدار | |
|
|
15
|
+
| تاريخ التنفيذ | |
|
|
16
|
+
| المنفذ | الشبح (Red Team) |
|
|
17
|
+
|
|
18
|
+
## API1 — Broken Object Level Authorization (BOLA)
|
|
19
|
+
|
|
20
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
21
|
+
|---|---|---|---|---|
|
|
22
|
+
| API1-01 | Object IDs from client input tested across all endpoints (GET/PUT/DELETE) | | | |
|
|
23
|
+
| API1-02 | User A cannot access User B objects by ID | | | |
|
|
24
|
+
| API1-03 | Mass assignment of object properties prevented | | | |
|
|
25
|
+
| API1-04 | Authorization checked server-side for every object read/write | | | |
|
|
26
|
+
|
|
27
|
+
## API2 — Broken Authentication
|
|
28
|
+
|
|
29
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
30
|
+
|---|---|---|---|---|
|
|
31
|
+
| API2-01 | Authentication not bypassable via API manipulation | | | |
|
|
32
|
+
| API2-02 | Credential stuffing / brute force rate-limited | | | |
|
|
33
|
+
| API2-03 | Password reset / recovery not abusable | | | |
|
|
34
|
+
| API2-04 | Session/token invalidation on logout & password change | | | |
|
|
35
|
+
|
|
36
|
+
## API3 — Broken Object Property Level Authorization (BOPLA)
|
|
37
|
+
|
|
38
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
39
|
+
|---|---|---|---|---|
|
|
40
|
+
| API3-01 | Sensitive properties (role, balance, password, admin) not exposed in responses | | | |
|
|
41
|
+
| API3-02 | Extra properties in request body rejected (mass assignment) | | | |
|
|
42
|
+
| API3-03 | Property-level read/write authorization enforced | | | |
|
|
43
|
+
|
|
44
|
+
## API4 — Unrestricted Resource Consumption
|
|
45
|
+
|
|
46
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
47
|
+
|---|---|---|---|---|
|
|
48
|
+
| API4-01 | Rate limiting on API endpoints | | | |
|
|
49
|
+
| API4-02 | Payload size limits enforced | | | |
|
|
50
|
+
| API4-03 | Pagination / query limits prevent resource exhaustion | | | |
|
|
51
|
+
| API4-04 | No unbounded loops, expensive queries, or queue abuse | | | |
|
|
52
|
+
|
|
53
|
+
## API5 — Broken Function Level Authorization (BFLA)
|
|
54
|
+
|
|
55
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
56
|
+
|---|---|---|---|---|
|
|
57
|
+
| API5-01 | Admin functions not callable by regular users (server-side RBAC) | | | |
|
|
58
|
+
| API5-02 | Function-level access control per HTTP method and endpoint | | | |
|
|
59
|
+
| API5-03 | No hidden/undocumented admin endpoints accessible | | | |
|
|
60
|
+
|
|
61
|
+
## API6 — Unrestricted Access to Sensitive Business Flows
|
|
62
|
+
|
|
63
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
64
|
+
|---|---|---|---|---|
|
|
65
|
+
| API6-01 | Critical business flows (payments, orders, transfers) not abusable | | | |
|
|
66
|
+
| API6-02 | Anti-automation / rate limits on high-value flows | | | |
|
|
67
|
+
| API6-03 | Business flow integrity (no double-spend, replay, race) | | | |
|
|
68
|
+
|
|
69
|
+
## API7 — Server-Side Request Forgery (SSRF)
|
|
70
|
+
|
|
71
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
72
|
+
|---|---|---|---|---|
|
|
73
|
+
| API7-01 | URL inputs (import, webhooks, preview, images) validated | | | |
|
|
74
|
+
| API7-02 | Private network / metadata ranges blocked (169.254.169.254, localhost) | | | |
|
|
75
|
+
| API7-03 | DNS rebinding protection | | | |
|
|
76
|
+
|
|
77
|
+
## API8 — Security Misconfiguration
|
|
78
|
+
|
|
79
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
80
|
+
|---|---|---|---|---|
|
|
81
|
+
| API8-01 | No debug/verbose error responses in production | | | |
|
|
82
|
+
| API8-02 | CORS configured correctly (no wildcard with credentials) | | | |
|
|
83
|
+
| API8-03 | Security headers present (CSP, XFO, XCTO, HSTS) | | | |
|
|
84
|
+
| API8-04 | No default/weak credentials; least privilege on API keys | | | |
|
|
85
|
+
|
|
86
|
+
## API9 — Improper Inventory Management
|
|
87
|
+
|
|
88
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
89
|
+
|---|---|---|---|---|
|
|
90
|
+
| API9-01 | No old/unversioned API endpoints exposed | | | |
|
|
91
|
+
| API9-02 | Deprecated versions removed or documented | | | |
|
|
92
|
+
| API9-03 | Environment-specific endpoints (debug, staging) not exposed | | | |
|
|
93
|
+
|
|
94
|
+
## API10 — Unsafe Consumption of APIs
|
|
95
|
+
|
|
96
|
+
| # | Check | Result | Evidence/Test ID | Notes |
|
|
97
|
+
|---|---|---|---|---|
|
|
98
|
+
| API10-01 | Third-party API responses validated/sanitized before use | | | |
|
|
99
|
+
| API10-02 | No data leakage via third-party integrations | | | |
|
|
100
|
+
| API10-03 | TLS + auth to third-party APIs | | | |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## ملخص التغطية (يملأه الشبح)
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
Total applicable: ___
|
|
108
|
+
PASS: ___ FAIL: ___ N/A: ___ NOT TESTED: ___
|
|
109
|
+
Coverage % (tested / applicable): ___%
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
*الشبح (Red Team) — [Round ID] — [تاريخ]*
|