diff --git a/README.md b/README.md index ca0a2f5..44b8281 100644 --- a/README.md +++ b/README.md @@ -28,41 +28,23 @@ by [贰拾壹](https://github.com/er10yi ) 假设服务器已装好,服务器ip地址为```192.168.12.128``` -## 四步快速部署 +## 三步快速部署 ### 1.生成配置文件 下载部署包(Releases页面)解压后,deploy目录下双击```GenPass.bat```(Windows下,*uinx/mac直接执行```GenPass.bat```里面的内容就行了),将在当前目录生成newPass.txt,新的配置文件和初始化脚本会自动复制到MagiCude目录下 -### 2.修改前端api接口地址及agent.yml +### 2.将deploy目录下的MagiCude上传到服务器root目录下 -#### 前端api接口地址 +### 3.初始化环境并运行系统 -需要修改```MagiCude\dist\static\js\app.*.js```,* 指的是类似ea5c35e2这样一串字符 - -将baseURL:```"http://127.0.0.1:9001/"```中的ip改成实际部署服务器的ip - -如 ```baseURL:"http://192.168.12.128:9001/"``` - -#### agent.yml - -需要修改```MagiCude```目录下的agent.yml中center节点的ip地址 - -```yml -center: - httpValidateApi: http://127.0.0.1:9001/center/pluginchecker # 需要修改成部署centerapp.jar服务器的ip - dnsValidateIp: 127.0.0.1 # 需要修改成部署centerapp.jar服务器的ip -``` - -将127.0.0.1改成实际部署centerapp.jar服务器的ip - -如 ```dnsValidateIp: 192.168.12.128``` +终端执行```sh initCenterEnvironmentAndStart.sh```,初始化环境和数据并启动系统 -### 3.将deploy目录下的MagiCude上传到服务器root目录下 +**需要手动选择center的ip地址** -### 4.初始化环境并运行系统 +![选择ip](./使用说明图1/选择ip.png) -终端执行```sh initCenterEnvironmentAndStart.sh```,初始化环境和数据并启动系统 +安装结束时,如果没有错误信息,则成功安装 ## 其他 @@ -97,7 +79,7 @@ center: 密码:见newPass.txt ``` -### 任务信息-Agent +任务信息-Agent,看到agent在线即可 ![agent在线](./使用说明图1/agent在线.png) ## 微信讨论组 diff --git a/deploy/MagiCude/dist/index.html b/deploy/MagiCude/dist/index.html index 2bdf6b4..1c92da5 100644 --- a/deploy/MagiCude/dist/index.html +++ b/deploy/MagiCude/dist/index.html @@ -1 +1 @@ -魔方-MagiCude
\ No newline at end of file +魔方-MagiCude
\ No newline at end of file diff --git a/deploy/MagiCude/dist/static/js/chunk-67130b18.31033bc9.js b/deploy/MagiCude/dist/static/js/chunk-67130b18.31033bc9.js deleted file mode 100644 index f2cb6a0..0000000 --- a/deploy/MagiCude/dist/static/js/chunk-67130b18.31033bc9.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-67130b18"],{"10dd":function(t,i,l){"use strict";var a=l("ec3b"),e=l.n(a);e.a},ec3b:function(t,i,l){},ef46:function(t,i,l){"use strict";l.r(i);var a=function(){var t=this,i=t.$createElement,l=t._self._c||i;return l("div",{staticStyle:{padding:"100px 200px 0"}},[l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("魔方-MagiCude")])]),l("el-link",{attrs:{underline:!1},on:{click:function(i){return t.handleDrawer()}}},[l("i",{staticClass:"el-icon-view el-icon--right"}),t._v("正式版 V2.0.1 ")]),l("el-link",{staticStyle:{float:"right"},attrs:{href:"https://github.com/er10yi/MagiCude",target:"_blank"}},[t._v("GitHub项目页面")])],1),l("div",{staticClass:"text"},[l("ol",[l("li",[t._v("高效获取服务器IP, 端口信息, web信息, url链接, 漏洞等资产信息")]),l("li",[t._v("对资产进行有效的安全管理")]),l("li",[t._v("建立漏洞wiki并自动闭环漏洞, 减少安全部门与业务部门的沟通")]),l("li",[t._v("即时漏洞提醒")]),l("li",[t._v("定时发送资产报告和漏洞报告")]),l("li",[t._v("及时发送资产信息和处理结果给负责人进行整改并自动确认整改完成")]),l("li",[t._v("有效获取DHCP的办公机IP与用户关联")]),l("li",[t._v("丰富的图表统计")]),l("li",[t._v("POC框架")])])]),l("div",{staticClass:"item"},[t._v(" Copyrights © 2018-"+t._s(t.getYear())+" "),l("el-link",{attrs:{type:"info",href:"https://github.com/er10yi",target:"_blank"}},[t._v("贰拾壹.")]),t._v("All Rights Reserved. ")],1)]),l("el-drawer",{attrs:{title:"ChangeLog",visible:t.drawer,direction:"rtl",size:"60%",beforeclose:t.handleDrawerClose},on:{"update:visible":function(i){t.drawer=i}}},[l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("TDL - 待定")])]),l("div",{staticClass:"text"},[l("ol",[l("li",[t._v("增加用户前端,放开漏洞wiki,还有啥?")]),l("li",[t._v("丰富漏洞wiki,建成知识库")]),l("li",[t._v("增加全局搜索")]),l("li",[t._v("增加资产导入接口,漏洞导入接口")])])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("正式版 V2.0.1 - 20201009")])]),l("div",{staticClass:"text"},[l("ol",[t._v(" 部署脚本: "),l("li",[t._v("增加部署脚本执行目录判断(issues #3 建议判断或约束一下安装脚本执行目录)")]),l("li",[t._v("增加agent.yml内容是否已经修改判断")]),l("li",[t._v("增加center和agent所需文件判断")]),l("li",[t._v("增加前端api地址是否修改判断")]),l("li",[t._v("增加操作系统判断")]),l("li",[t._v("修复多次重新部署的时候,环境变量会写入多次")]),l("li",[t._v("优化脚本日志输出,屏蔽非脚本错误输出,优化所有脚本")]),l("li",[t._v("Python升级到3.9.0")]),l("li",[t._v("部署脚本运行结束时,增加信息和错误提示")]),l("li",[t._v("移除agentDependency,nmap更新到7.90")])])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("正式版 V2.0 - 20200925")])]),l("div",{staticClass:"text"},[l("ol",[t._v(" 正式版发布,同时开源 ")])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("公测版 V1.3.25 - 20200913")])]),l("div",{staticClass:"text"},[l("ol",[t._v(" 前端: "),l("li",[t._v("修复 子任务Drawer,调整分页无效的问题")]),l("li",[t._v("优化 用code标签显示代码")]),l("li",[t._v("新增 插件页面新增插件代码高亮,python3的selfd插件可前端新增(已知bug,第一次进入插件页面,新增或编辑需要打开两次代码高亮插件才会正常显示,第二次保存才能正常添加代码)")]),l("li",[t._v("新增 设置-批量导入,新增python3的selfd插件配置导入,主要用于python3的selfd插件配置及代码导入")]),l("li",[t._v("新增 新增各个类型任务的demo")]),t._v(" 后端: "),l("li",[t._v("修复 nse类型任务,获取状态时不显示PID信息")]),l("li",[t._v("修复 nse、selfd、httpp任务,资产库无对应的信息时,任务也会发给agent")]),l("li",[t._v("修复 无资产ip时,目标ip为ipNoPort,unknownPortSerVer,ipAllPort,任务也会发给agent")]),l("li",[t._v("修复 修复插件未设置服务和版本时,启动任务会开启所有插件 ")]),l("li",[t._v("优化 优化新增自定义插件,插件核心增加Jep方式调用python代码,可前端直接新增python3的selfd自定义类型的插件(重要更新,TDL的一半,优化新增自定义插件并丰富插件)")]),l("li",[t._v("优化 优化全部批量删除")]),l("li",[t._v("新增 新增python3的selfd插件配置导入接口")]),l("li",[t._v("新增 agent新增python插件import检测,如模块未安装,则会自动安装")]),l("li",[t._v("新增 插件配置新增http、dns辅助验证,用于插件辅助验证无回显漏洞(TDL 增加无回显插件检测)")]),l("li",[t._v("新增 增加HTTP json插件解析")]),l("li",[t._v("修改 随机获取ua的方式修改,存入redis进行随机")]),t._v(" 数据库: "),l("li",[t._v("新增 插件配置新增plugincode字段,用于保存插件代码")]),l("li",[t._v("新增 插件配置新增validatetype字段,用于开启插件http辅助验证或dns辅助验证")]),t._v(" 配置文件: "),l("li",[t._v("新增 agent.yml新增jep节点,用于保存JEP本地库的绝对路径")]),l("li",[t._v("新增 agent.yml新增center节点,用于插件辅助验证时传递http接口和dns的ip地址")]),t._v(" 部署脚本: "),l("li",[t._v("增加 新增Python3.8编译安装")]),l("li",[t._v("移除 移除jre14,修改成jdk15(JEP编译需要)")]),t._v(" 文档: "),l("li",[t._v("优化 优化快速上手及说明文档")]),l("li",[t._v("增加 新增Readme文档")]),l("li",[t._v("增加 新增插件编写说明")])])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("公测版 V1.2.2 - 20200722")])]),l("div",{staticClass:"text"},[l("ol",[l("li",[t._v("优化center部署脚本,增加判断是否已经运行过部署脚本,避免误操作二次运行部署脚本(如果已经部署,则需要用户交互),优化docker服务运行状态检测")]),l("li",[t._v("优化initDataAndStart.sh,增加脚本复制和执行成功的判断")]),l("li",[t._v("修改center.yml,token过期时间设置成一小时")]),l("li",[t._v("优化任务插件显示,将插件启用状态体现到操作中,优化插件启用禁用")]),l("li",[t._v("新增子任务展开Drawer")]),l("li",[t._v("about页面版本上增加changelog的Drawer,增加更新日志及TDL")]),l("li",[t._v("前端依赖更新到最新")])])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("公测版 V1.2.1 - 20200715")])]),l("div",{staticClass:"text"},[l("ol",[t._v(" 前端: "),l("li",[t._v("增加about页面")]),l("li",[t._v("增加菜单栏显示与隐藏的Collapse,涉及的页面:任务、资产ip、资产端口、主机、检测结果、web信息、web信息和url")]),l("li",[t._v("优化资产ip,去除编辑页面显示ip所有信息,修改成Drawer方式显示,并增加url超链接")]),l("li",[t._v("优化资产端口,去除编辑页面显示端口所有信息,修改成Drawer方式显示,并增加http和https链接打开,增加url超链接")]),l("li",[t._v("优化新建任务的数量前端样式,将input修改成number模式")]),l("li",[t._v("优化检测类型任务,将input修改成单选模式")]),l("li",[t._v("优化web信息中ip的显示,增加打开http和https链接的Popover")]),l("li",[t._v("首页四个折线图修改成显示最新数据的10%")]),l("li",[t._v("修改设置-通知设置中的风险等级编辑样式,从input改成单选模式")]),l("li",[t._v("修改cron表达式解析结果的样式,改成表格")])])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("公测版 V1.2.0 - 20200706")])]),l("div",{staticClass:"text"},[l("ol",[t._v(" 公开公测开启 ")])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("内测版 V1.1 - 20200615")])]),l("div",{staticClass:"text"},[l("ol",[l("li",[t._v("优化部署步骤,修改部署脚本成一键部署")]),l("li",[t._v("部署脚本增加系统源修改判断和docker镜像源修改判断(需要用户交互)")]),l("li",[t._v("部署脚本增加判断,提高安装部署成功率")]),l("li",[t._v("前端增加web信息功能,后端优化部分代码")]),l("li",[t._v("文档增加Q/A章节、微信公众号、项目的目录结构说明,为公测做准备")]),l("li",[t._v("增加公测宣传文档")]),l("li",[t._v("增加magicude执行脚本,便于查看系统状态及操作系统(0624)")])])])])]),l("el-card",{staticClass:"box-card"},[l("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[l("span",[l("b",[t._v("内测版 V1.0 - 20200528")])]),l("div",{staticClass:"text"},[l("ol",[t._v(" 公开内测开启 ")])])])])],1)],1)},e=[],s={data:function(){return{drawer:!1}},methods:{handleDrawer:function(){this.drawer=!0},handleDrawerClose:function(){this.drawer=!1},getYear:function(){var t=new Date;return this.year=t.getFullYear(),this.year}}},r=s,v=(l("10dd"),l("2877")),d=Object(v["a"])(r,a,e,!1,null,null,null);i["default"]=d.exports}}]); \ No newline at end of file diff --git a/deploy/MagiCude/dist/static/js/chunk-67130b18.4e9bc052.js b/deploy/MagiCude/dist/static/js/chunk-67130b18.4e9bc052.js new file mode 100644 index 0000000..dc53376 --- /dev/null +++ b/deploy/MagiCude/dist/static/js/chunk-67130b18.4e9bc052.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-67130b18"],{"10dd":function(t,l,i){"use strict";var a=i("ec3b"),e=i.n(a);e.a},ec3b:function(t,l,i){},ef46:function(t,l,i){"use strict";i.r(l);var a=function(){var t=this,l=t.$createElement,i=t._self._c||l;return i("div",{staticStyle:{padding:"100px 200px 0"}},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("魔方-MagiCude")])]),i("el-link",{attrs:{underline:!1},on:{click:function(l){return t.handleDrawer()}}},[i("i",{staticClass:"el-icon-view el-icon--right"}),t._v("正式版 V2.0.2 ")]),i("el-link",{staticStyle:{float:"right"},attrs:{href:"https://github.com/er10yi/MagiCude",target:"_blank"}},[t._v("GitHub项目页面")])],1),i("div",{staticClass:"text"},[i("ol",[i("li",[t._v("高效获取服务器IP, 端口信息, web信息, url链接, 漏洞等资产信息")]),i("li",[t._v("对资产进行有效的安全管理")]),i("li",[t._v("建立漏洞wiki并自动闭环漏洞, 减少安全部门与业务部门的沟通")]),i("li",[t._v("即时漏洞提醒")]),i("li",[t._v("定时发送资产报告和漏洞报告")]),i("li",[t._v("及时发送资产信息和处理结果给负责人进行整改并自动确认整改完成")]),i("li",[t._v("有效获取DHCP的办公机IP与用户关联")]),i("li",[t._v("丰富的图表统计")]),i("li",[t._v("POC框架")])])]),i("div",{staticClass:"item"},[t._v(" Copyrights © 2018-"+t._s(t.getYear())+" "),i("el-link",{attrs:{type:"info",href:"https://github.com/er10yi",target:"_blank"}},[t._v("贰拾壹.")]),t._v("All Rights Reserved. ")],1)]),i("el-drawer",{attrs:{title:"ChangeLog",visible:t.drawer,direction:"rtl",size:"60%",beforeclose:t.handleDrawerClose},on:{"update:visible":function(l){t.drawer=l}}},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("TDL - 待定")])]),i("div",{staticClass:"text"},[i("ol",[i("li",[t._v("增加用户前端,放开漏洞wiki,还有啥?")]),i("li",[t._v("丰富漏洞wiki,建成知识库")]),i("li",[t._v("增加全局搜索")]),i("li",[t._v("增加资产导入接口,漏洞导入接口")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("正式版 V2.0.2 - 20201011")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 部署脚本: "),i("li",[t._v("日志提示增加字体颜色")]),i("li",[t._v("增加卸载脚本")]),i("li",[t._v("center部署无需本地手动修改前端api地址和agent.yml中的地址,只需部署时选择即可")]),i("li",[t._v("agent分布式部署无需本地手动修改agent.yml中的地址,只需部署时输入部署center的ip地址即可")]),i("li",[t._v("优化判断依赖是否存在的方式")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("正式版 V2.0.1 - 20201009")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 部署脚本: "),i("li",[t._v("增加部署脚本执行目录判断(issues #3 建议判断或约束一下安装脚本执行目录)")]),i("li",[t._v("增加agent.yml内容是否已经修改判断")]),i("li",[t._v("增加center和agent所需文件判断")]),i("li",[t._v("增加前端api地址是否修改判断")]),i("li",[t._v("增加操作系统判断")]),i("li",[t._v("修复多次重新部署的时候,环境变量会写入多次")]),i("li",[t._v("优化脚本日志输出,屏蔽非脚本错误输出,优化所有脚本")]),i("li",[t._v("Python升级到3.9.0")]),i("li",[t._v("部署脚本运行结束时,增加信息和错误提示")]),i("li",[t._v("移除agentDependency,nmap更新到7.90")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("正式版 V2.0 - 20200925")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 正式版发布,同时开源 ")])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("公测版 V1.3.25 - 20200913")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 前端: "),i("li",[t._v("修复 子任务Drawer,调整分页无效的问题")]),i("li",[t._v("优化 用code标签显示代码")]),i("li",[t._v("新增 插件页面新增插件代码高亮,python3的selfd插件可前端新增(已知bug,第一次进入插件页面,新增或编辑需要打开两次代码高亮插件才会正常显示,第二次保存才能正常添加代码)")]),i("li",[t._v("新增 设置-批量导入,新增python3的selfd插件配置导入,主要用于python3的selfd插件配置及代码导入")]),i("li",[t._v("新增 新增各个类型任务的demo")]),t._v(" 后端: "),i("li",[t._v("修复 nse类型任务,获取状态时不显示PID信息")]),i("li",[t._v("修复 nse、selfd、httpp任务,资产库无对应的信息时,任务也会发给agent")]),i("li",[t._v("修复 无资产ip时,目标ip为ipNoPort,unknownPortSerVer,ipAllPort,任务也会发给agent")]),i("li",[t._v("修复 修复插件未设置服务和版本时,启动任务会开启所有插件 ")]),i("li",[t._v("优化 优化新增自定义插件,插件核心增加Jep方式调用python代码,可前端直接新增python3的selfd自定义类型的插件(重要更新,TDL的一半,优化新增自定义插件并丰富插件)")]),i("li",[t._v("优化 优化全部批量删除")]),i("li",[t._v("新增 新增python3的selfd插件配置导入接口")]),i("li",[t._v("新增 agent新增python插件import检测,如模块未安装,则会自动安装")]),i("li",[t._v("新增 插件配置新增http、dns辅助验证,用于插件辅助验证无回显漏洞(TDL 增加无回显插件检测)")]),i("li",[t._v("新增 增加HTTP json插件解析")]),i("li",[t._v("修改 随机获取ua的方式修改,存入redis进行随机")]),t._v(" 数据库: "),i("li",[t._v("新增 插件配置新增plugincode字段,用于保存插件代码")]),i("li",[t._v("新增 插件配置新增validatetype字段,用于开启插件http辅助验证或dns辅助验证")]),t._v(" 配置文件: "),i("li",[t._v("新增 agent.yml新增jep节点,用于保存JEP本地库的绝对路径")]),i("li",[t._v("新增 agent.yml新增center节点,用于插件辅助验证时传递http接口和dns的ip地址")]),t._v(" 部署脚本: "),i("li",[t._v("增加 新增Python3.8编译安装")]),i("li",[t._v("移除 移除jre14,修改成jdk15(JEP编译需要)")]),t._v(" 文档: "),i("li",[t._v("优化 优化快速上手及说明文档")]),i("li",[t._v("增加 新增Readme文档")]),i("li",[t._v("增加 新增插件编写说明")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("公测版 V1.2.2 - 20200722")])]),i("div",{staticClass:"text"},[i("ol",[i("li",[t._v("优化center部署脚本,增加判断是否已经运行过部署脚本,避免误操作二次运行部署脚本(如果已经部署,则需要用户交互),优化docker服务运行状态检测")]),i("li",[t._v("优化initDataAndStart.sh,增加脚本复制和执行成功的判断")]),i("li",[t._v("修改center.yml,token过期时间设置成一小时")]),i("li",[t._v("优化任务插件显示,将插件启用状态体现到操作中,优化插件启用禁用")]),i("li",[t._v("新增子任务展开Drawer")]),i("li",[t._v("about页面版本上增加changelog的Drawer,增加更新日志及TDL")]),i("li",[t._v("前端依赖更新到最新")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("公测版 V1.2.1 - 20200715")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 前端: "),i("li",[t._v("增加about页面")]),i("li",[t._v("增加菜单栏显示与隐藏的Collapse,涉及的页面:任务、资产ip、资产端口、主机、检测结果、web信息、web信息和url")]),i("li",[t._v("优化资产ip,去除编辑页面显示ip所有信息,修改成Drawer方式显示,并增加url超链接")]),i("li",[t._v("优化资产端口,去除编辑页面显示端口所有信息,修改成Drawer方式显示,并增加http和https链接打开,增加url超链接")]),i("li",[t._v("优化新建任务的数量前端样式,将input修改成number模式")]),i("li",[t._v("优化检测类型任务,将input修改成单选模式")]),i("li",[t._v("优化web信息中ip的显示,增加打开http和https链接的Popover")]),i("li",[t._v("首页四个折线图修改成显示最新数据的10%")]),i("li",[t._v("修改设置-通知设置中的风险等级编辑样式,从input改成单选模式")]),i("li",[t._v("修改cron表达式解析结果的样式,改成表格")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("公测版 V1.2.0 - 20200706")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 公开公测开启 ")])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("内测版 V1.1 - 20200615")])]),i("div",{staticClass:"text"},[i("ol",[i("li",[t._v("优化部署步骤,修改部署脚本成一键部署")]),i("li",[t._v("部署脚本增加系统源修改判断和docker镜像源修改判断(需要用户交互)")]),i("li",[t._v("部署脚本增加判断,提高安装部署成功率")]),i("li",[t._v("前端增加web信息功能,后端优化部分代码")]),i("li",[t._v("文档增加Q/A章节、微信公众号、项目的目录结构说明,为公测做准备")]),i("li",[t._v("增加公测宣传文档")]),i("li",[t._v("增加magicude执行脚本,便于查看系统状态及操作系统(0624)")])])])])]),i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[i("span",[i("b",[t._v("内测版 V1.0 - 20200528")])]),i("div",{staticClass:"text"},[i("ol",[t._v(" 公开内测开启 ")])])])])],1)],1)},e=[],s={data:function(){return{drawer:!1}},methods:{handleDrawer:function(){this.drawer=!0},handleDrawerClose:function(){this.drawer=!1},getYear:function(){var t=new Date;return this.year=t.getFullYear(),this.year}}},r=s,v=(i("10dd"),i("2877")),d=Object(v["a"])(r,a,e,!1,null,null,null);l["default"]=d.exports}}]); \ No newline at end of file diff --git a/deploy/MagiCude/operation/checkDockerImageStatus.sh b/deploy/MagiCude/operation/checkDockerImageStatus.sh index 303bcc8..8cc7cf8 100644 --- a/deploy/MagiCude/operation/checkDockerImageStatus.sh +++ b/deploy/MagiCude/operation/checkDockerImageStatus.sh @@ -9,7 +9,7 @@ dockerNameArrays=("nginxApp" "magicude_mysql" "magicude_redis" "magicude_rabbitm for imageName in ${dockerNameArrays[@]} ; do existFlag=`docker ps | grep $imageName |wc -L` if [ $existFlag -eq 0 ] ;then - logInfo "$imageName 未启动,正在启动 $imageName" + logWarn "$imageName 未启动,正在启动 $imageName" docker start $imageName >/dev/null 2>&1 logInfo "$imageName 完成启动" else logInfo "$imageName 已启动" diff --git a/deploy/MagiCude/operation/dockerStopService.sh b/deploy/MagiCude/operation/dockerStopService.sh index 963675f..15b53db 100644 --- a/deploy/MagiCude/operation/dockerStopService.sh +++ b/deploy/MagiCude/operation/dockerStopService.sh @@ -3,13 +3,13 @@ # https://github.com/er10yi source /root/MagiCude/util.sh -logInfo "停止docker容器" +logWarn "停止docker容器" # stop docker images dockerNameArrays=("nginxApp" "magicude_mysql" "magicude_redis" "magicude_rabbitmq") for imageName in ${dockerNameArrays[@]} ; do existFlag=`docker ps | grep $imageName |wc -L` if [ $existFlag -ne 0 ] ;then - logInfo "正在停止 $imageName" + logWarn "正在停止 $imageName" docker stop $imageName > /dev/null 2>&1 & wait fi diff --git a/deploy/MagiCude/operation/restartAll.sh b/deploy/MagiCude/operation/restartAll.sh index 31aa220..9508884 100644 --- a/deploy/MagiCude/operation/restartAll.sh +++ b/deploy/MagiCude/operation/restartAll.sh @@ -3,10 +3,10 @@ # https://github.com/er10yi source /root/MagiCude/util.sh -logInfo "$0 将执行以下操作" -logInfo "停止nmap和masscan" -logInfo "重启docker中的容器:magicude_mysql magicude_redis magicude_rabbitmq nginxApp" -logInfo "重启center所有服务:eurekaapp.jar centerapp.jar agentapp.jar" +logWarn "$0 将执行以下操作" +logWarn "停止nmap和masscan" +logWarn "重启docker中的容器:magicude_mysql magicude_redis magicude_rabbitmq nginxApp" +logWarn "重启center所有服务:eurekaapp.jar centerapp.jar agentapp.jar" echo -n "是否继续(10秒后默认N)? [y/N]: " read -t 10 checkYes if [[ $checkYes = "y" ]] ; then @@ -15,7 +15,7 @@ if [[ $checkYes = "y" ]] ; then for jarName in ${jarNameArrays[@]} ; do tempPid=`ps -ef|grep $jarName|grep -v grep|cut -c 9-15` if [ $tempPid ] ;then - logInfo "停止 $jarName" + logWarn "停止 $jarName" kill -9 $tempPid fi done @@ -23,16 +23,16 @@ if [[ $checkYes = "y" ]] ; then # kill nmap masscan existFlag=`ps -ef|grep nmap|grep -v grep|cut -c 9-15` if [ $existFlag ] ;then - logInfo "停止 nmap" + logWarn "停止 nmap" kill -9 $(pidof nmap) fi existFlag=`ps -ef|grep masscan|grep -v grep|cut -c 9-15` if [ $existFlag ] ;then - logInfo "停止 masscan" + logWarn "停止 masscan" kill -9 $(pidof masscan) fi logInfo "完成" - logInfo "docker重启容器" + logWarn "docker重启容器" docker restart magicude_mysql > /dev/null 2>&1 & docker restart magicude_redis > /dev/null 2>&1 & docker restart magicude_rabbitmq > /dev/null 2>&1 & diff --git a/deploy/MagiCude/operation/stopAll.sh b/deploy/MagiCude/operation/stopAll.sh index 742a704..572e8f4 100644 --- a/deploy/MagiCude/operation/stopAll.sh +++ b/deploy/MagiCude/operation/stopAll.sh @@ -3,40 +3,40 @@ # https://github.com/er10yi source /root/MagiCude/util.sh -logInfo "$0 将执行以下操作" -logInfo "停止nmap和masscan" -logInfo "停止docker中的容器:magicude_mysql magicude_redis magicude_rabbitmqnginxApp" -logInfo "停止center所有服务:eurekaapp.jar centerapp.jar agentapp.jar" -logInfo "如果部署了多个agent,请到agent服务器手动执行 stopAgent.sh" +logWarn "$0 将执行以下操作" +logWarn "停止nmap和masscan" +logWarn "停止docker中的容器:magicude_mysql magicude_redis magicude_rabbitmqnginxApp" +logWarn "停止center所有服务:eurekaapp.jar centerapp.jar agentapp.jar" +logWarn "如果部署了多个agent,请到agent服务器手动执行 stopAgent.sh" echo -n "是否继续(10秒后默认N)? [y/N]: " read -t 10 checkYes if [[ $checkYes = "y" ]] ; then - logInfo "停止 MagiCude 所有服务" + logWarn "停止 MagiCude 所有服务" # kill jar jarNameArrays=("eurekaapp" "centerapp" "agentapp") for jarName in ${jarNameArrays[@]} ; do tempPid=`ps -ef|grep $jarName|grep -v grep|cut -c 9-15` if [ $tempPid ] ;then - logInfo "停止 $jarName" + logWarn "停止 $jarName" kill -9 $tempPid fi done logInfo "完成" - logInfo "停止 nmap和masscan" + logWarn "停止 nmap和masscan" # kill nmap masscan existFlag=`ps -ef|grep nmap|grep -v grep|cut -c 9-15` if [ $existFlag ] ;then - logInfo "停止 nmap" + logWarn "停止 nmap" kill -9 $(pidof nmap) fi existFlag=`ps -ef|grep masscan|grep -v grep|cut -c 9-15` if [ $existFlag ] ;then - logInfo "停止 masscan" + logWarn "停止 masscan" kill -9 $(pidof masscan) fi logInfo "完成" - logInfo "docker停止容器" + logWarn "docker停止容器" docker stop magicude_mysql > /dev/null 2>&1 & docker stop magicude_redis > /dev/null 2>&1 & docker stop magicude_rabbitmq > /dev/null 2>&1 & diff --git a/deploy/MagiCude/operation/stopCenterService.sh b/deploy/MagiCude/operation/stopCenterService.sh index 7d0c3b3..198beca 100644 --- a/deploy/MagiCude/operation/stopCenterService.sh +++ b/deploy/MagiCude/operation/stopCenterService.sh @@ -3,12 +3,12 @@ # https://github.com/er10yi source /root/MagiCude/util.sh -logInfo "停止 MagiCude 服务" +logWarn "停止 MagiCude 服务" jarNameArrays=("eurekaapp" "centerapp" "agentapp") for jarName in ${jarNameArrays[@]} ; do tempPid=`ps -ef|grep $jarName|grep -v grep|cut -c 9-15` if [ $tempPid ] ;then - logInfo "停止 $jarName" + logWarn "停止 $jarName" kill -9 $tempPid fi done diff --git a/deploy/defaultConf/agent.yml b/deploy/defaultConf/agent.yml index f706f78..6413f5c 100644 --- a/deploy/defaultConf/agent.yml +++ b/deploy/defaultConf/agent.yml @@ -22,7 +22,7 @@ eureka: register-with-eureka: true fetch-registry: true service-url: - defaultZone: http://${eureka.user.name}:${eureka.user.password}@127.0.0.1:8686/eureka # 127.0.0.1需要改成部署eurekaapp.jar服务器的ip + defaultZone: http://${eureka.user.name}:${eureka.user.password}@127.0.0.1:8686/eureka # 需要改成部署eurekaapp.jar服务器的ip instance: prefer-ip-address: true nmap: diff --git a/deploy/defaultConf/initAgentEnvironmentAndStart.sh b/deploy/defaultConf/initAgentEnvironmentAndStart.sh index 375b12c..6c90ddd 100644 --- a/deploy/defaultConf/initAgentEnvironmentAndStart.sh +++ b/deploy/defaultConf/initAgentEnvironmentAndStart.sh @@ -5,7 +5,7 @@ source /root/MagiCude/util.sh echo -echo "魔方-MagiCude agent部署脚本 V2.5" +echo "魔方-MagiCude agent部署脚本 V2.6" echo "@author 贰拾壹" echo "https://github.com/er10yi" echo @@ -42,7 +42,7 @@ fi # 如果$openjdkDirName已解压,证明已经运行过部署脚本 if [ -d $openjdkDirName ]; then - logInfo "检测到已运行过部署脚本" + logWarn "检测到已运行过部署脚本" echo -n "是否继续(10秒后默认N)? [y/N]: " read -t 10 checkYes if [[ $checkYes != "y" ]] ; then @@ -67,10 +67,60 @@ if [ $existFlag ] ;then kill -9 $(pidof masscan) fi +function check_ip() { + local agentRealIp=$1 + VALID_CHECK=$( echo $agentRealIp| awk -F. '$1<=255&&$2<=255&&$3<=255&&$4<=255{print "yes"}' ) + if echo $agentRealIp| grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" > /dev/null ; then + if [[ $VALID_CHECK = "yes" ]]; then + logInfo "正在ping $agentRealIp" + check_ret=`ping ${agentRealIp} -c 2 | grep -q 'ttl=' && echo "yes" || echo "no"` + if [ $check_ret = "no" ];then + logErrorNotExit "$agentRealIp 无法ping通" + return 1 + else + logInfo "替换agent.yml中的127.0.0.1" + sed -i "s/127.0.0.1/$agentRealIp/g" agent.yml + return 0 + fi + else + logErrorNotExit "$agentRealIp 无效的IP" + return 1 + fi + else + logErrorNotExit "$agentRealIp 格式错误" + return 1 + fi +} + # 判断agent.yml内容是否已经修改 # agent分布式部署 if [ ! -f initCenterEnvironmentAndStart.sh ]; then + # 修改agent.yml logInfo "检测到agent分布式部署" + # 需要手动输入服务器的ip地址 + existFlag=`cat agent.yml | grep "name: agent1" |wc -L` + if [ $existFlag -ne 0 ] ;then + logInfo "修改agent.yml中的name: agent1" + logWarn "要求:不能是agent1, 需唯一且只能英文且不能包含空格" + echo -n "请输入agent的名字: " + read newName + logInfo "替换agent.yml中的name: agent1" + sed -i "s/name: agent1/name: $newName/g" agent.yml + fi + + logInfo "修改agent.yml中center相关的ip" + existFlag=`cat agent.yml | grep "127.0.0.1" |wc -L` + if [ $existFlag -ne 0 ] ;then + while true ; do + echo -n "请输入部署center的服务IP地址: " + read agentRealIp + check_ip "${agentRealIp}" + if [ $? -eq 0 ]; then + break + fi + done + fi + existFlag=`cat agent.yml | grep "name: agent1" |wc -L` if [ $existFlag -ne 0 ] ;then logError "agent.yml文件name节点 agent1 未修改,请修改成非 agent1 后重新运行 $0" @@ -97,12 +147,10 @@ if [ -f agent.yml ];then if [ $existFlag -ne 0 ] ;then infoMessage+=("agent.yml文件center节点dnsValidateIp未修改:请将dnsValidateIp修改成部署centerapp.jar服务器的ip") fi -else - logError "agent.yml不存在" fi logInfo "判断是否存在java 环境" -java -version >/dev/null 2>&1 +type java >/dev/null 2>&1 if [ $? -eq 0 ];then # 存在java环境 java_version=`java -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}'` @@ -132,8 +180,8 @@ yum -y install gcc make libpcap libpcap-dev clang git wget >/dev/null 2>&1 logInfo "验证依赖是否成功安装" dependArrays=("wget" "make" "gcc" "clang" "git") for dependName in ${dependArrays[@]} ; do - existFlag=`ls /usr/bin/ | grep $dependName |wc -L` - if [ $existFlag -eq 0 ] ;then + type $dependName >/dev/null 2>&1 + if [ $? -ne 0 ];then logError "$dependName未成功安装,请重新执行 $0" fi done @@ -144,7 +192,7 @@ pythonVerion=${pythonVersionArrays[0]} # i=1 # while ( [ $i -le ${#pythonVersionArrays[*]} ] ) # do -# echo "$i.Python ${pythonVersionArrays[i-1]}" +# echo "$i Python ${pythonVersionArrays[i-1]}" # let "i++" # done # echo -n "10秒后默认选第 1 项 : " @@ -178,7 +226,7 @@ if [ ! -f $pythonNameVerion$pythonTarName ]; then logError "$pythonNameVerion下载失败,重试第$i次失败,请重新执行 $0" fi fi -python3 --version >/dev/null 2>&1 +type python3 >/dev/null 2>&1 if [ $? -ne 0 ];then tar -xJf $pythonNameVerion$pythonTarName mkdir /usr/local/python3 >/dev/null 2>&1 @@ -191,9 +239,9 @@ if [ $? -ne 0 ];then cd .. rm -rf $pythonNameVerion >/dev/null 2>&1 fi -logInfo "判断 $pythonNameVerion 是否成功安装" -python3 --version >/dev/null 2>&1 -if [ $? != 0 ];then +logInfo "判断$pythonNameVerion是否成功安装" +type python3 >/dev/null 2>&1 +if [ $? -ne 0 ];then logError "$pythonNameVerion 未成功安装,请重新执行 $0" fi logInfo "替换agent.yml中的jep.absolutePath的python路径" @@ -248,13 +296,12 @@ pip3 install wheel -i https://pypi.douban.com/simple/ >/dev/null 2>&1 pip3 install jep -i https://pypi.douban.com/simple/ >/dev/null 2>&1 logInfo "安装nmap和masscan" -existFlag=`ls /usr/bin/ | grep nmap |wc -L` -if [ $existFlag -eq 0 ] ;then +type nmap >/dev/null 2>&1 +if [ $? -ne 0 ];then rpm -U $nmapUrl >/dev/null 2>&1 fi - -existFlag=`ls /usr/bin/ | grep masscan |wc -L` -if [ $existFlag -eq 0 ] ;then +type masscan >/dev/null 2>&1 +if [ $? -ne 0 ];then if [ ! -d masscan ]; then i=0 while ( [ $i -lt 5 ] ) @@ -279,8 +326,8 @@ fi logInfo "验证nmap masscan是否成功安装" dependArrays=("masscan" "nmap") for dependName in ${dependArrays[@]} ; do - existFlag=`ls /usr/bin/ | grep $dependName |wc -L` - if [ $existFlag -eq 0 ] ;then + type $dependName >/dev/null 2>&1 + if [ $? -ne 0 ];then logError "$dependName未成功安装,请重新执行 $0" fi done @@ -291,10 +338,10 @@ sh runAgent.sh if [ ${#infoMessage[*]} -ne 0 ];then echo - echo "以下信息不会影响魔方正常运行,但可能会导致agent部分功能不可用,请根据提示进行修改,并重启agent" - logInfo "info start" + logWarn "以下信息不会影响魔方正常运行,但可能会导致agent部分功能不可用,请根据提示进行修改,并重启agent" + logWarn "info start" for info in ${infoMessage[@]} ; do echo -e "$info" done - logInfo "info end" + logWarn "info end" fi \ No newline at end of file diff --git a/deploy/defaultConf/initCenterEnvironmentAndStart.sh b/deploy/defaultConf/initCenterEnvironmentAndStart.sh index 0bc3dd3..e4a0b36 100644 --- a/deploy/defaultConf/initCenterEnvironmentAndStart.sh +++ b/deploy/defaultConf/initCenterEnvironmentAndStart.sh @@ -5,7 +5,7 @@ source /root/MagiCude/util.sh echo -echo "魔方-MagiCude 一键部署脚本 V2.5" +echo "魔方-MagiCude 一键部署脚本 V2.6" echo "@author 贰拾壹" echo "https://github.com/er10yi" echo @@ -44,9 +44,9 @@ fi # 如果$openjdkDirName已解压,证明已经运行过部署脚本 if [ -d $openjdkDirName ]; then - logInfo "检测到已运行过部署脚本" - logInfo "继续运行脚本将重置数据库,当前数据会丢失" - logInfo "如已正常部署,请勿执行" + logWarn "检测到已运行过部署脚本" + logWarn "继续运行脚本将重置数据库,当前数据会丢失" + logWarn "如已正常部署,请勿执行" echo -n "是否继续(10秒后默认N)? [y/N]: " read -t 10 checkYes if [[ $checkYes != "y" ]] ; then @@ -74,8 +74,8 @@ if [ $existFlag ] ;then kill -9 $(pidof masscan) fi # stop and remove docker images -existFlag=`ls /usr/bin/ | grep docker |wc -L` -if [ $existFlag -ne 0 ] ;then +type docker >/dev/null 2>&1 +if [ $? -eq 0 ] ;then dockerNameArrays=("nginxApp" "magicude_mysql" "magicude_redis" "magicude_rabbitmq") systemctl restart docker for imageName in ${dockerNameArrays[@]} ; do @@ -88,6 +88,38 @@ if [ $existFlag -ne 0 ] ;then systemctl stop docker fi +# 修改前端api地址及agent.yml +errorMessage=() +existFlag=`cat dist/static/js/app.*.js | grep "http://127.0.0.1:9001" |wc -L` +if [ $existFlag -ne 0 ] ;then + tempIp=`ip a |grep -w inet|awk '{print $2}'|awk -F '/' '{print $1}'` + ipArray=(${tempIp// / }) + logInfo "服务器所有IP如下: " + i=1 + while ( [ $i -le ${#ipArray[*]} ] ) + do + echo "$i ${ipArray[i-1]}" + let "i++" + done + echo -n "请输入数字选择部署center的IP地址: " + read choice + if [ ! $choice ]; then + logErrorNotExit "未选择有效的IP地址" + logError "请重新执行 $0" + fi + if [[ $choice -gt ${#ipArray[*]} ]] || [[ $choice -lt 1 ]]; then + logErrorNotExit "未选择有效的IP地址" + logError "请重新执行 $0" + fi + let "choice--" + centerRealIp="${ipArray[choice]}" + logInfo "替换前端api地址" + sed -i "s/127.0.0.1/$centerRealIp/g" dist/static/js/app.*.js + logInfo "替换agent.yml中的地址" + sed -i "s/httpValidateApi: http:\/\/127.0.0.1/httpValidateApi: http:\/\/$centerRealIp/g" agent.yml + sed -i "s/dnsValidateIp: 127.0.0.1/dnsValidateIp: $centerRealIp/g" agent.yml +fi + # 判断前端api地址是否修改 errorMessage=() existFlag=`cat dist/static/js/app.*.js | grep "http://127.0.0.1:9001" |wc -L` @@ -110,7 +142,7 @@ else fi logInfo "判断是否存在java环境" -java -version >/dev/null 2>&1 +type java >/dev/null 2>&1 if [ $? -eq 0 ];then # 存在java环境 java_version=`java -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}'` @@ -141,8 +173,8 @@ yum -y install wget fontconfig stix-fonts ntpdate docker gcc make libpcap libpca logInfo "验证依赖是否成功安装" dependArrays=("wget" "docker" "make" "gcc" "clang" "git") for dependName in ${dependArrays[@]} ; do - existFlag=`ls /usr/bin/ | grep $dependName |wc -L` - if [ $existFlag -eq 0 ] ;then + type $dependName >/dev/null 2>&1 + if [ $? -ne 0 ];then logError "$dependName 未成功安装,请重新执行 $0" fi done @@ -153,7 +185,7 @@ pythonVerion=${pythonVersionArrays[0]} # i=1 # while ( [ $i -le ${#pythonVersionArrays[*]} ] ) # do -# echo "$i.Python ${pythonVersionArrays[i-1]}" +# echo "$i Python ${pythonVersionArrays[i-1]}" # let "i++" # done # echo -n "10秒后默认选第 1 项 : " @@ -188,7 +220,7 @@ if [ ! -f $pythonNameVerion$pythonTarName ]; then logError "$pythonNameVerion下载失败,重试第$i次失败,请重新执行 $0" fi fi -python3 --version >/dev/null 2>&1 +type python3 >/dev/null 2>&1 if [ $? -ne 0 ];then tar -xJf $pythonNameVerion$pythonTarName mkdir /usr/local/python3 >/dev/null 2>&1 @@ -201,8 +233,8 @@ if [ $? -ne 0 ];then cd .. rm -rf $pythonNameVerion fi -logInfo "判断 $pythonNameVerion 是否成功安装" -python3 --version >/dev/null 2>&1 +logInfo "判断$pythonNameVerion是否成功安装" +type python3 >/dev/null 2>&1 if [ $? -ne 0 ];then logError "$pythonNameVerion 未成功安装,请重新执行 $0" fi @@ -263,12 +295,12 @@ pip3 install wheel -i https://pypi.douban.com/simple/ >/dev/null 2>&1 pip3 install jep -i https://pypi.douban.com/simple/ >/dev/null 2>&1 logInfo "安装nmap和masscan" -existFlag=`ls /usr/bin/ | grep nmap |wc -L` -if [ $existFlag -eq 0 ] ;then +type nmap >/dev/null 2>&1 +if [ $? -ne 0 ];then rpm -U $nmapUrl >/dev/null 2>&1 fi -existFlag=`ls /usr/bin/ | grep masscan |wc -L` -if [ $existFlag -eq 0 ] ;then +type masscan >/dev/null 2>&1 +if [ $? -ne 0 ];then if [ ! -d masscan ]; then i=0 while ( [ $i -lt 5 ] ) @@ -290,12 +322,12 @@ if [ $existFlag -eq 0 ] ;then rm -rf masscan >/dev/null 2>&1 fi -logInfo "验证docker nmap masscan是否成功安装" -dependArrays=("docker" "masscan" "nmap") +logInfo "验证nmap masscan是否成功安装" +dependArrays=("masscan" "nmap") for dependName in ${dependArrays[@]} ; do - existFlag=`ls /usr/bin/ | grep $dependName |wc -L` - if [ $existFlag -eq 0 ] ;then - logError "$dependName 未成功安装,请重新执行 $0" + type $dependName >/dev/null 2>&1 + if [ $? -ne 0 ];then + logError "$dependName未成功安装,请重新执行 $0" fi done @@ -340,7 +372,7 @@ do if [ $imageName = "rabbitmq" ]; then imageName="rabbitmq:management" fi - logInfo "$imageName 不存在,正在重新pull $imageName" + logWarn "$imageName 不存在,正在重新pull $imageName" docker pull $imageName >/dev/null 2>&1 & wait if [ $imageName = "rabbitmq" ]; then @@ -377,7 +409,7 @@ logInfo "确保容器服务已成功运行" i=1 while ( [ -z "`docker exec -it magicude_mysql /bin/bash -c "mysql -uroot -p8TAQRc9EOkV607qm -e'show databases'" | grep "information_schema"`" ] && [ $i -lt 6 ] ) do - logInfo "magicude_mysql未启动,第$i次重启" + logWarn "magicude_mysql未启动,第$i次重启" docker start magicude_mysql >/dev/null 2>&1 let "i++" sleep 10s @@ -394,7 +426,7 @@ for imageName in ${dockerNameArrays[@]} ; do i=1 while ( [ -z "`docker exec -it $imageName /bin/bash -c "ls /" | grep "root"`" ] && [ $i -lt 6 ] ) do - logInfo "$imageName未启动,第$i次重启" + logWarn "$imageName未启动,第$i次重启" docker start $imageName >/dev/null 2>&1 let "i++" sleep 10s @@ -417,19 +449,19 @@ sh initDataAndStart.sh if [ ${#infoMessage[*]} -ne 0 ];then echo - echo "以下信息不会影响魔方正常运行,但可能会导致部分功能不可用,请根据提示进行修改,并重启魔方" - logInfo "info start" + logWarn "以下信息不会影响魔方正常运行,但可能会导致部分功能不可用,请根据提示进行修改,并重启魔方" + logWarn "info start" for info in ${infoMessage[@]} ; do echo -e "$info" done - logInfo "info end" + logWarn "info end" fi if [ ${#errorMessage[*]} -ne 0 ];then echo - echo "以下错误会影响魔方正常运行,导致魔方不可用,请根据提示进行修改,并重启魔方" - logInfo "error start" + logErrorNotExit "以下错误会影响魔方正常运行,导致魔方不可用,请根据提示进行修改,并重启魔方" + logErrorNotExit "error start" for error in ${errorMessage[@]} ; do echo -e "$error" done - logInfo "error end" + logErrorNotExit "error end" fi diff --git a/deploy/defaultConf/magicude b/deploy/defaultConf/magicude index 360f1e9..fa1d01f 100644 --- a/deploy/defaultConf/magicude +++ b/deploy/defaultConf/magicude @@ -36,7 +36,7 @@ dockerStatusAndStart() for imageName in ${dockerNameArrays[@]} ; do existFlag=`docker ps | grep $imageName |wc -L` if [ $existFlag -eq 0 ] ;then - logInfo "$imageName 未启动, 正在启动 $imageName" + logWarn "$imageName 未启动, 正在启动 $imageName" docker start $imageName >/dev/null 2>&1 logInfo "$imageName 启动完成" else logInfo "$imageName 已启动" @@ -52,7 +52,7 @@ statusAndStart() for jarName in ${jarNameArrays[@]} ; do existFlag=`ps -ef|grep $jarName|grep -v grep|wc -L` if [ $existFlag -eq 0 ] ;then - logInfo "$jarName 未启动,正在启动 $jarName" + logWarn "$jarName 未启动,正在启动 $jarName" temp=$jarName nohup java -jar "$jarName.jar" --spring.config.location="${temp/app/}".yml > /dev/null 2>&1 & logInfo "$jarName 启动完成" @@ -79,7 +79,7 @@ start() stop() { - logInfo "停止 MagiCude 所有服务" + logWarn "停止 MagiCude 所有服务" jarNameArrays=("eurekaapp" "centerapp" "agentapp") for jarName in ${jarNameArrays[@]} ; do tempPid=`ps -ef|grep $jarName|grep -v grep|cut -c 9-15` @@ -88,7 +88,7 @@ stop() fi done logInfo "完成" - logInfo "停止 nmap和masscan" + logWarn "停止 nmap和masscan" existFlag=`ps -ef|grep nmap|grep -v grep|cut -c 9-15` if [ $existFlag ] ;then kill -9 $(pidof nmap) @@ -98,7 +98,7 @@ stop() kill -9 $(pidof masscan) fi logInfo "完成" - logInfo "停止 docker 容器" + logWarn "停止 docker 容器" dockerNameArrays=("nginxApp" "magicude_mysql" "magicude_redis" "magicude_rabbitmq") for imageName in ${dockerNameArrays[@]} ; do existFlag=`docker ps | grep $imageName |wc -L` diff --git a/deploy/defaultConf/magicude.sql b/deploy/defaultConf/magicude.sql index ef56068..e08143d 100644 --- a/deploy/defaultConf/magicude.sql +++ b/deploy/defaultConf/magicude.sql @@ -976,9 +976,6 @@ CREATE TABLE `tb_taskip` ( -- ---------------------------- -- Records of tb_taskip -- ---------------------------- -INSERT INTO `tb_taskip` VALUES ('1314483884750147584', '1304326543249641472', '127.0.0.1', NULL, 0); -INSERT INTO `tb_taskip` VALUES ('1314485012380389376', '1304327021228331008', '127.0.0.1', NULL, 0); -INSERT INTO `tb_taskip` VALUES ('1314485455953203200', '1314485452954275840', '127.0.0.1', NULL, 0); -- ---------------------------- -- Table structure for tb_taskpluginconfig @@ -1016,56 +1013,6 @@ CREATE TABLE `tb_taskport` ( -- ---------------------------- -- Records of tb_taskport -- ---------------------------- -INSERT INTO `tb_taskport` VALUES ('1314483885274435584', '1314483884750147584', '3306', 'tcp', 'open', 'mysql', 'MySQL 8.0.21', 0); -INSERT INTO `tb_taskport` VALUES ('1314483909760782336', '1314483884750147584', '22', 'tcp', 'open', 'ssh', 'OpenSSH 7.4 (protocol 2.0)', 0); -INSERT INTO `tb_taskport` VALUES ('1314483909790142464', '1314483884750147584', '25', 'tcp', 'open', 'smtp', 'Postfix smtpd', 0); -INSERT INTO `tb_taskport` VALUES ('1314483909827891200', '1314483884750147584', '80', 'tcp', 'open', 'http', 'nginx 1.19.3', 0); -INSERT INTO `tb_taskport` VALUES ('1314483911727910912', '1314483884750147584', '4369', 'tcp', 'open', 'epmd', 'Erlang Port Mapper Daemon', 0); -INSERT INTO `tb_taskport` VALUES ('1314483928450600960', '1314483884750147584', '5672', 'tcp', 'open', 'amqp', 'RabbitMQ 3.8.9 (0-9)', 0); -INSERT INTO `tb_taskport` VALUES ('1314483928479961088', '1314483884750147584', '5671', 'tcp', 'open', 'tcpwrapped', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314483953985523712', '1314483884750147584', '6379', 'tcp', 'open', 'redis', 'Redis key-value store', 0); -INSERT INTO `tb_taskport` VALUES ('1314483960394420224', '1314483884750147584', '8686', 'tcp', 'open', 'sun-as-jmxrmi?', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314483960914513920', '1314483884750147584', '9001', 'tcp', 'open', 'tor-orport?', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314483961065508864', '1314483884750147584', '9991', 'tcp', 'open', 'issa?', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314483979763716096', '1314483884750147584', '15672', 'tcp', 'open', 'http', 'Cowboy httpd', 0); -INSERT INTO `tb_taskport` VALUES ('1314483979839213568', '1314483884750147584', '15671', 'tcp', 'open', 'tcpwrapped', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314485012434915328', '1314485012380389376', '913', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012451692544', '1314485012380389376', '903', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012468469760', '1314485012380389376', '49667', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012522995712', '1314485012380389376', '808', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012548161536', '1314485012380389376', '10001', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012569133056', '1314485012380389376', '445', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012590104576', '1314485012380389376', '443', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012615270400', '1314485012380389376', '49669', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012632047616', '1314485012380389376', '49665', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012648824832', '1314485012380389376', '49670', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012669796352', '1314485012380389376', '4000', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012682379264', '1314485012380389376', '135', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012703350784', '1314485012380389376', '5040', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012724322304', '1314485012380389376', '49664', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012745293824', '1314485012380389376', '7680', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012774653952', '1314485012380389376', '28317', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012795625472', '1314485012380389376', '2968', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012816596992', '1314485012380389376', '10000', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012833374208', '1314485012380389376', '49666', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012850151424', '1314485012380389376', '54530', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012866928640', '1314485012380389376', '49668', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012883705856', '1314485012380389376', '1362', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485012900483072', '1314485012380389376', '8307', 'tcp', 'open', NULL, NULL, 0); -INSERT INTO `tb_taskport` VALUES ('1314485456074838016', '1314485455953203200', '3306', 'tcp', 'open', 'mysql', 'MySQL 8.0.21', 0); -INSERT INTO `tb_taskport` VALUES ('1314485480770899968', '1314485455953203200', '22', 'tcp', 'open', 'ssh', 'OpenSSH 7.4 (protocol 2.0)', 0); -INSERT INTO `tb_taskport` VALUES ('1314485480796065792', '1314485455953203200', '25', 'tcp', 'open', 'smtp', 'Postfix smtpd', 0); -INSERT INTO `tb_taskport` VALUES ('1314485480821231616', '1314485455953203200', '80', 'tcp', 'open', 'http', 'nginx 1.19.3', 0); -INSERT INTO `tb_taskport` VALUES ('1314485482398289920', '1314485455953203200', '4369', 'tcp', 'open', 'epmd', 'Erlang Port Mapper Daemon', 0); -INSERT INTO `tb_taskport` VALUES ('1314485499087425536', '1314485455953203200', '5672', 'tcp', 'open', 'amqp', 'RabbitMQ 3.8.9 (0-9)', 0); -INSERT INTO `tb_taskport` VALUES ('1314485499112591360', '1314485455953203200', '5671', 'tcp', 'open', 'tcpwrapped', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314485525029195776', '1314485455953203200', '6379', 'tcp', 'open', 'redis', 'Redis key-value store', 0); -INSERT INTO `tb_taskport` VALUES ('1314485530448236544', '1314485455953203200', '8686', 'tcp', 'open', 'sun-as-jmxrmi?', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314485530842501120', '1314485455953203200', '9001', 'tcp', 'open', 'tor-orport?', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314485530892832768', '1314485455953203200', '9991', 'tcp', 'open', 'issa?', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314485549981110272', '1314485455953203200', '15672', 'tcp', 'open', 'http', 'Cowboy httpd', 0); -INSERT INTO `tb_taskport` VALUES ('1314485550006276096', '1314485455953203200', '15671', 'tcp', 'open', 'tcpwrapped', 'null', 0); -INSERT INTO `tb_taskport` VALUES ('1314486096687665152', '1314485455953203200', '25672', 'tcp', 'open', 'unknown', 'null', 0); -- ---------------------------- -- Table structure for tb_titlewhitelist diff --git a/deploy/defaultConf/stopAgent.sh b/deploy/defaultConf/stopAgent.sh index 9552c8d..c85659e 100644 --- a/deploy/defaultConf/stopAgent.sh +++ b/deploy/defaultConf/stopAgent.sh @@ -4,7 +4,7 @@ # https://github.com/er10yi source /root/MagiCude/util.sh -logInfo "停止agentapp.jar" +logWarn "停止agentapp.jar" # kill agentapp tempPid=`ps -ef|grep agentapp|grep -v grep|cut -c 9-15` if [ $tempPid ] ;then diff --git a/deploy/defaultConf/uninstall.sh b/deploy/defaultConf/uninstall.sh new file mode 100644 index 0000000..759a938 --- /dev/null +++ b/deploy/defaultConf/uninstall.sh @@ -0,0 +1,105 @@ +#!/bin/bash +# 魔方-MagiCude卸载脚本 +# @author 贰拾壹 +# https://github.com/er10yi +source /root/MagiCude/util.sh + +logInfo "$0将执行以下操作" +logWarn "1.停止魔方-MagiCude所有服务" +logWarn "2.停止nmap和masscan" +logWarn "3.停止并删除docker容器" +logWarn "4.还原系统源" +logWarn "5.移除依赖" +logWarn "6.移除nmap和masscan" +logWarn "7.移除Python3" +logWarn "8.恢复环境变量" +logWarn "9.删除/root/MagiCude" +logErrorNotExit "如果部署了多个agent,请到agent服务器手动执行 $0" +logErrorNotExit "魔方-MagiCude所有数据将丢失" +echo -n "是否继续(10秒后默认N)? [y/N]: " +read -t 10 checkYes +if [[ $checkYes != "y" ]] ; then + echo + logInfo "退出卸载" + exit 1 +fi + +logWarn "停止MagiCude所有服务" +jarNameArrays=("eurekaapp" "centerapp" "agentapp") +for jarName in ${jarNameArrays[@]} ; do + tempPid=`ps -ef|grep $jarName|grep -v grep|cut -c 9-15` + if [ $tempPid ] ;then + kill -9 $tempPid + fi +done +logWarn "停止nmap和masscan" +existFlag=`ps -ef|grep nmap|grep -v grep|cut -c 9-15` +if [ $existFlag ] ;then + kill -9 $(pidof nmap) +fi +existFlag=`ps -ef|grep masscan|grep -v grep|cut -c 9-15` +if [ $existFlag ] ;then + kill -9 $(pidof masscan) +fi +logWarn "停止并删除docker容器" +type docker >/dev/null 2>&1 +if [ $? -eq 0 ] ;then + dockerNameArrays=("nginxApp" "magicude_mysql" "magicude_redis" "magicude_rabbitmq") + systemctl restart docker + for imageName in ${dockerNameArrays[@]} ; do + existFlag=`docker ps -a | grep $imageName |wc -L` + if [ $existFlag -ne 0 ] ;then + docker stop $imageName >/dev/null 2>&1 + docker rm $imageName >/dev/null 2>&1 + fi + done + systemctl stop docker +fi + +# 还原系统源 +existFlag=`cat /etc/yum.repos.d/CentOS-Base.repo | grep ustc |wc -L` +if [ $existFlag -ne 0 ] ;then + logWarn "还原系统源" + # rm -rf /etc/yum.repos.d/CentOS-Base.repo + mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup.uninstall + mv /etc/yum.repos.d/CentOS-Base.repo.backup /etc/yum.repos.d/CentOS-Base.repo + yum clean all >/dev/null 2>&1 + yum makecache >/dev/null 2>&1 +fi + +logWarn "移除依赖" +yum -y remove wget fontconfig stix-fonts ntpdate gcc make libpcap libpcap-dev clang git >/dev/null 2>&1 +yum -y remove zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel zlib1g-dev zlib* >/dev/null 2>&1 +# docker +yum -y remove docker* >/dev/null 2>&1 +rm -rf /etc/docker >/dev/null 2>&1 +rm -rf /run/docker >/dev/null 2>&1 +rm -rf /var/lib/dockershim >/dev/null 2>&1 +rm -rf /var/lib/docker >/dev/null 2>&1 + +logWarn "移除nmap和masscan" +yum -y remove nmap >/dev/null 2>&1 +rm -rf /usr/bin/masscan >/dev/null 2>&1 + +logWarn "移除Python3" +rm -rf /usr/local/python3 >/dev/null 2>&1 +rm -rf /usr/local/bin/python3 >/dev/null 2>&1 +rm -rf /usr/local/bin/pip3 >/dev/null 2>&1 + +logWarn "恢复环境变量" +sed -i "/export JAVA_HOME=\/root\/MagiCude\/$openjdkDirName/d" /root/.bash_profile +sed -i "/export JRE_HOME=\$JAVA_HOME\/jre/d" /root/.bash_profile +sed -i "/export CLASSPATH=\$JAVA_HOME\/lib:\$JRE_HOME\/lib:\$CLASSPATH/d" /root/.bash_profile +sed -i "/export PATH=\$JAVA_HOME\/bin:\$JRE_HOME\/bin:\$PATH/d" /root/.bash_profile +sed -i "/export LD_LIBRARY_PATH=\/usr\/local\/python3\/lib/d" /root/.bash_profile +source /root/.bash_profile + +echo -n "是否删除/root/MagiCude(10秒后默认N)? [y/N]: " +read -t 10 checkYes +if [[ $checkYes == "y" ]] ; then + rm -rf /root/MagiCude +else + echo + logInfo "/root/MagiCude未删除,可重新登录远程连接后再次部署" + logInfo "如不再使用,可手动删除" +fi \ No newline at end of file diff --git a/deploy/defaultConf/util.sh b/deploy/defaultConf/util.sh index 589ba27..947ad77 100644 --- a/deploy/defaultConf/util.sh +++ b/deploy/defaultConf/util.sh @@ -19,11 +19,15 @@ function logInfo(){ echo -e "*****info*****\t $1" } +function logWarn(){ + echo -e "\033[33m*****warn*****\t $1\033[0m" +} + function logError(){ - echo -e "!!!!!error!!!!!\t $1" + echo -e "\033[31m!!!!!error!!!!!\t $1\033[0m" exit 1 } function logErrorNotExit(){ - echo -e "!!!!!error!!!!!\t $1" + echo -e "\033[31m!!!!!error!!!!!\t $1\033[0m" } \ No newline at end of file diff --git "a/\344\275\277\347\224\250\350\257\264\346\230\216.md" "b/\344\275\277\347\224\250\350\257\264\346\230\216.md" index 97e5505..2a9b219 100755 --- "a/\344\275\277\347\224\250\350\257\264\346\230\216.md" +++ "b/\344\275\277\347\224\250\350\257\264\346\230\216.md" @@ -83,6 +83,8 @@ deploy │ magicude.sql # 用于初始化数据库,下同 │ runAgent.sh # 用于启动agent,下同 │ stopAgent.sh # 用于停止agent,下同 +│ util.sh # 包含环境变量,Python版本,java版本,日志打印 +│ uninstall.sh # 卸载脚本 │ └─MagiCude # 部署需要的目录,包含初始化后的启动脚本和数据库文件,未说明的如上 │ agent.yml ****执行GenPass.jar后生成**** @@ -99,6 +101,8 @@ deploy │ runAgent.sh ****执行GenPass.jar后生成**** │ stopAgent.sh ****执行GenPass.jar后生成**** │ magicude ****执行GenPass.jar后生成**** + │ util.sh ****执行GenPass.jar后生成**** + │ uninstall.sh ****执行GenPass.jar后生成**** ├─agent # agentapp.jar 启动后才会产生 │ └─logs # agent的日志文件,如果启动失败,可查看error的日志 ├─center # centerapp.jar 启动后才会产生 @@ -107,10 +111,6 @@ deploy │ ├─asset # 资产报告,系统启动后,发送资产报告之后才会产生 │ └─vuln # 漏洞报告,系统启动后,发送漏洞报告之后才会产生 │ - ├─agentDependency # agent依赖文件 - │ libpcap-devel-1.5.3-12.el7.x86_64.rpm # lipcap - │ nmap-7.80-1.x86_64.rpm # nmap,可自己去下最新的,名字也要修改一样 - │ ├─db # 初始化后的数据文件 │ magicude.sql ****执行GenPass.jar后生成**** │ @@ -132,59 +132,17 @@ deploy stopCenterService.sh # 停止center所有服务:eurekaapp.jar centerapp.jar agentapp.jar ``` -### ```MagiCude```目录下 配置文件修改 - -#### agent.yml - -**agent与center部署在同一台服务器**(示例见README.md) - -agent.yml需要修改center节点中的ip,然后跳到**前端api接口地址** - -**agent与center部署在不同服务器(多agent部署)** - -需要手动修改agent.yml文件,修改内容如下,且每个agent.jar对应一个agent.yml配置文件 - -1. task name 需要唯一 -2. rabbitmq host 需要修改成部署centerapp.jar服务器的ip -3. redis host 需要修改成部署centerapp.jar服务器的ip -4. defaultZone中的ip要修改成部署center服务器ip(运行eurekaapp.jar服务器的ip) -5. center中的ip需要修改成部署centerapp.jar服务器的ip - -```yml -# 只列出需要修改的配置,其他配置忽略 -task: - name: agent1 # 多agent部署时task name需要唯一 -spring: - rabbitmq: - host: 127.0.0.1 # 需要修改成部署centerapp.jar服务器的ip - redis: - host: 127.0.0.1 # 需要修改成部署centerapp.jar服务器的ip - -eureka: - client: - service-url: - defaultZone: http://${eureka.user.name}:${eureka.user.password}@127.0.0.1:8686/eureka # 127.0.0.1需要改成部署eurekaapp.jar服务器的ip - -center: - httpValidateApi: http://127.0.0.1:9001/center/pluginchecker # 需要修改成部署centerapp.jar服务器的ip - dnsValidateIp: 127.0.0.1 # 需要修改成部署centerapp.jar服务器的ip -``` - -#### 前端api接口地址 +### center与agent部署 -需要修改```MagiCude\dist\static\js\app.*.js```,* 指的是类似ea5c35e2这样一串字符 +### 生成配置文件 -将```baseURL:"http://127.0.0.1:9001/"```中的ip改成实际部署centerapp.jar的ip,如```baseURL:"http://192.168.12.128:9001/"``` - -### 环境搭建 - -假设服务器已装好,服务器ip地址为```192.168.12.128``` +下载部署包(Releases页面)解压后,deploy目录下双击```GenPass.bat```(Windows下,*uinx/mac直接执行```GenPass.bat```里面的内容就行了),将在当前目录生成newPass.txt,新的配置文件和初始化脚本会自动复制到MagiCude目录下 #### center 1. 将```MagiCude```上传到服务器root目录下 -2. 终端执行```sh initCenterEnvironmentAndStart.sh```,初始化环境和数据并启动系统 +2. 终端执行```sh initCenterEnvironmentAndStart.sh```,初始化环境和数据并启动系统,按提示选择center的ip即可 运行后会在当前目录生成一个center文件夹,里面是center的日志 @@ -215,15 +173,16 @@ systemctl restart docker 1. agent服务器的root目录下新建```MagiCude```目录,将以下文件上传到```MagiCude```目录 ```shell -修改后的agent.yml +agent.yml agentapp.jar initAgentEnvironmentAndStart.sh runAgent.sh stopAgent.sh +uninstall.sh util.sh ``` -2. 然后执行初始化agent环境并启动agent +2. 然后执行初始化agent环境并启动agent,按提示输入center的ip即可 ```shell sh initAgentEnvironmentAndStart.sh @@ -1075,6 +1034,7 @@ mac地址、OS类型、OS版本、类型字段暂时没有使用 **注意:OracleWeakPass插件会导致oracle账户锁定...建议不要在生产环境使用** * python3 selfd自定义插件 + | 插件 | 漏洞名称 | | :-----------------: | :----------------------------: | | FTPWeakPass | FTP弱密码/未授权访问 | @@ -1087,6 +1047,7 @@ mac地址、OS类型、OS版本、类型字段暂时没有使用 | ZookeeperEnvi | Zookeeper未授权访问 | * json selfd自定义插件(插件名需以HTTP开头) + | 插件 | 漏洞名称 | | :---------------------: | :------: | | HTTPElasticsearchUnauth | 默认 | diff --git "a/\344\275\277\347\224\250\350\257\264\346\230\216\345\233\2761/\351\200\211\346\213\251ip.png" "b/\344\275\277\347\224\250\350\257\264\346\230\216\345\233\2761/\351\200\211\346\213\251ip.png" new file mode 100644 index 0000000..ff70081 Binary files /dev/null and "b/\344\275\277\347\224\250\350\257\264\346\230\216\345\233\2761/\351\200\211\346\213\251ip.png" differ