CONTENT
- (一)需要提前准备的内容
- (二)题目及解析
- 1.检材 1 的操作系统版本是()
- 2.检材 1 中,操作系统的内核版本是()
- 3.检材 1 中磁盘包含一个 LVM 逻辑卷,该 LVM 开始的逻辑区块地址(LBA)是()
- 4.检材 1 中网站“www.kkzjc.com”对应的 Web 服务对外开放的端口是()
- 5.检材 1 所在的服务器共绑定了()个对外开放的域名
- 6.检材 1 所在的服务器的原始 IP 地址是()
- 7.嫌疑人曾经远程登录过检材 1 所在的服务器,分析并找出其登录使用的 IP 地址是()(并使用该地址解压检材 2)
- 8.检材 1 所在的服务器,其主要功能之一为反向代理。找出“www.kkzjc.com”转发的后台网站所使用 的 IP 地址是()(并用该 IP 地址解压检材 3)
- 9.嫌疑人曾经从题 7 的 IP 地址,通过 WEB 方式远程访问过网站,统计出检材 1 中该 IP 出现的次数为() (答案格式:“888” 纯数字)
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
- 1.
(一)需要提前准备的内容
(二)题目及解析
检材链接如下:
https://pan.baidu.com/s/1ch2-1H_dgkrNYZ0LMUz9_A?pwd=alex
##取证过程可能涉及的软件
弘连火眼仿真(搭配vmware workstation),火眼数据分析,网探,XShell
Navicat Premium 15
dnSpy
IIS(重构网站需要windows开启对应IIS服务,详情见百度)
1.检材 1 的操作系统版本是()
A. CentOS release 6.5 (Final)
B. Ubuntu 16.04.3 LTS
C. Debian GNU/Linux 7.8 (wheezy)
D. CentOS Linux release 7.6.1810 (Core)
2.检材 1 中,操作系统的内核版本是()
(答案格式:“1.2.34” 数字和半角符号)
1—2解析
打开火眼仿真,对检材1中DD文件创建虚拟机,登录
温馨提示,账号:root,密码:123456
输入命令查询操作系统和内核版本
cat /proc/version /*linux查看当前操作系统版本信息*/
uname -a /*linux查看版本当前操作系统内核信息*/
如下图所示
答案
1.D
2. 3.10.0
3.检材 1 中磁盘包含一个 LVM 逻辑卷,该 LVM 开始的逻辑区块地址(LBA)是()
(答案格式:“12345678” 纯数字)
3解析
打开火眼数据分析,导入检材1文件,查看分区详情,可知LVM逻辑卷大小对应分区3,打开分区详情可知其对应开始的LBA
答案
2099200
4.检材 1 中网站“www.kkzjc.com”对应的 Web 服务对外开放的端口是()
(答案格式:“123456” 纯数字)
解析:涉及网站内部文件,需要连接服务器进一步了解
先在检材1虚拟机中查看ens33的ip地址(192.168.1.128)
ifconfig /*用于配置和显示Linux内核中网络接口的网络参数*/
小知识点:RedHat/CentOS 7的网卡名字叫做ens33。
既不是0开始也不是传统的eth开头,eth很好理解嘛,ethernet的缩写。
RedHat/CentOS 7系列采用dmidecode采集命名访问,采用了硬件相关信息,可以实现网卡名字永久唯一化。
查看端口和服务
netstat -antp
了解到ssh对应端口为7001,到此,已获悉所有连接服务器所需信息
打开网探,连接服务器
了解一个服务器最好的方式是看历史操作记录,一般日志文件都能被扫描出来
在一般情况下历史日志的具体位置 (/root/.bash_history)
打开网站——nginx——查看配置文件nginx.conf
(很显然该网站用的是nginx,毕竟你点其他apache还是tomcat都没有文件)
很显然,配置文件中没有我们想要的直观的信息,主要是因为配置单个文件太大,如果出了什么问题,排查起来很复杂,所以一般会分散开来,并被include进去,所以下一步打开/etc/nginx/conf.d/*.com
于是找到了www.kkzjc.com的相关配置信息
答案
32000
5.检材 1 所在的服务器共绑定了()个对外开放的域名
解析
见上图,有3个.com所以就是3个对外开放的域名
虽然是这个道理,但是这样解释太过苍白,难以令人信服
在第4题netstat -anpt中我们看到
nginx:master分走30000,31000,32000
ssh对应的7001是登录服务器的端口
127.0.0.1:25和0::1:25是master运载起来的端口
所以很显然答案就在30000,31000,32000
细心的小朋友会发现如果向打开www.kkzjc.com一样点进/etc/nginx/conf.d/*.com中其他2个.com文件
分别对应以上3个listen,易证共有3个对外开放的域名
答案
3
6.检材 1 所在的服务器的原始 IP 地址是()
7.嫌疑人曾经远程登录过检材 1 所在的服务器,分析并找出其登录使用的 IP 地址是()(并使用该地址解压检材 2)
6—7解析
题6
不太理解其中ip的弯弯绕绕如何代理的过程,检材2既然登录过服务器,在浏览器中输入的ip地址即为服务器的原始ip,要么登录检材2看浏览器的历史记录,要么在检材1的日志看看有没有线索
查看docker日志
[root@localhost ~]# docker logs 08f
输出很多,翻一下可以看到
/docker-entrypoint.sh: Configuration complete; ready for start up
192.168.99.222 - - [19/Sep/2020:17:39:48 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
2020/09/19 17:39:48 [error] 21#21: *1 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.99.222, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.99.3:8091"
192.168.99.222 - - [19/Sep/2020:17:39:48 +0000] "GET /favicon.ico HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.222 - - [19/Sep/2020:17:41:03 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
2020/09/19 17:41:03 [error] 21#21: *2 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.99.222, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.99.3:8091"
192.168.99.222 - - [19/Sep/2020:17:41:03 +0000] "GET /favicon.ico HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.222 - - [19/Sep/2020:17:43:45 +0000] "GET /dl HTTP/1.1" 200 1829 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.222 - - [19/Sep/2020:17:43:45 +0000] "GET /res/img/dr/login/l4.gif HTTP/1.1" 200 417 "http://192.168.99.3:8091/dl" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.222 - - [19/Sep/2020:17:43:45 +0000] "GET /res/img/dr/login/l6.gif HTTP/1.1" 200 385 "http://192.168.99.3:8091/dl" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.222 - - [19/Sep/2020:17:43:45 +0000] "GET /res/img/dr/login/l1.gif HTTP/1.1" 200 764 "http://192.168.99.3:8091/dl" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.222 - - [19/Sep/2020:17:43:45 +0000] "GET /res/img/dr/login/l5.jpg HTTP/1.1" 200 26535 "http://192.168.99.3:8091/dl" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0" "-"
192.168.99.3:8091/dl 第7题答案也有了
ps:后面会用到
题7
既然曾远程登陆过服务器,那么服务器登录日志会记录下来
所以退出docker后输入last命令查看
[root@localhost ~]# last
root pts/0 192.168.1.1 Thu Aug 11 13:10 still logged in
root tty1 Thu Aug 11 10:45 still logged in
reboot system boot 3.10.0-957.el7.x Thu Aug 11 18:44 - 14:22 (-4:-21)
root pts/0 192.168.127.1 Tue Aug 9 07:39 - crash (2+11:04)
root tty1 Tue Aug 9 07:37 - crash (2+11:06)
reboot system boot 3.10.0-957.el7.x Tue Aug 9 15:37 - 14:22 (1+22:45)
root pts/0 192.168.127.1 Mon Aug 8 07:02 - crash (1+08:34)
root tty1 Mon Aug 8 06:26 - crash (1+09:10)
reboot system boot 3.10.0-957.el7.x Mon Aug 8 14:26 - 14:22 (2+23:56)
root tty1 Mon Aug 8 01:40 - crash (12:45)
reboot system boot 3.10.0-957.el7.x Mon Aug 8 09:40 - 14:22 (3+04:42)
reboot system boot 3.10.0-957.el7.x Mon Aug 8 09:40 - 14:22 (3+04:42)
root pts/0 192.168.120.1 Mon Oct 19 16:17 - 16:17 (00:00)
reboot system boot 3.10.0-957.el7.x Tue Oct 20 00:15 - 14:22 (660+14:07)
root pts/1 192.168.120.1 Mon Oct 19 16:03 - crash (08:12)
root pts/0 192.168.120.1 Mon Oct 19 15:58 - 15:58 (00:00)
root tty1 Mon Oct 19 15:57 - crash (08:18)
reboot system boot 3.10.0-957.el7.x Mon Oct 19 23:56 - 14:22 (660+14:26)
reboot system boot 3.10.0-957.el7.x Mon Oct 19 23:53 - 14:22 (660+14:29)
root tty1 Sun Sep 20 01:38 - crash (29+22:14)
reboot system boot 3.10.0-957.el7.x Sun Sep 20 09:37 - 14:22 (690+04:44)
root tty1 Sun Sep 20 01:31 - 17:37 (-7:-54)
reboot system boot 3.10.0-957.el7.x Sun Sep 20 01:31 - 17:37 (-7:-54)
reboot system boot 3.10.0-957.el7.x Sat Sep 5 01:17 - 17:37 (14+16:20)
root pts/0 192.168.99.222 Sat Sep 5 00:52 - down (00:24)
root pts/0 192.168.99.222 Sat Sep 5 00:48 - 00:51 (00:02)
root tty1 Sat Sep 5 00:38 - 01:17 (00:38)
reboot system boot 3.10.0-957.el7.x Sat Sep 5 00:37 - 01:17 (00:39)
root pts/0 192.168.99.222 Sat Sep 5 00:23 - crash (00:13)
reboot system boot 3.10.0-957.el7.x Sat Sep 5 00:23 - 01:17 (00:53)
root pts/0 192.168.99.222 Sat Sep 5 00:18 - down (00:04)
root tty1 Sat Sep 5 00:18 - 00:23 (00:04)
reboot system boot 3.10.0-957.el7.x Sat Sep 5 00:18 - 00:23 (00:05)
root pts/1 192.168.99.222 Wed Sep 2 22:53 - crash (2+01:25)
root pts/0 192.168.99.222 Wed Sep 2 19:07 - crash (2+05:10)
root tty1 Wed Sep 2 19:06 - 02:41 (07:34)
reboot system boot 3.10.0-957.el7.x Wed Sep 2 19:05 - 00:23 (2+05:17)
wtmp begins Wed Sep 2 19:05:53 2020
经常做虚拟机的小朋友可能会发现,一般XX:XX:XX:1是虚拟机设置的ip
排除干扰项便知是192.168.99.22经常登录访问服务器
答案
6.192.168.99.3
7.192.168.99.22
8.检材 1 所在的服务器,其主要功能之一为反向代理。找出“www.kkzjc.com”转发的后台网站所使用 的 IP 地址是()(并用该 IP 地址解压检材 3)
解析
见第4题解析中,www.kkzjc.com网站的配置信息
server {
listen 32000;
server_name www.kkzjc.com;
if ($host != 'www.kkzjc.com'){
return 403;
}
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
*************************************************************************************************
location / {
proxy_pass http://127.0.0.1:8091; pass给8091端口,其在题4netstat -antp命令中没有出现过
index index.html index.htm;
}
*************************************************************************************************
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
根据history大概可以知道8091可能是与docker相关,所以在虚拟机中开启docker(或在xshell里连,都差不多)
docker ps -a /*显示所有的容器,包括未运行的*/
systemctl start docker /*启动docker服务*/
docker ps /*列出容器*/
关键信息:0.0.0.0:8091->80/tcp ,也就是说,容器内部的80端口对应容器外部的8091端口
所以进入docker内部
为方便翻页操作,转战xshell,进入docker
docker exec -it 80 bash
[root@localhost ~]# docker exec -it 08f6 bash
root@08f64376a2e3:/# history /*来都来了,看看history基操勿6*/
1 more /etc/nginx/conf.d/hl.conf
2 exit
3 ls /*且用history浅谈取证思路*/
4 cat /etc/nginx/nginx.conf /*在上面我们已经讲过nginx的配置文件信息*/
5 cd /etc/nginx/conf.d/ /*如果没有include会讲不完出问题很麻烦,所以cd进入conf.d*/
6 ls /*简单浏览当前文件夹下包含文件信息*/
7 cat hl.conf /*hl.conf肯定有点东西*/
**********************************************以下内容略*****************************************************************
8 cd /etc/nginx/
9 cd conf.d/
10 ls
11 cat default.conf `
12 cat default.conf
13 more default.conf
14 more hl.conf
15 rm
16 ls
17 rm default.conf
18 nginx -t
19 nginx -s reload
20 ls
21 cd /etc/nginx/conf.d/
22 ls
23 cat hl
24 cat hl.conf
25 vi
26 vim
27 cat ../nginx.conf
28 history
29 cd /etc/nginx/nginx.conf
30 cd /etc/nginx/conf.d/
31 vi /etc/nginx/conf.d/
32 vi /etc/nginx/conf.d
33 vi conf.d
34 cat nginx.conf
35 cd ..
36 vi conf.d
37 vim conf.d
38 cat conf.d
39 cat nginx.conf
40 cd /etc/nginx/conf.d/*.conf
41 cd /etc/nginx/conf.d/
42 ls
43 cat hl.conf
44 exit
45 cd /var/log/nginx/access.log error.log
46 cd /var/log/nginx/access.log
47 cd /var/log/nginx/
48 ls
49 cat access.log
50 exit
实践是检验真理的唯一标准
所以下一步看看conf.d有什么内容
root@08f64376a2e3:/# cd /etc/nginx/conf.d/
root@08f64376a2e3:/etc/nginx/conf.d# ls
hl.conf
root@08f64376a2e3:/etc/nginx/conf.d# cat hl.conf //查看donf.d的独生子hl.conf的信息//
server {
listen 80;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
#location / {
# root /usr/share/nginx/html;
# index index.html index.htm;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
location / {
proxy_pass http://192.168.1.176:80; //docker外8091端口对接docker内80端口,其ip为192.168.1.176//
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
答案
192.168.1.176