vared
vared - Blog
vared
전체 방문자
오늘
어제
  • 분류 전체보기 (138)
    • Study (0)
    • Project (0)
    • Paper Review (0)
    • Tool (0)
    • WriteUp (124)
      • Root-me.org (44)
      • LOS_rubiya (32)
      • Webhacking.kr (21)
      • DreamHack (9)
      • XCZ.kr (8)
      • HackCTF (10)
    • Miscellaneous (0)
    • Forensic-CheatSheet (10)

블로그 메뉴

  • Category

공지사항

  • Forensic-CheatSheet 오픈

인기 글

태그

  • webhacking.kr
  • LNK FIile
  • forensic artifacts
  • Digital-Forensic
  • Thumbcache
  • Los
  • shellbag
  • Digital Forensic
  • trim
  • File Execution
  • Windows Artifact
  • forensic-cheatsheet
  • digital-forensics
  • shellbag forensics
  • ssd
  • JavaScript
  • sql injection
  • Artifacts
  • iconcahce

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
vared

vared - Blog

Root-me :  JSON Web Token (JWT) - Introduction
WriteUp/Root-me.org

Root-me : JSON Web Token (JWT) - Introduction

2020. 12. 28. 21:01

admin 으로 로그인 하라고 씌여있다. (the objective is to login as admin)

JWT 문제인 만큼 JWT값을 확인해 보도록 하자. (since it is a JWT problem, lets find JWT value)

먼저 guest로 로그인하면 어떤 값이든 줄것 같다. (login as guest would give us some values...)

쿠키값에 JWT 값이 들어있었다. (I could find JWT value inside the cookie)

한번 디코딩해 보자.(lets decode it)

jwt.io/

우리는 payload 값만 admin으로 변조하면 성공이다.(we have to change the username value into admin)

여기서 문제가 해결되지 않는다.

시그니쳐 값이 맞지 않다는 것이다.(signature value is not right)

즉 암호화 부분의 값을 찾아주거나, 제거해주는 방법을 사용하면 된다. 내부적으로 암호화하는 로직이 없길 바래야겠다.(so we have to find the secret key of JWT or just leave it blank, lets hope that there is no encryption logic)

다음의 코드로 시그니쳐 값 부분을 none 으로 지정해주면 된다.( just give a none value to the signature using the code below)

import jwt

code = jwt.encode({"username": "admin"},"",algorithm='none')
print(code)

Clear!

저작자표시 (새창열림)

'WriteUp > Root-me.org' 카테고리의 다른 글

Root me : Directory traversal  (0) 2020.12.28
Rootme : Insecure Code Management  (0) 2020.12.28
Root-me[web_client] : Javascript - Webpack  (0) 2020.09.01
Command & Control - level 2  (0) 2020.08.11
Root-me : [Web_Server]HTTP - Cookies  (0) 2020.08.04
    'WriteUp/Root-me.org' 카테고리의 다른 글
    • Root me : Directory traversal
    • Rootme : Insecure Code Management
    • Root-me[web_client] : Javascript - Webpack
    • Command & Control - level 2
    vared
    vared

    티스토리툴바