Skip to content
Suzu
1 min read

【網路安全實務與社會實踐】作業一 Write-up

> 此次 Lab 共為兩題

View the complete series →
On this page

【網路安全實務與社會實踐】作業一

此次 Lab 共為兩題

  1. phpisnice https://class.nckuctf.org/challenges#phpisnice-12
  2. phpisbest https://class.nckuctf.org/challenges#phpisbest-13

phpisnice

先看一下網頁給的資訊

<?php
include('flag.php');

$A = $_GET['A'];
$B = $_GET['B'];

highlight_file(__FILE__);
echo '<hr>';

if (isset($A) && isset($B))
    if ($A != $B)
        if (strcmp($A, $B) == 0)
            if (md5($A) == md5($B))
                echo $flag;
            else die('ERROR: MD5(A) != MD5(B)');
        else die('ERROR: strcmp(A, B) != 0');
    else die('ERROR: A == B');
else die('ERROR: A, B should be given');

可以看出題目要求:要求找到一個值 A,使得 md5(A) == A 所以這題是標準的「md5碰撞」

Share this page