Skip to content

Commit fe2e04c

Browse files
committed
Updating log messages.
1 parent 44fadc6 commit fe2e04c

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

bloodhound/caenrollment.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func (p *CAEnrollmentProcessor) getNtlmEndpoint(
291291
// No NTLM challenge offered
292292
endpoint.Status = builder.CAScanNotVulnerableNoNtlmChallenge
293293
if p.log != nil {
294-
p.log <- fmt.Sprintf("ℹ️ No NTLM challenge at: %s", urlStr)
294+
p.log <- fmt.Sprintf("🫠 [yellow]No NTLM challenge at:[-] %s", urlStr)
295295
}
296296
} else if useBadChannelBinding != nil && *useBadChannelBinding && parsedURL.Scheme == "https" {
297297
// 401 with bad channel bindings on HTTPS means channel binding is required (not vulnerable)
@@ -300,13 +300,13 @@ func (p *CAEnrollmentProcessor) getNtlmEndpoint(
300300
// A proper implementation would require more sophisticated channel binding testing.
301301
endpoint.Status = builder.CAScanNotVulnerableNtlmChannelBindingRequired
302302
if p.log != nil {
303-
p.log <- fmt.Sprintf("ℹ️ Channel binding required at: %s", urlStr)
303+
p.log <- fmt.Sprintf("ℹ🫠 [yellow]Channel binding required at:[-] %s", urlStr)
304304
}
305305
} else {
306306
// Authentication failed but NTLM was offered
307307
endpoint.Status = builder.CAScanError
308308
if p.log != nil {
309-
p.log <- fmt.Sprintf("[yellow]NTLM authentication failed at:[-] %s", urlStr)
309+
p.log <- fmt.Sprintf("🫠 [yellow]NTLM authentication failed at:[-] %s", urlStr)
310310
}
311311
}
312312
return builder.CAEnrollmentEndpointAPIResult{
@@ -320,7 +320,7 @@ func (p *CAEnrollmentProcessor) getNtlmEndpoint(
320320
// Path is forbidden (e.g., SSL required for HTTP endpoint)
321321
endpoint.Status = builder.CAScanNotVulnerablePathForbidden
322322
if p.log != nil {
323-
p.log <- fmt.Sprintf("ℹ️ Path forbidden: %s", urlStr)
323+
p.log <- fmt.Sprintf("🫠 [yellow]Path forbidden:[-] %s", urlStr)
324324
}
325325
return builder.CAEnrollmentEndpointAPIResult{
326326
APIResult: builder.APIResult{
@@ -333,7 +333,7 @@ func (p *CAEnrollmentProcessor) getNtlmEndpoint(
333333
// Path doesn't exist
334334
endpoint.Status = builder.CAScanNotVulnerablePathNotFound
335335
if p.log != nil {
336-
p.log <- fmt.Sprintf("ℹ️ Path not found: %s", urlStr)
336+
p.log <- fmt.Sprintf("🫠 [yellow]Path not found:[-] %s", urlStr)
337337
}
338338
return builder.CAEnrollmentEndpointAPIResult{
339339
APIResult: builder.APIResult{
@@ -349,7 +349,7 @@ func (p *CAEnrollmentProcessor) getNtlmEndpoint(
349349
if parsedURL.Scheme == "https" {
350350
endpoint.Status = builder.CAScanNotVulnerableEpaMisconfigured
351351
if p.log != nil {
352-
p.log <- fmt.Sprintf("[yellow]Possible EPA misconfiguration at:[-] %s", urlStr)
352+
p.log <- fmt.Sprintf("🫠 [yellow]Possible EPA misconfiguration at:[-] %s", urlStr)
353353
}
354354
} else {
355355
endpoint.Status = builder.CAScanError
@@ -368,7 +368,7 @@ func (p *CAEnrollmentProcessor) getNtlmEndpoint(
368368
// Other status codes
369369
endpoint.Status = builder.CAScanError
370370
if p.log != nil {
371-
p.log <- fmt.Sprintf("[yellow]Unexpected status at:[-] %s (status: %d)", urlStr, resp.StatusCode)
371+
p.log <- fmt.Sprintf("🫠 [yellow]Unexpected status at:[-] %s (status: %d)", urlStr, resp.StatusCode)
372372
}
373373
return builder.CAEnrollmentEndpointAPIResult{
374374
APIResult: builder.APIResult{

bloodhound/remote_enterpriseca.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func (rc *RemoteCollector) collectHttpEnrollmentEndpoints(ctx context.Context, c
6060
// CollectRemoteEnterpriseCAWithContext wraps CollectRemoteEnterpriseCA with hard timeout enforcement.
6161
func (rc *RemoteCollector) CollectRemoteEnterpriseCAWithContext(ctx context.Context, target EnterpriseCACollectionTarget) EnterpriseCARemoteCollectionResult {
6262
resultCh := make(chan EnterpriseCARemoteCollectionResult, 1)
63+
startTime := time.Now()
6364

6465
go func() {
6566
resultCh <- rc.CollectRemoteEnterpriseCA(target)
@@ -69,7 +70,7 @@ func (rc *RemoteCollector) CollectRemoteEnterpriseCAWithContext(ctx context.Cont
6970
case result := <-resultCh:
7071
return result
7172
case <-ctx.Done():
72-
rc.logger.Log1("[yellow](%s) CA aborted: %v[-]", target.DNSHostName, ctx.Err())
73+
rc.logger.Log1("❌ [red][%s[] Aborted after %v (timeout hit?)[-]", target.DNSHostName, time.Since(startTime).Round(time.Millisecond))
7374
return EnterpriseCARemoteCollectionResult{}
7475
}
7576
}
@@ -116,7 +117,7 @@ func (rc *RemoteCollector) CollectRemoteEnterpriseCA(target EnterpriseCACollecti
116117
// Log method times summary
117118
if len(methodTimes) > 0 {
118119
totalTime := time.Since(totalStart)
119-
rc.logger.Log2("(%s) Total %s: %s", target.DNSHostName, totalTime.Round(time.Millisecond), formatMethodTimes(methodTimes))
120+
rc.logger.Log2("📋 [%s[] Collected in %s: %s", target.DNSHostName, totalTime.Round(time.Millisecond), formatMethodTimes(methodTimes))
120121
}
121122

122123
return result

0 commit comments

Comments
 (0)