Skip to content

Commit 7e1016f

Browse files
committed
Fix broken image
1 parent 10d909d commit 7e1016f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

_posts/2025-05-21-BYUCTF2025-JWTF.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ BYUCTF 2025 웹해킹 `JWTF` 문제 풀이입니다.
2525

2626
- 어드민용 계정에 대한 JWT 토큰 값이 유출되어 있음
2727

28-
![블랙리스트 등록된 이미지지](2025-05-21-1.png){: style="max-width: 100%; height: auto;"}
28+
![블랙리스트 등록된 이미지지](/assets/img/posts/2025-05-21-1.png){: style="max-width: 100%; height: auto;"}
2929

3030
- 유출된 토큰 값에 대한 블랙리스트가 등록되어 있음
3131

@@ -35,31 +35,31 @@ JWT 헤더 값의 암호화 기법을 `none`으로 설정하여 원하는 대로
3535

3636
## 분석 과정
3737

38-
![JWT 값 비교 영역](2025-05-21-2.png){: style="max-width: 100%; height: auto;"}
38+
![JWT 값 비교 영역](/assets/img/posts/2025-05-21-2.png){: style="max-width: 100%; height: auto;"}
3939

4040
서버에서 JWT값을 다음처럼 비교하고 있었습니다.
4141

42-
![jwt.io 소개 페이지](2025-05-21-3.png){: style="max-width: 100%; height: auto;"}
42+
![jwt.io 소개 페이지](/assets/img/posts/2025-05-21-3.png){: style="max-width: 100%; height: auto;"}
4343

4444
JWT는 내부적으로 `base64UrlEncode`을 이용해 값을 해시화 하고 있었습니다.
4545

46-
![jwt.io 소개 페이지](2025-05-21-4.png){: style="max-width: 100%; height: auto;"}
46+
![jwt.io 소개 페이지](/assets/img/posts/2025-05-21-4.png){: style="max-width: 100%; height: auto;"}
4747

4848
`base64Url`은 다음처럼 패딩부분만 `+`, `/`에서 `url safe``-`, `_`으로 바뀐 버전이었습니다.
4949

5050
위 코드를 실행해보면 똑같은 값이 출력됩니다.
5151

5252
이를 이용하여 토큰 값의 `-`, `_` 값을 base64의 패딩 값으로 변환하여 블랙리스트를 우회하면서 jwt를 이용할 수 있었습니다.
5353

54-
![ctf jrl 페이지](2025-05-21-5.png){: style="max-width: 100%; height: auto;"}
54+
![ctf jrl 페이지](/assets/img/posts/2025-05-21-5.png){: style="max-width: 100%; height: auto;"}
5555

5656
```text
5757
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6dHJ1ZSwidWlkIjoiMTMzNyJ9.BnBYDobZVspWbxu4jL3cTfri_IxNoi33q-TRLbHV-ew
5858
...into...
5959
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6dHJ1ZSwidWlkIjoiMTMzNyJ9.BnBYDobZVspWbxu4jL3cTfri_IxNoi33q+TRLbHV+ew
6060
```
6161

62-
![ctf 공격 성공 페이지](2025-05-21-6.png){: style="max-width: 100%; height: auto;"}
62+
![ctf 공격 성공 페이지](/assets/img/posts/2025-05-21-6.png){: style="max-width: 100%; height: auto;"}
6363

6464
## 알아낸 내용
6565

0 commit comments

Comments
 (0)