1. 특히 Node.js에서 bodyParser.json()이 활성화되어있는 경우, 배열을 잘 활용하는 것이 중요하다.
코드에서 includes 함수, length 함수를 사용하면 배열을 통해 Bypass 할 수 있다. Example) indexOf
2. 템플릿 관련 문제를 풀 때, 렌더링 할 때 특정 문자열을 필터링하는 경우, 반복문을 이용해서 모든 객체를 출력하는 등의 방법으로 풀 수 있다. Ex) LineCTF 2021 babysandbox
Ref: https://handlebarsjs.com/examples/builtin-helper-each-block.html
Handlebars
handlebarsjs.com
3. Node.js 소스코드에서 parseFloat 함수 등을 사용하는 경우, parseFloat issue를 고려하자..
Ref: Dreamhack Self-deception Ex) parseFloat(1 - 0.9999999) => 9.999999994736442e-8 이 때 parseInt로 변경하면 9가 된다.
4. Nginx, Haproxy 등에서 Endpoint 검증할 때 대소문자 등 다양한 방법으로 우회 시도
5. Hs256 to Rs256 public key 엔터 여부 등등 여러요소 고려
6. IPv4, IPv6 등 IP 주소를 입력할 수 있는 곳이 있다면 IPv6 Scope Id를 이용하여 Comand Injection과 같으 공격 수행 가능
7. toLowerCase(), toUpperCase() bypass with unicode
8. Python에서 SSRF 취약점 방지를 위한 PORT 검사를 할 때, 0으로 bypass 하고 iptables를 이용하여 80포트로 리다이렉션되게 할 수 있다.
9. Script load 하는 부분에서 Relative Path Overwrite 확인
<script src="/app/main.js"></script>
<script src="app/main.js"></script>
10. 특히 XSS 할 때, '+' 특수문자 인코딩 주의
11. Nginx filter bypass
Ref: https://book.hacktricks.wiki/en/network-services-pentesting/pentesting-web/nginx.html?highlight=nginx#nginx
12. non-printable ASCII character(0x00-0x1F and 0x7F-0xFF) - dreamboard
13. https://github.com/synacktiv/php_filter_chain_generator
GitHub - synacktiv/php_filter_chain_generator
Contribute to synacktiv/php_filter_chain_generator development by creating an account on GitHub.
github.com
14. hash_file, file, file_get_contents 등 함수를 사용할 때 php filter chain
'Hacking > CTF' 카테고리의 다른 글
TRX CTF 2025 (0) | 2025.02.24 |
---|---|
srdnlen CTF 2025 Write Up (0) | 2025.01.20 |
TSG CTF (0) | 2024.12.16 |
LakeCTF '24-'25 Quals (2) | 2024.12.09 |