0x01 原因
因为哥斯拉默认版本触发流量设备告警的几率较高,所以大部分场景都是使用二开过的哥斯拉及shell进行管理webshell,不过在一些java内存马注入的漏洞上面使用jmg生成内存马时还是会需要先使用默认版本哥斯拉shell再注入二开版本的哥斯拉shell,增加告警风险,所以得把自己的shell加到jmg里直接生成。
0x02 添加JMG生成shell选项
1.jmg-gui模块
添加Filter_Image按钮



添加结果输出

2.jmg-core模块
添加Shell类型,起名SHELL_FILTER_IMAGE

添加生成逻辑

添加生成逻辑

3.jmg-godzilla
添加指向shell类的代码

新建个内存马类,类名和前面加的对应上,转换你用来bypass流量设备的jsp代码为Filter类型的java代码,我这里肯定是哥斯拉类型的shell咯,加密方法和解密方法照搬,其他也都是照搬过来,需要注意的是我这里当属性为null时,setAttribute属性的代码用原本的即可

0x03 添加完成
最终效果,帮助你内存马场景下防止使用普通哥斯拉shell触发流量检测设备的告警
