Impossible Level

查看源码

<?php

$html = "";

if ($_SERVER['REQUEST_METHOD'] == "POST") {
    $cookie_value = sha1(mt_rand() . time() . "Impossible");
    setcookie("dvwaSession", $cookie_value, time()+3600, "/vulnerabilities/weak_id/", $_SERVER['HTTP_HOST'], true, true);
}
?>

Impossible级别使用随机数+时间戳+固定字符串("Impossible")进行 sha1 运算,作为 session id,几乎不可能被破解。

而 tomcat 的 session id 值生成的策略,是一个随机数+时间+ jvm 的id值(jvm的id值会根据服务器的硬件信息计算得来),如果出现冲突就会再生成一个。

相关文章:

  • 2021-11-22
  • 2022-01-08
  • 2023-01-22
  • 2021-11-18
  • 2022-12-23
  • 2021-09-26
  • 2021-10-06
猜你喜欢
  • 2021-11-21
  • 2022-02-03
  • 2021-10-02
  • 2022-01-02
  • 2021-05-13
  • 2022-12-23
  • 2021-10-15
相关资源
相似解决方案