CTF

    TBTL CTF 2024

    TBTL CTF 2024

    [solved] [pwn/Enough with the averages]더보기// gcc -o chall chall.c -Wextra#include #include void read_flag() {  FILE* in;  char flag[64];  in = fopen("flag.txt", "rt");  fscanf(in, "%s", flag);  fclose(in);}void vuln() {  int score[20];  int total = 0;    for (int i=0; i read_flag 함수와 vuln 함수가 스택 프레임을 공유한다. vuln에선 값을 더해서 평균 값을 내고 출력해준다. scanf의 인자가 "%d"인데 문자를 넣게되면 값이 바뀌지 않고 보존된다.이를 이용해서 플래그 값을 추출해..

    San Diego CTF 2024

    San Diego CTF 2024

    [solved] [pwn/point-plunderer]더보기int __cdecl main(int argc, const char **argv, const char **envp){ int v4; // [rsp+8h] [rbp-18h] BYREF unsigned int v5; // [rsp+Ch] [rbp-14h] BYREF unsigned int v6; // [rsp+10h] [rbp-10h] unsigned int v7; // [rsp+14h] [rbp-Ch] unsigned __int64 v8; // [rsp+18h] [rbp-8h] v8 = __readfsqword(0x28u); setvbuf(stdin, 0LL, 2, 0LL); setvbuf(_bss_start, 0LL, 2, 0LL)..

    Grey Cat The Flag 2024 Qualifiers

    Grey Cat The Flag 2024 Qualifiers

    [solved] [web/GreyCTF Survey] 더보기 const express = require('express'); const bodyParser = require('body-parser'); const app = express(); const port = 3000 const config = require("./config.json"); app.use(bodyParser.json()) app.use("/", express.static("static")) let score = -0.42069; app.get("/status", async (req, res)=>{ return res.status(200).json({ "error": false, "data": score }); }) app.post(..

    AmateursCTF 2024

    AmateursCTF 2024

    체감상 작년보다 어려웠는데 포너블 10개 중 4개 풀어서 선방했다고 생각한다. [solved] [web] denied 더보기 const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => { if (req.method == "GET") return res.send("Bad!"); res.cookie('flag', process.env.FLAG ?? "flag{fake_flag}") res.send('Winner!') }) app.listen(port, () => { console.log(`Example app listening on port ${port}`) }) get으로 접근해야 하..

    [QWB CTF 2018] core (with write-up)

    [QWB CTF 2018] core (with write-up)

    롸업과 함께하는 첫 리눅스 커널 문제 환경 세팅 문제 파일은 여기서 받을 수 있다. https://github.com/ctf-wiki/ctf-challenges/tree/master/pwn/kernel/QWB2018-core ctf-challenges/pwn/kernel/QWB2018-core at master · ctf-wiki/ctf-challenges Contribute to ctf-wiki/ctf-challenges development by creating an account on GitHub. github.com 파일들 중 core_give.tar.gz를 압축해제 해준다. bzImage 파일은 커널 이미지 파일이다. core.cpio 파일은 file system을 압축한 파일로 분석 대상 모듈..