题目描述

X老师忘记删除备份文件,他派小宁同学去把备份文件找出来,一起来帮小宁同学吧!

Solution

Solution 1

常见的备份文件后缀名有: .git .svn .swp .svn .~ .bak .bash_history。在index.php后穷尽上面各种可能,最终在/index.php.bak中下载到一个文件:

  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>备份文件</title>
  5. <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />
  6. <style>
  7. body{
  8. margin-left:auto;
  9. margin-right:auto;
  10. margin-TOP:200PX;
  11. width:20em;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <h3>你知道index.php的备份文件名吗?</h3>
  17. <?php
  18. $flag="Cyberpeace{855A1C4B3401294CB6604CCC98BDE334}"
  19. ?>
  20. </body>
  21. </html>

Flag 就在其中。

Solution 2

使用命令:

pip3 install dirsearch

安装 Dirsearch 目录扫描工具。使用下列命令遍历网站目录文件:

dirsearch -u http://111.200.241.244:57524 -e *

效果如下:

003-1.png