Login Bypass5번 풀이

황인환·2024년 5월 19일

- 과제

Login Bypass 5번 normaltic5로 접속하기
ID: doldol PW: dol1234가 주어졌다.

1. Burp Suite로 패킷 분석 확인

-> 주어진 ID PW 활용
-> POST방식, cookie 인증방식
예시)
로그인 인증후 redirection 하기 전에
setcookie("normal", "ok", time() + 200, "/"); 쿠키 발급
->setcookie("쿠키이름", "내용", "시간", "위치") 쿠키 발급방법
<h3>Hello, <?=$_COOKIE['normal']?></h3>쿠키 내용확인

burp suite 쿠키 변조

결과

2. normaltic5 적용


결과

3. 예상 코드

$sql="SELECT * FROM users WHERE id='$id' and password='$password'";
$result=mysqli_query($conn,$sql);
$row=mysqli_num_rows($result);

if($row===1){
    $row2=mysqli_fetch_assoc($result);
    setcookie("normal", "ok", time() + 200, "/");
    header("Location: index.php");}

--normaltic study 과제 --

0개의 댓글