# National CTF

### **CTF Difficulty Levels (Ukrainian version)**

#### Рівень 1: Криптографія, OSINT та Логіка

**Мета:** Перевірити базові навички аналізу, дешифрування, збору відкритої інформації та логічного мислення.

**Криптографія**

* Caesar (зсув) — розшифрувати повідомлення з невідомим зсувом.
* Ланцюжок Base-кодувань — повідомлення закодоване кількома шарами (наприклад Base32 → Base58 → Base64). Розпізнати та розкодувати кожен шар.
* XOR-зашифрування — дешифрувати текст, XOR-ований одно-байтовим ключем.
* RSA з спільними простими множниками — відновитиприватний ключ при наявності двох публічних ключів з одним спільним простим множником.
* Підстановочна шифра (monoalphabetic) — аналіз частот для відновлення таблиці замін.

**OSINT**

* Знайти місцезнаходження автора — аналіз EXIF у зображенні.
* Знайти корпоративний email — пошук через LinkedIn/WHOIS/Crunchbase.
* Виявити endpoint для скидання пароля — аналіз відкритихдиректорій, robots.txt та sitemap.
* Відстежити користувача за нікнеймом — знайти пов’язаніакаунти в соцмережах.

**Логіка**

* Логічні задачі на розпізнавання паттернів — завершитипослідовність символів/чисел.
* Шифри-головоломки — поєднання підказок у тексті, щовказують на порядок операцій.
* Код-серії — знайти правило перетворення рядка (перестановки, заміни, групування).
* Задачі на дедукцію — кілька підказок, які ведуть до єдиногоправильного висновку (наприклад 'хто злодій' за набором фактів).

#### Рівень 2: Середній — веб-пентестинг

**Мета:** Виявлення та експлуатація середнього рівня вразливостей у веб-застосунках.

* Path Traversal — доступ до захищених файлів через directory traversal.
* Reflected XSS — ін’єкція JS для викрадення cookie або виконання дій від імені користувача.
* CSRF — примусити жертву виконати небажану дію (наприклад, змінити пароль).
* .env leak — витік ключів API або даних БД через неправильнуконфігурацію.
* .git exposure — відновлення коду з відкритої .git директорії.
* Слабкі паролі — брутфорс форми логіну за словником.
* Відкритий FTP/SSH з дефолтними паролями — підключення до сервісів.
* Небезпечний API endpoint — доступ без автентифікації абоавторизації.
* Сканування сервісів (Nmap) — виявлення відкритих портів та сервісів.

#### Рівень 3: Високий — просунутий веб-пентестинг

**Мета:** Багатоступеневі експлойти, підвищення привілеїв та латеральний рух.

* Експлуатація відомого CVE для обходу автентифікації.
* Remote Code Execution (RCE) — виконати довільні команди та отримати reverse shell.
* Обхід перевірки при завантаженні файлів — завантажити та виконати вебшелл.
* Blind SQL Injection — ексфільтрація даних через time/boolean-based техніки.
* Витік через ViteJS dev server / source maps — читання локальнихфайлів.
* Зловживання віддаленими debugger endpoint’ами — отриматиконтроль через консоль devtools.
* Підвищення привілеїв через IDOR / неправильні ACL — отримати доступ до ресурсів інших користувачів.
* Комбінований експлойт / pivoting — ланцюжок уразливостейдля доступу до внутрішніх систем.

### **CTF Difficulty Levels (English version)**

#### **Level 1: Cryptography, OSINT, and Logic**

**Goal:** Evaluate baseline skills in analysis, decryption, open-source intelligence gathering, and logical reasoning.

**Cryptography**

* **Caesar cipher (shift):** Decrypt a message with an unknown shift value.
* **Base-encoding chain:** The message is encoded in multiple layers (e.g. Base32 → Base58 → Base64). Identify and decode each layer.
* **XOR encryption:** Decrypt text that was XOR-encrypted with a single-byte key.
* **RSA with shared prime factors:** Recover the private key given two public keys that share one prime factor.
* **Monoalphabetic substitution cipher:** Use frequency analysis to reconstruct the substitution table.

**OSINT**

* **Identify the author’s location:** Extract and analyze EXIF data from an image.
* **Find a corporate email address:** Use sources like LinkedIn / WHOIS / Crunchbase.
* **Discover the password reset endpoint:** Inspect open directories, `robots.txt`, and the sitemap.
* **Track a user by nickname:** Correlate connected social media accounts.

**Logic**

* **Pattern recognition puzzles:** Complete a sequence of symbols or numbers.
* **Cipher riddles:** Combine scattered hints in the text to determine the correct order of operations.
* **String transformation rules:** Infer how an input string is transformed (reordering, substitution, grouping).
* **Deduction problems:** Multiple clues lead to a single correct conclusion (for example, identifying “who is the thief” from a defined set of facts).

#### **Level 2: Intermediate — Web Pentesting**

**Goal:** Detect and exploit medium-severity vulnerabilities in web applications.

* **Path Traversal:** Access restricted files via directory traversal.
* **Reflected XSS:** Inject JavaScript to steal cookies or perform actions as the victim.
* **CSRF:** Force a victim to execute an unwanted action (e.g. change their password).
* **`.env` leak:** Extract API keys or database credentials due to misconfiguration.
* **`.git` exposure:** Recover source code from an exposed `.git` directory.
* **Weak passwords:** Dictionary brute-force against the login form.
* **Open FTP/SSH with default credentials:** Log in to exposed services.
* **Insecure API endpoint:** Access functionality with no proper authentication or authorization.
* **Service scanning (Nmap):** Enumerate open ports and running services.

#### **Level 3: Advanced — Offensive Web Operations**

**Goal:** Multi-step exploitation, privilege escalation, and lateral movement.

* **Exploiting a known CVE to bypass authentication.**
* **Remote Code Execution (RCE):** Execute arbitrary system commands and obtain a reverse shell.
* **Bypassing upload validation:** Upload and run a web shell.
* **Blind SQL Injection:** Exfiltrate data using time-based or boolean-based techniques.
* **Leaking internals via ViteJS dev server / source maps:** Read local files or reveal internal logic.
* **Abusing exposed remote debugger endpoints:** Take control through devtools consoles.
* **Privilege escalation via IDOR / misconfigured ACLs:** Gain access to other users’ resources.
* **Chained exploit / pivoting:** Combine multiple vulnerabilities to move deeper into internal systems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hackenproof.com/good-to-know/national-ctf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
