연구실:Web

[JWT Hacking Challenge] 1. 환경 구축 실습

작성자 정보

  • j4zzmaster 작성
  • 작성일

컨텐츠 정보

본문

※ 목차

1. [JWT Hacking Challenge] 1. 환경 구축 실습

2. [JWT Hacking Challenge] 2. 취약점 분석 실습

 

 

0. JWT란?

세 파트로 나뉘며, 각 파트는 Base64로 인코딩된다. 그리고 .(점)으로 이어 붙여서 하나의 JWT 토큰을 구성한다.

HEADER: 토큰 유형, 서명 알고리즘 정보 기재

PAYLOAD: 데이터

SIGNATURE: 데이터 무결성을 보장하기 위한 서명

 

 

1. 사전 준비 ⛵️

# apt update

# apt install npm

# apt install nodejs

 

 

 

1.1. JWT Challenge Repository Git Clone

# git clone https://github.com/za9uar/jwt-hacking-challenges.git

# cd jwt-hacking-challenges/jwt-signature-apis-challenges/

# npm install

 

d3bac666a440fb804a3b634989a90447a75c705cuhdw.png

 

 

1.2. IP 수정 (app.js)

app.js의 endpoint를 구동하는 Linux의 주소로 수정한다.

05d0af27a4eff66dd30440ff80dd78b54299645aav5u.png

 

 

1.3. IP 수정 (JWT-attacks.postman_collection.json)

Git Clone 받은 파일 안에 postman에 import할 수 있는 파일이 내재되어 있다.

raw와 host를 구동하는 Linux의 주소로 수정한다.

abdab84884d2517935f5a02617b8361a01ca7ba40cak.png

 

 

1.4. JWT Challenge 서버 구동

# node app.js

app.js 구동한 Linux의 주소로 접속하여 잘 실행되었는지 확인한다.

 

dea7e2ee65a68c4c3c557fc57a6dc002cd63b086a4ob.png

 

 

2. JWT_TOOL 설치 ⚔️

$ git clone https://github.com/ticarpi/jwt_tool
$ python3 -m pip install termcolor cprint pycryptodomex requests

 

 

Ref:

https://velog.io/@thelm3716/jwt-test-env

https://velog.io/@thelm3716/JWTvul

https://github.com/ticarpi/jwt_tool

관련자료

댓글 0
등록된 댓글이 없습니다.