LLI Wiki — My Digital Knowledge Base

Mitigate Log4j in SSIS jars and list Log4j jars

Rename the Log4j 1.2 jars of the SQL Server 2019 SSIS extensions and list the Log4j jars found on the drives.

SQL Server Integration Services installs ship Log4j 1.2 jars in its common extensions folder. A vulnerability scan can report them. The steps below rename the two jars so they are no longer loaded, then list the Log4j jars found on the local drives with their versions.

Rename the two jars (SQL Server 2019 paths)

Rename-Item "C:\Program Files\Microsoft SQL Server\150\DTS\Extensions\Common\Jars\log4j-1.2.17.jar" "C:\Program Files\Microsoft SQL Server\150\DTS\Extensions\Common\Jars\log4j-1.2.17.jar.mitigation"
Rename-Item "C:\Program Files\Microsoft SQL Server\150\DTS\Extensions\Common\Jars\slf4j-log4j12-1.7.5.jar" "C:\Program Files\Microsoft SQL Server\150\DTS\Extensions\Common\Jars\slf4j-log4j12-1.7.5.jar.mitigation"

List the Log4j jars on all drives

foreach ($drive in Get-PSDrive -PSProvider FileSystem) {
  "# Browsing $($drive.Root)"
  foreach ($jar in Get-ChildItem -Path $drive.Root -File -ErrorAction SilentlyContinue -Force -Recurse -Filter '*log4j*.jar') {
    if ($jar.Name -match '\d[\d.]*\d') {
      "# $($jar.FullName)"
      "NVD_APPLICATION:cpe:2.3:a:apache:log4j:$($Matches[0]):*:*:*:*:*:*:*"
    }
  }
  ""
}

Notes

Mastodon LLIMastodon SocialFosstodon