블로그 이전했습니다!!! 클릭!

미디어 로그



4. Basic Level 4





문제>




레벨 4


이번에는 샘이 강력한 암호화 스크립트를 적용했습니다. 그러나, 이 암호화 방식은 길고 복잡하여 샘이 종종 잃어버립니다. 그래서 그는 암호를 잊어버린 경우에는 자동으로 그에게 암호를 이메일로 전송할 스크립트를 적용합니다. 다음 버튼이 바로 그 스크립트 입니다. (ps. 개인적으로 의역하였습니다.)



풀이>


일단 어떤 스크립트를 적용했는지 보기 위해 소스를 봅니다.






This time Sam hardcoded the password into the script. However, the password is long and complex, and Sam is often forgetful. So he wrote a script that would email his password to him automatically in case he forgot. Here is the script:
// action="/missions/basic/4/level4.php" - form action에 있는 링크가 표시가 안되는 현상이 발생했습니다.


Password:
// action="/missions/basic/4/index.php" - form action에 있는 링크가 표시가 안되는 현상이 발생했습니다.

level4.php가 수상하여, level4.php에 접속해보았더니 다음과 같은 에러 페이지가 뜹니다.




그냥 Send password to Sam 버튼을 클릭하여, 실행을 해본 결과


"Password reminder successfully sent."과 같이 암호를 전송완료되었다는 메시지가 뜹니다.


level4.php 의 headers를 살펴본 결과 





form data 의 to 를 변경하면 문제가 해결될 것 같습니다. 


소스보기로 level4 소스 부분을 로컬파일로 만들어 이메일 값을 변조해봅니다. 





메모장이나 editplus 등 텍스트 수정 프로그램에 붙여넣고 아래 빨간 글씨를 수정하여 주시면 됩니다.


<br />This time Sam hardcoded the password into the script. However, the password is long and complex, and Sam is often forgetful. So he wrote a script that would email his password to him automatically in case he forgot. Here is the script:<br /><br />

  <center>

    <form action="http://www.hackthissite.org/missions/basic/4/level4.php" method="post">

    <input type="hidden" name="to" value="자신의이메일@이메일.com" />

    <input type="submit" value="Send password to Sam" /></form>

  </center><br /><br />


  <center>

     <b>Password:</b><br />

      <form action="http://www.hackthissite.org/missions/basic/4/index.php" method="post">

      <input type="password" name="password" /><br /><br />

      <input type="submit" value="submit" /></form>


그리고, basic4.html 등 html 파일로 저장 후 실행하여 주시면 됩니다. 




Send password to Sam 버튼을 클릭하면, POST값이 변조되고 비밀번호가 표시되게 됩니다.



동영상 풀이>


Dropbox 계정이므로, 약간의 로딩이 걸릴 수 있습니다.
전체화면으로 보시면, 선명하시게 보실 수 있습니다.





posted by t@k1Ng

무단으로 퍼가시거나 무단으로 인용하시지 말아주세요. 

인용 및 퍼가셨다면, 댓글 및 출처좀 부탁드리겠습니다.