CTF/etc CTF
[DamCTF 2020] write up
[DamCTF 2020] write up
2020.10.12WEB / finger-warmup 문제 사이트에 접속하면 아래 사진 처럼 클릭하는 링크가 나온다. 클릭하면 똑같은 페이지 이지만, 주소 뒤에 랜덤한 값이 따라 붙는다. 문제 힌트에 `requests` 모듈과 `beautifulsoup` 모듈을 사용하라고 되어 있어, `a` 태그를 크롤링해 계속 클릭하면 flag를 획득 할 수 있을 거라고 생각했다. import requests import bs4 import time url = "https://finger-warmup.chals.damctf.xyz/" s = requests.session() res = s.get(url) while True: html = bs4.BeautifulSoup(res.text, "html.parser") href = html...
[b01lers 2020 CTF] write up
[b01lers 2020 CTF] write up
2020.10.07There is no Spoon keyword: `Heap overflow` #include #include #include #include char * xor(char * src, char * dest, int len) { for(int i = 0; i < len - 1; i++) { dest[i] = src[i] ^ dest[i]; } dest[len-1] = 0; return dest; } int main() { setvbuf(stdout, 0, 2, 0); setvbuf(stderr, 0, 2, 0); char buffer[256]; int len = 256; printf("Neo, enter your matrix: "); len = read(0, buffer, len); char * buffer..
[Google CTF 2020] log-me-in write up
[Google CTF 2020] log-me-in write up
2020.08.27google ctf web 문제의 log me in 이다. 해당 문제 write up은 다른 사람의 롸업을 보고 작성한 것이다. 문제 페이지에 접속하면 아래와 같은 페이지가 나온다. 이번 문제는 코드를 올려 줬는데, 문제의 코드는 아래와 같다. /** * @fileoverview Description of this file. */ const mysql = require('mysql'); const express = require('express'); const cookieSession = require('cookie-session'); const cookieParser = require('cookie-parser'); const bodyParser = require('body-parser'); const..
[Google CTF 2020] pasteurize write up
[Google CTF 2020] pasteurize write up
2020.08.27Google CTF 2020 문제중 web 문제 `pasteurize` 이다. 해당 write up은 외국인의 풀이를 바탕으로 작성되었다. 문제 사이트에 접속하면 입력과 제출을 할 수 있는 기능이 있다. 개발자 모드로 보면 `/source` 링크가 있는데 해당 링크로 들어가면 `nodejs`로 코딩된 코드를 볼 수 있다. 아래는 문제의 코드이다. const express = require('express'); const bodyParser = require('body-parser'); const utils = require('./utils'); const Recaptcha = require('express-recaptcha').RecaptchaV3; const uuidv4 = require('uuid')..
InCTF2020 - coins write up
InCTF2020 - coins write up
2020.08.02MISC 분야의 문제이다. nc로 접속하면 아래와 같이 문제가 출력이 된다. 문제만 봐도 한눈에 이해가 간다. python으로 4자리를 찾는 코드를 작성하면 아래와 같다. string 패키지로 문자열을 나열한 다음 for문 4개를 이용해 알맞은 4자리 값을 찾은 후 sendline() 함수로 값을 보낸다. from pwn import * import string import hashlib context.log_level = "debug" p = remote("34.74.30.191", "1337") line = p.recvline().replace("\n", "") line = line.split(" ") length = len(line[0][line[0].find("(")+1 : line[0].find..
[CTF] - wechall Training: MySQL II 풀이
[CTF] - wechall Training: MySQL II 풀이
2019.04.10http://www.wechall.net/challenge/training/mysql/auth_bypass2/index.php [WeChall] Training: MySQL II MySQL Authentication Bypass II This one is the same as MySQL1, but you have to come up with a more advanced injection to trick this authentication. Your mission is again: Login yourself as admin. Again you are given the sourcecode, also as highlighted vers www.wechall.net 이 문제를 풀다가 괜찮은 문제여서 정리할겸 포..