Microsoft on Thursday announced the open source availability of CodeQL queries that it used during its investigation into the SolarWinds attack.
Believed to be sponsored by Russia, the attackers hacked into the systems of IT management solutions firm SolarWinds in 2019 and, using the Sundrop malware, they inserted the Sunburst backdoor into the SolarWinds Orion monitoring product.
Thus, thousands of organizations worldwide were eventually infected with Sunburst, but the attackers only delivered additional malware to a few hundred victims of interest. The attackers also used hands-on-keyboard techniques to compromise systems at these organizations.
Microsoft, which tracks the attacks as Solorigate, has published several reports to provide information on the employed techniques, the attackers, and the scope of the incident, and this week decided to make some of the tools used in its investigation available to other companies as well.
The company has released the source code of CodeQL queries, which it used to analyze its code at scale and identify any code-level indicators of compromise (IoCs) associated with Solorigate.
“We are open sourcing the CodeQL queries that we used in this investigation so that other organizations may perform a similar analysis. Note that the queries […] simply serve to home in on source code that shares similarities with the source in the Solorigate implant, either in the syntactic elements (names, literals, etc.) or in functionality,” the company says.
Microsoft also underlines that reviews would still be required to ensure the correct results, and that the malicious actor might use other functionality and coding style in different operations, meaning that these queries won’t be able to detect implants that deviate significantly.
The tech company also explains that it chose to work with CodeQL for this analysis because the engine allows for the creation of “a database that captures the model of the compiling code,” which can then be queried repeatedly.
Microsoft has made C# queries meant for the assessment of code-level IoCs available in the CodeQL GitHub repository, with detailed information on each query and the code-level IoCs it attempts to find available in the Solorigate-Readme.md. Guidance on making adjustments is also included.
“GitHub will shortly publish guidance on how they are deploying these queries for existing CodeQL customers. As a reminder, CodeQL is free for open-source projects hosted by GitHub,” Microsoft also notes.
The company also explains that, while investigating Solorigate, on the one hand it looked for syntax associated with code-level IoCs, while on the other it investigated overall semantic patterns of the techniques in those IoCs. Thus, detection would catch scenarios where techniques changed but syntax didn’t, or the other way around.
“Because it’s possible that the malicious actor could change both syntax and techniques, CodeQL was but one part of our larger investigative effort,” the tech giant notes.