@@ -34,6 +34,7 @@ import (
34
34
"github.com/bishopfox/sliver/protobuf/clientpb"
35
35
"github.com/bishopfox/sliver/server/certs"
36
36
"github.com/bishopfox/sliver/server/core"
37
+ "github.com/bishopfox/sliver/server/db"
37
38
"github.com/bishopfox/sliver/server/log"
38
39
"golang.zx2c4.com/wireguard/device"
39
40
)
@@ -86,6 +87,16 @@ func StartWGListenerJob(wgListener *clientpb.WGListenerReq) (*core.Job, error) {
86
87
JobCtrl : make (chan bool ),
87
88
}
88
89
90
+ listenerJob := & clientpb.ListenerJob {
91
+ JobID : uint32 (job .ID ),
92
+ Type : constants .WGStr ,
93
+ WGConf : wgListener ,
94
+ }
95
+ err = db .SaveC2Listener (listenerJob )
96
+ if err != nil {
97
+ return nil , err
98
+ }
99
+
89
100
ticker := time .NewTicker (5 * time .Second )
90
101
done := make (chan bool )
91
102
@@ -229,7 +240,7 @@ func StartHTTPListenerJob(req *clientpb.HTTPListenerReq) (*core.Job, error) {
229
240
}
230
241
231
242
// StartTCPStagerListenerJob - Start a TCP staging payload listener
232
- func StartTCPStagerListenerJob (host string , port uint16 , profileName string , shellcode []byte ) (* core.Job , error ) {
243
+ func StartTCPStagerListenerJob (host string , port uint16 , name string , shellcode []byte ) (* core.Job , error ) {
233
244
ln , err := StartTCPListener (host , port , shellcode )
234
245
if err != nil {
235
246
return nil , err // If we fail to bind don't setup the Job
@@ -241,8 +252,8 @@ func StartTCPStagerListenerJob(host string, port uint16, profileName string, she
241
252
Description : "Raw TCP listener (stager only)" ,
242
253
Protocol : "tcp" ,
243
254
Port : port ,
244
- ProfileName : profileName ,
245
255
JobCtrl : make (chan bool ),
256
+ ProfileName : name ,
246
257
}
247
258
248
259
go func () {
0 commit comments