본문 바로가기

정보보안/웹해킹10

HttpOnly Cookie & Secure Cookie 개인정보는 쿠키에 저장한다. 그런데 공격자가 쿠키 탈취를 시도한다. -> 쿠키에 대한 공격 중 가장 대중적인 것이 세션 하이재킹 HTTP Only Cookies 쿠키는 클라이언트에서 자바스크립트로 조회할 수 있기 때문에, 해키들은 js로 쿠키를 가로채고자 시도한다. XSS에서 location.href=""+document.cookie 이런 xss 취약점을 해결하는 것은 브라우저에서 쿠키에 접근할 수 없도록 제한하는 것이다. 이 역할을 하는 것이 바로 HTTP Only Cookie이다. Set-Cookie: key:value; path=/; HttpOnly HttpOnly를 추가함으로써 http only cookie가 활성화되며, XSS 공격이 차단된다. 브라우저에서 해당 쿠키로 접근할 수 없게 되지만, .. 2021. 10. 22.
[PortSwigger] Reflected XSS into HTML context with all tags blocked except custom ones custom tag 외에 모두 필터링 한다 https://your-lab-id.web-security-academy.net/?search=#x 풀이가 이런 이유는 victim이 /exploit 링크를 클릭했을 때 익스되도록 만들기 위함인 듯 하다... ?search= 입력하는 곳에 asdf 를 입력해도 된다. 2021. 10. 18.
[PortSwigger] Reflected XSS into HTML context with most tags and attributes blocked Reflected XSS into HTML context with most tags and attributes blocked -> ban ban burp suite intruder - ban당하지 않는 tag와 event 알아냄 => body, onresize "onload=this.style.width='100px'> 를 /exploit 만드는 곳에 넣으면 된다. 이해 못한 부분 "> 이게 왜 되는 건지 궁금하다.... > 이건 그래도 왜 되는지 알 것 같은데.... 둘 다 되긴 한다.... 깨달은 부분 나는 ?search=를 입력하는 부분에 저 iframe을 넣어야 하는 거 아닌가?? 생각했지만 이 문제에서의 흐름은 그게 아닌 것 같다.(iframe 입력하면 필터링 당한다) 내 생각엔 저 iframe.. 2021. 10. 18.
[PortSwigger] CSRF where token is tied to non-session cookie https://portswigger.net/web-security/csrf/lab-token-tied-to-non-session-cookie Lab: CSRF where token is tied to non-session cookie | Web Security Academy This lab's email change functionality is vulnerable to CSRF. It uses tokens to try to prevent CSRF attacks, but they aren't fully integrated into the site's ... portswigger.net 이렇게 csrfKey, csrf, session이 전송된다. 하나씩 값을 바꿔 리피터로 보내보면 csrfKey와 csrf.. 2021. 10. 17.
[PortSwigger] CSRF where token is not tied to user session https://portswigger.net/web-security/csrf/lab-token-not-tied-to-user-session Lab: CSRF where token is not tied to user session | Web Security Academy This lab's email change functionality is vulnerable to CSRF. It uses tokens to try to prevent CSRF attacks, but they aren't integrated into the site's ... portswigger.net It uses tokens to try to prevent CSRF attacks, but they aren't integrated int.. 2021. 10. 16.
[PortSwigger] CSRF where token validation depends on token being present https://portswigger.net/web-security/csrf/lab-token-validation-depends-on-token-being-present Lab: CSRF where token validation depends on token being present | Web Security Academy This lab's email change functionality is vulnerable to CSRF. To solve the lab, use your exploit server to host an HTML page that uses a CSRF attack to ... portswigger.net 이전 문제와의 차이점은 GET으로 바꿔 요청 보내면 404가 뜬다는 점 Some a.. 2021. 10. 16.