1
| 2021年7月12日,上午8点左右,警方接到被害人张某(张有财)报案,声称自己被敲诈数万元;经询问,张某被嫌疑人诱导裸聊,下载了某“裸聊”软件,导致自己的通讯录和裸聊视频被嫌疑人获取,对其进行敲诈,最终张某不堪重负,选择了报警;警方从张某提供的本人手机中(手机号为18805533089),定向采集到了该“裸聊”软件,通个裸聊APK软件的分析,警方找到了后台服务器地址,并调取了服务器镜像(web.E01),请各位取证工作者回答下列问题:
|
检材web.E01的操作系统版本是
检材web.E01中,操作系统的内核版本是
检材web.E01服务器中,最后一条操作命令为:
检材web.E01服务器中,远程连接服务所使用的端口号为:
下面对服务器进行分析
能够ping通,说明检材和我们物理机在同一个网段下
检查端口开放情况,以及ssh
检查ssh端口,但是无法用xshell连接,查看配置文件
把注释符去掉,重启服务
有www目录,cd进去,宝塔特征
先关闭宝塔烦人的限制
1
| bt 23 && bt 11 && bt 12 && bt 13 && bt 24 && bt 5
|
把nginx,mysql启起来
宝塔里加个端口访问
成功重构,观察他的路由
访问http://192.168.1.111:6324/admin/
我们采取报错的方式来找到加密函数
Common.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
| <?php
namespace app\admin\controller;
use \think\Cache; use \think\Controller; use think\Loader; use think\Db; use \think\Cookie; use \think\Session; class Common extends Controller {
public function clear() { if(false == Cache::clear()) { return $this->error('清除缓存失败'); } else { return $this->success('清除缓存成功'); } }
public function upload($module='admin',$use='admin_thumb') { if($this->request->file('file')){ $file = $this->request->file('file'); }else{ $res['code']=1; $res['msg']='没有上传文件'; return json($res); } $module = $this->request->has('module') ? $this->request->param('module') : $module; $web_config = Db::name('webconfig')->where('web','web')->find(); $info = $file->validate(['size'=>$web_config['file_size']*1024,'ext'=>$web_config['file_type']])->rule('date')->move(ROOT_PATH . 'public' . DS . 'uploads' . DS . $module . DS . $use); if($info) { $data = []; $data['module'] = $module; $data['filename'] = $info->getFilename(); $data['filepath'] = DS . 'uploads' . DS . $module . DS . $use . DS . $info->getSaveName(); $data['fileext'] = $info->getExtension(); $data['filesize'] = $info->getSize(); $data['create_time'] = time(); $data['uploadip'] = $this->request->ip(); $data['user_id'] = Session::has('admin') ? Session::get('admin') : 0; if($data['module'] = 'admin') { $data['status'] = 1; $data['admin_id'] = $data['user_id']; $data['audit_time'] = time(); } $data['use'] = $this->request->has('use') ? $this->request->param('use') : $use; $res['id'] = Db::name('attachment')->insertGetId($data); $res['src'] = DS . 'uploads' . DS . $module . DS . $use . DS . $info->getSaveName(); $res['code'] = 2; addlog($res['id']); return json($res); } else { return $this->error('上传失败:'.$file->getError()); } }
public function login() { if(Session::has('admin') == false) { if($this->request->isPost()) { $post = $this->request->post(); $validate = new \think\Validate([ ['name', 'require|alphaDash', '用户名不能为空|用户名格式只能是字母、数字、——或_'], ['password', 'require', '密码不能为空'], ['captcha','require|captcha','验证码不能为空|验证码不正确'], ]); if (!$validate->check($post)) { $this->error('提交失败:' . $validate->getError()); } $name = Db::name('admin')->where('name',$post['name'])->find(); if(empty($name)) { return $this->error('用户名不存在'); } else { $post['password'] = password($post['password']); if($name['password'] != $post['password']) { return $this->error('密码错误'); } else { if(!empty($post['remember']) and $post['remember'] == 1) { if(Cookie::has('usermember')) { Cookie::delete('usermember'); } Cookie::forever('usermember',$post['name']); } else { if(Cookie::has('usermember')) { Cookie::delete('usermember'); } } Session::set("admin",$name['id']); Session::set("admin_cate_id",$name['admin_cate_id']); Db::name('admin')->where('id',$name['id'])->update(['login_ip' => $this->request->ip(),'login_time' => time()]); addlog(); if(!cache('sessionIds')){ $sessionIds = []; $sessionIds[$name['id']] = session_id(); cache('sessionIds',$sessionIds); }else{ $sessionIds = cache('sessionIds'); $sessionIds[$name['id']] = session_id(); cache('sessionIds',$sessionIds); } return $this->success('登录成功,正在跳转...','admin/index/index'); } } } else { if(Cookie::has('usermember')) { $this->assign('usermember',Cookie::get('usermember')); } return $this->fetch(); } } else { $this->redirect('admin/index/index'); } }
public function logout() { Session::delete('admin'); Session::delete('admin_cate_id'); if(Session::has('admin') or Session::has('admin_cate_id')) { return $this->error('退出失败'); } else { return $this->success('正在退出...','admin/common/login'); } } }
|
1
| if($name['password'] == $post['password']) {
|
修改逻辑
其实做到这里,这套题差不多已经做完了
我们返回到题目里,端口号在我们连接ssh的时候已经知道了
7001
该后台服务器中,在案发前,管理员最后一次登陆服务器的IP地址为(答案格式111.111.111.111)
题干问的是案发前,报警时间是2021年7月12日,所以我们要看这之前的last记录
检材web.E01中,嫌疑人架设网站使用了何种工具架设了网站
接上一题,请问架设网站的工具的登陆用户名为:
该后台网站对外提供服务所使用的端口号为:
请分析该网站的后台登陆地址的url为:
http://192.168.1.111:6324/admin/common/login.shtml
该网站后台所使用的数据库类型为:
该网站所使用的数据库的库名(database名)为
该网站所使用的数据库的root密码为
已知,该网站后台对于账号的密码采用加盐加密,该salt值为:
对登录的函数进行审计
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
| <?php
namespace app\admin\controller;
use \think\Cache; use \think\Controller; use think\Loader; use think\Db; use \think\Cookie; use \think\Session; class Common extends Controller {
public function clear() { if(false == Cache::clear()) { return $this->error('清除缓存失败'); } else { return $this->success('清除缓存成功'); } }
public function upload($module='admin',$use='admin_thumb') { if($this->request->file('file')){ $file = $this->request->file('file'); }else{ $res['code']=1; $res['msg']='没有上传文件'; return json($res); } $module = $this->request->has('module') ? $this->request->param('module') : $module; $web_config = Db::name('webconfig')->where('web','web')->find(); $info = $file->validate(['size'=>$web_config['file_size']*1024,'ext'=>$web_config['file_type']])->rule('date')->move(ROOT_PATH . 'public' . DS . 'uploads' . DS . $module . DS . $use); if($info) { $data = []; $data['module'] = $module; $data['filename'] = $info->getFilename(); $data['filepath'] = DS . 'uploads' . DS . $module . DS . $use . DS . $info->getSaveName(); $data['fileext'] = $info->getExtension(); $data['filesize'] = $info->getSize(); $data['create_time'] = time(); $data['uploadip'] = $this->request->ip(); $data['user_id'] = Session::has('admin') ? Session::get('admin') : 0; if($data['module'] = 'admin') { $data['status'] = 1; $data['admin_id'] = $data['user_id']; $data['audit_time'] = time(); } $data['use'] = $this->request->has('use') ? $this->request->param('use') : $use; $res['id'] = Db::name('attachment')->insertGetId($data); $res['src'] = DS . 'uploads' . DS . $module . DS . $use . DS . $info->getSaveName(); $res['code'] = 2; addlog($res['id']); return json($res); } else { return $this->error('上传失败:'.$file->getError()); } }
public function login() { if(Session::has('admin') == false) { if($this->request->isPost()) { $post = $this->request->post(); $validate = new \think\Validate([ ['name', 'require|alphaDash', '用户名不能为空|用户名格式只能是字母、数字、——或_'], ['password', 'require', '密码不能为空'], ['captcha','require|captcha','验证码不能为空|验证码不正确'], ]); if (!$validate->check($post)) { $this->error('提交失败:' . $validate->getError()); } $name = Db::name('admin')->where('name',$post['name'])->find(); if(empty($name)) { return $this->error('用户名不存在'); } else { $post['password'] = password($post['password']); if($name['password'] != $post['password']) { return $this->error('密码错误'); } else { if(!empty($post['remember']) and $post['remember'] == 1) { if(Cookie::has('usermember')) { Cookie::delete('usermember'); } Cookie::forever('usermember',$post['name']); } else { if(Cookie::has('usermember')) { Cookie::delete('usermember'); } } Session::set("admin",$name['id']); Session::set("admin_cate_id",$name['admin_cate_id']); Db::name('admin')->where('id',$name['id'])->update(['login_ip' => $this->request->ip(),'login_time' => time()]); addlog(); if(!cache('sessionIds')){ $sessionIds = []; $sessionIds[$name['id']] = session_id(); cache('sessionIds',$sessionIds); }else{ $sessionIds = cache('sessionIds'); $sessionIds[$name['id']] = session_id(); cache('sessionIds',$sessionIds); } return $this->success('登录成功,正在跳转...','admin/index/index'); } } } else { if(Cookie::has('usermember')) { $this->assign('usermember',Cookie::get('usermember')); } return $this->fetch(); } } else { $this->redirect('admin/index/index'); } }
public function logout() { Session::delete('admin'); Session::delete('admin_cate_id'); if(Session::has('admin') or Session::has('admin_cate_id')) { return $this->error('退出失败'); } else { return $this->success('正在退出...','admin/common/login'); } } }
|
1
| $post['password'] = password($post['password']);
|
加密函数叫password
推荐用phpstorm审计,跟踪函数方便
1 2 3 4 5
| function password($password, $password_code='lshi4AsSUrUOwWV') { return md5(md5($password) . md5($password_code)); }
|
3次加密,盐为lshi4AsSUrUOwWV
在对后台账号的密码加密处理过程中,后台一共计算几次MD5值
见上
请问,网站后台的创建时间最早的管理员账号为:
请综合分析并重构网站,本案中受害者张某的最后登陆IP是多少(答案格式111.111.111.111)
1
| 警方从张某提供的本人手机中(手机号为18805533089)
|
请综合分析并重构网站,本案中嫌疑人所掌握的后台共获取了多少设备记录
请综合分析并重构网站,本案中受害者张某的手机型号在后台记录中显示为
1
| 警方从张某提供的本人手机中(手机号为18805533089)
|
请综合分析并重构网站,本案中受害者张某的手机通讯录中,名为“许总”的电话号码为(不需要填写空格,答案格式:18811112222)
请综合分析并重构网站,分析该网站第一次用于诈骗活动的时间(填写到日,格式为:2000-01-01)
请综合分析并重构网站,分析该网站设定的邀请码为
请综合分析并重构网站,分析该网站共记录的通信录数量为
请综合分析并重构网站,分析最常登录后台的角色昵称为