Bubble: ReRevengeVulnerabilityClient Side Path Traversale and t are controlled by Path parameters.As shown in the picture above, we can manipulate the api requested path using path traversal.Self XSSWhen writing a post, self-xss occurs in the preview function.ChainningAdmin bot works as follows.Registeradd post with flagvisit postwrite comment with post's author nameback to dashboard, and write ..
오랜만에 ctf 뛰었는데 재밌게 풀었다. const crypto = require("crypto"); const app = db.getSiblingDB('app'); app.users.insertOne({ user: crypto.randomBytes(8).toString("hex"), pass: crypto.randomBytes(64).toString("hex") }); const secret = db.getSiblingDB('secret'); secret.flag.insertOne({ flag: process.env.FLAG || "dice{test_flag}" }); nodejs로 구현된 웹서버인데 flag는 다른 컨테이너에서 돌아가고 있는 mongodb에 있다. app.post("/api/login..
#!/usr/local/bin/nodeprocess.stdin.setEncoding('utf-8');process.stdin.on('readable', () => { try{ console.log('HTTP/1.1 200 OK\nContent-Type: text/html\nConnection: Close\n'); const json = process.stdin.read().match(/\?(.*?)\ /)?.[1]; console.log(json) obj = JSON.parse(json); console.log(`JSON: ${json}, Object:`, require('./index')(obj, {})); }catch(error){ require('./usage')..
보호되어 있는 글입니다.
GOTM func root_handler(w http.ResponseWriter, r *http.Request) { token := r.Header.Get("X-Token") if token != "" { id, _ := jwt_decode(token) acc := get_account(id) tpl, err := template.New("").Parse("Logged in as " + acc.id) if err != nil { } tpl.Execute(w, &acc) } else { return } }template injection is possible using id when print a login user func flag_handler(w http.ResponseWriter, r *http.R..
CAFE XSS 문제다. 하지만 bot 코드에 지워지지 않은 admin의 패스워드로 인해 로그인하고 나면 손쉽게 플래그를 획득할 수 있다. 인텐 풀이는 다음과 같다. function filterHtml($content) { $result = ''; $html = new simple_html_dom(); $html->load($content); $allowTag = ['a', 'img', 'p', 'span', 'br', 'hr', 'b', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'strong', 'em', 'code', 'iframe']; foreach($allowTag as $tag){ foreach($html->find($tag) as $element) { switch ($t..
대회가 끝나고 나서 바로 놀러가서 이제야 라업을 올린다. Hack into skynet #!/usr/bin/env python3 import flask import psycopg2 import datetime import hashlib from skynet import Skynet app = flask.Flask(__name__, static_url_path='') skynet = Skynet() def skynet_detect(): req = { 'method': flask.request.method, 'path': flask.request.full_path, 'host': flask.request.headers.get('host'), 'content_type': flask.request.headers..
I'm sorry for writing only the exploit and scenario because I don't have enough time. filesharing #scenario 1. upload javascript file 2. share admin 3. xss in /play 4. bypass csp via error page 5 inject script into error pageexploit.js a = window.open('/' + 'x'.repeat(4100)); setTimeout(function() { a.document.body.innerHTML = ``; }, 1000);" payload https://filesharing.m0..