Back

CISA Alert AA23-347a: NetSPI Coverage for JetBrains TeamCity CVE 2023-42793

NetSPI has updated Attack Surface Management (ASM) coverage for CVE-2023-42793 and released a Breach and Attack Simulation (BAS) Playbook that allows you to quickly test if you have detection coverage for the TTPS used in a recent campaign by Russian Foreign Intelligence Service Actors also known as APT 29.    

Summary

On December 13, 2023, the Cybersecurity & Infrastructure Security Agency (CISA) released Advisory AA23-347A. They assessed that APT 29 has been targeting JetBrains TeamCity servers vulnerable to CVE-2023-42793. After gaining initial access, APT29 attempted to escalate privileges, move laterally, deploy backdoors, and take additional steps to ensure long-term access to the compromised networks.   

Details

In September 2023, APT 29 was observed scanning for and exploiting vulnerable versions of JetBrains TeamCity servers exposed to the internet. The vulnerability allowed APT 29 to bypass authentication and authorization controls and execute arbitrary code on targeted servers.   

Using a combination of existing automated plays and the customizable Advanced plays available in the NetSPI Breach and Attack Simulation platform we were able to build a custom playbook to allow customers to test existing detection capabilities for this campaign. This playbook contains a total of 20 individual tests.

Some of the included procedures are: 

  • SAM Access – Registry Backup  
    • This actor has used built in commands to back up the registry to exfiltrate sensitive data from the host, they would use powershell to place zipfiles in C:\Windows\Temp for later exfiltration. 
  • WMI – WMIC 
    • This campaign uses many WMIC commands for host reconnaissance. 
  • Advanced – Arbitrary Mimikatz Command Execution 
    • APT 29 has been seen using at least five separate Mimikatz commands as part of their privilege escalation strategy. Using the NetSPI BAS platforms advanced plays it is simple to create multiple tests for the commands that are being used in this campaign.  
  • Scheduled Task – schtasks.exe 
    • The most common way they have being gaining persistent access is by using schedule tasks. 
  • Advanced – Arbitrary Windows Command Execution 
    • This advanced play allows us to quickly create tests for the built it Host Reconnaissance commands that have been reported in the advisory. This playbook includes four advanced plays to test the most common commands being run. 

Mitigation 

The first step should be to patch any JetBrains TeamCity servers in your network, NetSPI ASM can identify any that you are still hosting in your network and verify the issues were properly patch and watch for the introduction of potential future instances. 

After patching, NetSPI BAS can help you evaluate if your current detective controls are able to detect and alert on this threat and determine how robust your current controls are.   

For the automated plays the BAS platform provides detailed instructions on how and where to detect this activity.

Conclusion  

Overall, this threat actor is following the growing trend of developing a 0-day exploit that they can use for initial access while leaning on relatively traditional post exploitation behavior to accomplish their goals. ASM can help identify and monitor for issues, and BAS can be used to simulate attacks and evaluate your monitoring.   

Interested in working toward a more proactive security strategy? Our security consultants are here to help define the path. Let’s talk.

Discover how the NetSPI BAS solution helps organizations validate the efficacy of existing security controls and understand their Security Posture and Readiness.

X