Skip to content

Commit

Permalink
Log dns init length
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Aug 7, 2023
1 parent 0050bf8 commit ad2be94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions implant/sliver/transports/dnsclient/dnsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@ func (s *SliverDNSClient) SessionInit() error {
if err != nil {
return err
}
// {{if .Config.Debug}}
log.Printf("[dns] dns session id %d", s.dnsSessionID)
// {{end}}

// {{if .Config.Debug}}
log.Printf("[dns] fingerprinting resolvers ...")
// {{end}}
s.fingerprintResolvers() // Fingerprint the resolvers
if len(s.resolvers) < 1 {
// {{if .Config.Debug}}
Expand Down
2 changes: 2 additions & 0 deletions server/c2/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ func (s *SliverDNSServer) handleDNSSessionInit(domain string, msg *dnspb.DNSMess
return s.refusedErrorResp(req)
}

dnsLog.Infof("[session init] init data sent: %d bytes", len(msg.Data))

serverKeyPair := cryptography.ECCServerKeyPair()
sessionInit, err := cryptography.AgeKeyExFromImplant(
serverKeyPair.Private,
Expand Down

0 comments on commit ad2be94

Please sign in to comment.