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AC,aAAa,CAAC,EAAE;YAC1C,MAAM,oBAAoB,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CACjD,wBAAwB,CACzB,CAAC;YACF,MAAM,cAAc,GAClB,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;YAExE,MAAM,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CACtD,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CACtC,CAAC;YAEF,OAAO,CAAC,CAAC,mBAAmB,CAAC;SAC9B;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,GAAG,GAAG,IAAI,KAAK,EAAS,CAAC;IAC/B,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC;IAEnB,MAAM,GAAG,CAAC;AACZ,CAAC","sources":["webpack://snyk/./src/cli/commands/log4shell-hashes.ts","webpack://snyk/./src/cli/commands/log4shell.ts"],"sourcesContent":["/**\n * The content of this file is generated by a tool.\n * Don't edit it manually!\n * */\n\nexport type FileSignatureDetails = {\n versions: string[];\n filename: string;\n};\n\nexport type VulnerableSignatures = {\n [signature: string]: FileSignatureDetails;\n};\n\nexport const vulnerableSignatures: VulnerableSignatures = {\n IfBVtiwVRT8NeXCp2ZTKtw: {\n filename: 'JndiManager.class',\n versions: ['2.13.2', '2.13.1', '2.13.0', '2.13.3'],\n },\n CsWz5uabp3ZWg3mOZpowsg: {\n filename: 'log4j-core-2.13.2.jar',\n versions: ['2.13.2'],\n },\n '8MQ62soq/HHGzID4UbOIGA': {\n filename: 'log4j-core-2.4.1.jar',\n versions: ['2.4.1'],\n },\n RyyOH7qg5hUg4CXCVbXRaA: {\n filename: 'log4j-core-2.6.2.jar',\n versions: ['2.6.2'],\n },\n '7Q4xglxv2kNCP7ODV6QrPQ': {\n filename: 'MessagePatternConverter.class',\n versions: ['2.16.0'],\n },\n geBDOuAGAsDk0AQk0hOwqw: {\n filename: 'log4j-core-2.15.0.jar',\n versions: ['2.15.0'],\n },\n 'miPB9v/sgl70HMwQVBogkA': {\n filename: 'JndiManager.java',\n versions: ['2.8.2-sources', '2.8-sources', '2.7-sources', '2.8.1-sources'],\n },\n WCRxHWxoFi61NcxNv3SF0w: {\n filename: 'JndiManager.class',\n versions: ['2.12.1', '2.12.0'],\n },\n 'xtIzvI6c/l2mkAWdJ9n4jw': {\n filename: 'log4j-core-2.8.jar',\n versions: ['2.8'],\n },\n zH1V7WnMX9NANbFcbt95oA: {\n filename: 'log4j-core-2.13.3.jar',\n versions: ['2.13.3'],\n },\n 'EQqz4+TzeAkh6O5d3jNzrQ': {\n filename: 'log4j-core-2.3.jar',\n versions: ['2.3'],\n },\n 'VSPxRPrvK/ygijyosr7Nag': {\n filename: 'log4j-core-2.6.jar',\n versions: ['2.6'],\n },\n 'C1fpJhCjMxrxWn6Q+LNTnQ': {\n filename: 'Interpolator.class',\n versions: ['2.16.0'],\n },\n 'QVwT58hQX7BW1UDqwpty+g': {\n filename: 'JndiManager.class',\n versions: ['2.7', '2.8.1', '2.8'],\n },\n zXChiI7N0xHBmQ54SGfOHg: {\n filename: 'log4j-core-2.0.jar',\n versions: ['2.0'],\n },\n 'txoT/V3yUWlPyhFiQAA7Ig': {\n filename: 'log4j-core-2.13.0.jar',\n versions: ['2.13.0'],\n },\n VHuz7S3rhW0OO713wnuWJQ: {\n filename: 'log4j-core-2.8.1.jar',\n versions: ['2.8.1'],\n },\n SlF3oXJ2S9pvRHK5S6F8yw: {\n filename: 'log4j-core-2.8.2.jar',\n versions: ['2.8.2'],\n },\n ToAy4jACKoyI3X1SbwtnCw: {\n filename: 'JndiManager.java',\n versions: [\n '2.9.0-sources',\n '2.9.1-sources',\n '2.10.0-sources',\n '2.11.0-sources',\n '2.11.1-sources',\n ],\n },\n 'oZNwOQSj8Y+zyQqHfrXIpw': {\n filename: 'JndiManager.class',\n versions: ['2.8.2'],\n },\n '+/pfM6tLKab91SRz7nuDTQ': {\n filename: 'log4j-core-2.0.1.jar',\n versions: ['2.0.1'],\n },\n 'Kr7CzmZeDVKaPyj/+7st0w': {\n filename: 'log4j-core-2.11.0.jar',\n versions: ['2.11.0'],\n },\n 'AHnJByMGWZaPD8DkGmq8+Q': {\n filename: 'log4j-core-2.4.jar',\n versions: ['2.4'],\n },\n '3o0BzBX9DHT+qLu2aOKJ9Q': {\n filename: 'log4j-core-2.0-rc2.jar',\n versions: ['2.0-rc2.jar'],\n },\n 'siQt4Gd75lFdbO+/SOfl1Q': {\n filename: 'log4j-core-2.11.1.jar',\n versions: ['2.11.1'],\n },\n jTMVRLLnsgrRZt68olUNcw: {\n filename: 'log4j-core-2.1.jar',\n versions: ['2.1'],\n },\n '3Q4+C0BAg+xpYYqrtQuKwA': {\n filename: 'log4j-core-2.5.jar',\n versions: ['2.5'],\n },\n BP3XAYCdF0ZcF8fmA7GyAg: {\n filename: 'JndiManager.class',\n versions: ['2.11.1', '2.9.1', '2.11.0', '2.11.2', '2.10.0', '2.9.0'],\n },\n FS7LPOCUrFvJ6jnWEi4oFA: {\n filename: 'log4j-core-2.0-beta9.jar',\n versions: ['2.0-beta9.jar'],\n },\n 'SPfzzaUwMKh+jDh9jR5CZQ': {\n filename: 'log4j-core-2.6.1.jar',\n versions: ['2.6.1'],\n },\n 'axX0LDM6w5q6z+7rGIUqRA': {\n filename: 'JndiManager.class',\n versions: ['2.1', '2.2', '2.3'],\n },\n 'XkvKXtILlKsZu2WDbak/lg': {\n filename: 'log4j-core-2.2.jar',\n versions: ['2.2'],\n },\n lI3aeHWTNAp68aGOMot7fw: {\n filename: 'log4j-core-2.14.1.jar',\n versions: ['2.14.1'],\n },\n 'K2Pg5QY/2sz2aaHiY4Tz/Q': {\n filename: 'log4j-core-2.7.jar',\n versions: ['2.7'],\n },\n 'iyJgsczmQUT2MQh2+UsWOA': {\n filename: 'JndiManager.class',\n versions: ['2.4', '2.4.1', '2.5'],\n },\n 'CI3xE60kmrcr8Zt/ALhj1Q': {\n filename: 'log4j-core-2.0-rc1.jar',\n versions: ['2.0-rc1.jar'],\n },\n '3JkBHwR+Y9zHQbWraNEW2w': {\n filename: 'log4j-core-2.10.0.jar',\n versions: ['2.10.0'],\n },\n 'XFJ4IdEISn7z4D1AFE/1Mg': {\n filename: 'log4j-core-2.12.0.jar',\n versions: ['2.12.0'],\n },\n n0GSikGCAN4iMt0yblIsxw: {\n filename: 'log4j-core-2.16.0.jar',\n versions: ['2.16.0'],\n },\n 'XSU+U/qZPhIv8BIiGqSeww': {\n filename: 'JndiManager.class',\n versions: ['2.15.0'],\n },\n 'NbG1m0kl+RbQmdW4+7nykQ': {\n filename: 'JndiManager.java',\n versions: [\n '2.11.2-sources',\n '2.12.1-sources',\n '2.13.0-sources',\n '2.13.1-sources',\n '2.13.2-sources',\n '2.14.1-sources',\n '2.12.0-sources',\n '2.13.3-sources',\n '2.14.0-sources',\n ],\n },\n 'Kn94Du0/K5zJ8p4blmlGjw': {\n filename: 'JndiManager.java',\n versions: [\n '2.4-sources',\n '2.2-sources',\n '2.3-sources',\n '2.5-sources',\n '2.6.1-sources',\n '2.6.2-sources',\n '2.6-sources',\n '2.1-sources',\n '2.4.1-sources',\n ],\n },\n '02XkgiFBT5P+7wk6G/YH7w': {\n filename: 'log4j-core-2.13.1.jar',\n versions: ['2.13.1'],\n },\n '+rZGJX+UWwsqfOPhw+POXw': {\n filename: 'log4j-core-2.9.0.jar',\n versions: ['2.9.0'],\n },\n 'lC9Cnqy4AV4Y2PWZls++5g': {\n filename: 'log4j-core-2.9.1.jar',\n versions: ['2.9.1'],\n },\n 'yL2LXFqqoHo9y/V94BySZg': {\n filename: 'log4j-core-2.11.2.jar',\n versions: ['2.11.2'],\n },\n ATi6HBkdXHVP0OPDphwDBw: {\n filename: 'log4j-core-2.12.1.jar',\n versions: ['2.12.1'],\n },\n 'hiwAsuhU+cDx6NhAnSPYmQ': {\n filename: 'log4j-core-2.14.0.jar',\n versions: ['2.14.0'],\n },\n 'uhz4+B57MccJdoVhuoq1WA': {\n filename: 'JndiManager.class',\n versions: ['2.16.0'],\n },\n 'O9n0G4nOT+jMv3PkMZWlzg': {\n filename: 'JndiManager.class',\n versions: ['2.6.1', '2.6', '2.6.2'],\n },\n '8dYwxIkoCWpITkuVzLFioA': {\n filename: 'JndiManager.class',\n versions: ['2.14.0', '2.14.1'],\n },\n jAzz6wRxVKT44W2vWiCTGQ: {\n filename: 'log4j-core-2.0.2.jar',\n versions: ['2.0.2'],\n },\n};\n","import { MethodArgs } from '../args';\nimport { promises, Stats } from 'fs';\nimport * as crypto from 'crypto';\nimport * as AdmZip from 'adm-zip';\nimport * as ora from 'ora';\nimport * as semver from 'semver';\nimport { FileSignatureDetails, vulnerableSignatures } from './log4shell-hashes';\n\nconst readFile = promises.readFile;\nconst readDir = promises.readdir;\nconst stat = promises.stat;\nconst MAX_FILE_SIZE = 2 * 1024 * 1024 * 1024 - 1;\n\ntype ExploitType = 'Log4Shell' | 'DoS' | 'Unknown';\ntype Signature = {\n value: string;\n path: string;\n exploitType: ExploitType;\n};\ntype FileContent = Buffer;\ntype FilePath = string;\ntype Digest = string;\n\ntype File = {\n path: FilePath;\n content: () => Promise<FileContent>;\n};\n\nclass Paths {\n paths: Array<File>;\n\n constructor(paths: Array<File>) {\n this.paths = paths;\n }\n\n static empty() {\n return new Paths([]);\n }\n\n static fromZip(content: FileContent, path: FilePath) {\n try {\n const unzippedEntries = new AdmZip(content).getEntries();\n\n const entries: File[] = unzippedEntries.map((entry) => {\n return {\n path: path + '/' + entry.entryName,\n content: async () => entry.getData(),\n };\n });\n\n return new Paths(entries);\n } catch (error) {\n errors.push(error);\n\n return this.empty();\n }\n }\n\n static async fromDisk(paths: FilePath[]) {\n try {\n const entries = paths.map((path) => {\n return {\n path,\n content: async () => await readFile(path),\n };\n });\n\n return new Paths(entries);\n } catch (error) {\n errors.push(error);\n\n return this.empty();\n }\n }\n}\n\ninterface FileHandler {\n (filePath: string, stats: Stats): void;\n}\n\nconst errors: any[] = [];\n\nasync function startSpinner(): Promise<ora.Ora> {\n const spinner: ora.Ora = ora({ isSilent: false, stream: process.stdout });\n spinner.text = `Looking for Log4Shell...`;\n spinner.start();\n\n return spinner;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport default async function log4shell(...args: MethodArgs): Promise<void> {\n console.log(\n 'Please note this command is for already built artifacts. To test source code please use `snyk test`.',\n );\n\n const signatures: Array<Signature> = new Array<Signature>();\n const spinner = await startSpinner();\n\n const paths: FilePath[] = await find('.');\n\n await parsePaths(await Paths.fromDisk(paths), signatures);\n\n spinner.stop();\n\n console.log('\\nResults:');\n\n const issues = filterJndi(signatures);\n if (issues.length == 0) {\n console.log('No known vulnerable version of Log4J was detected');\n return;\n }\n const rceIssues: Signature[] = [];\n const dosIssues: Signature[] = [];\n\n issues.forEach((issue) => {\n issue.path = issue.path.replace(\n /(.*org\\/apache\\/logging\\/log4j\\/core).*/,\n '$1',\n );\n\n if (issue.exploitType === 'Log4Shell') {\n rceIssues.push(issue);\n }\n if (issue.exploitType === 'DoS') {\n dosIssues.push(issue);\n }\n });\n\n if (rceIssues.length > 0) {\n displayIssues(\n 'A version of Log4J that is vulnerable to Log4Shell was detected:',\n rceIssues,\n );\n displayRemediation('Log4Shell');\n }\n\n if (dosIssues.length > 0) {\n displayIssues(\n 'A version of Log4J that is vulnerable to CVE-2021-45105 (Denial of Service) was detected:',\n dosIssues,\n );\n displayRemediation('DoS');\n }\n\n exitWithError();\n}\n\nasync function parsePaths(ctx: Paths, accumulator: Array<Signature>) {\n for (const { path, content } of ctx.paths) {\n if (!isArchiveOrJndi(path)) {\n continue;\n }\n\n const signature = await computeSignature(await content());\n const isVulnerable = signature in vulnerableSignatures;\n\n if (isVulnerable || path.includes('JndiLookup')) {\n await append(path, signature, accumulator);\n continue;\n }\n\n if (!isVulnerable && isJavaArchive(path)) {\n await parsePaths(Paths.fromZip(await content(), path), accumulator);\n }\n }\n}\n\nasync function computeSignature(content: FileContent): Promise<Digest> {\n return crypto\n .createHash('md5')\n .update(content)\n .digest('base64')\n .replace(/=/g, '');\n}\n\nasync function find(path: FilePath): Promise<FilePath[]> {\n const result: FilePath[] = [];\n\n await traverse(path, (filePath: string, stats: Stats) => {\n if (!stats.isFile() || stats.size > MAX_FILE_SIZE) {\n return;\n }\n result.push(filePath);\n });\n\n return result;\n}\n\nasync function traverse(path: FilePath, handle: FileHandler) {\n try {\n const stats = await stat(path);\n\n if (!stats.isDirectory()) {\n handle(path, stats);\n return;\n }\n\n const entries = await readDir(path);\n for (const entry of entries) {\n const absolute = path + '/' + entry;\n await traverse(absolute, handle);\n }\n } catch (error) {\n errors.push(error);\n }\n}\n\nasync function computeExploitType(\n signatureDetails: FileSignatureDetails,\n): Promise<ExploitType> {\n for (const version of signatureDetails.versions) {\n const coercedVersion = semver.coerce(version);\n\n if (coercedVersion === null) {\n continue;\n }\n\n if (semver.lt(coercedVersion, '2.16.0')) {\n return 'Log4Shell';\n }\n\n if (semver.satisfies(coercedVersion, '2.16.x')) {\n return 'DoS';\n }\n }\n\n return 'Unknown';\n}\n\nfunction displayIssues(message: string, signatures: Signature[]) {\n console.log(message);\n signatures.forEach((signature) => {\n console.log(`\\t${signature.path}`);\n });\n}\n\nfunction displayRemediation(exploitType: ExploitType) {\n switch (exploitType) {\n case 'Log4Shell':\n console.log(`\\nWe highly recommend fixing this vulnerability. If it cannot be fixed by upgrading, see mitigation information here:\n \\t- https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHELOGGINGLOG4J-2314720\n \\t- https://snyk.io/blog/log4shell-remediation-cheat-sheet/\\n`);\n break;\n\n case 'DoS':\n console.log(`\\nWe recommend fixing this vulnerability by upgrading to a later version. To learn more about this vulnerability, see:\n \\t- https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHELOGGINGLOG4J-2321524\\n`);\n break;\n\n default:\n break;\n }\n}\n\nfunction isJavaArchive(path: FilePath) {\n return path.endsWith('.jar') || path.endsWith('.war') || path.endsWith('ear');\n}\n\nfunction isArchiveOrJndi(path: FilePath) {\n return (\n isJavaArchive(path) ||\n path.includes('JndiManager') ||\n path.includes('JndiLookup')\n );\n}\n\nasync function append(\n path: FilePath,\n signature: Digest,\n accumulator: Array<Signature>,\n): Promise<void> {\n const exploitType = vulnerableSignatures[signature]\n ? await computeExploitType(vulnerableSignatures[signature])\n : 'Unknown';\n\n accumulator.push({\n value: signature,\n path,\n exploitType,\n });\n}\n\nfunction filterJndi(signatures: Array<Signature>) {\n return signatures.filter((signature) => {\n if (isJavaArchive(signature.path)) {\n return true;\n }\n\n if (signature.path.includes('JndiManager')) {\n const jndiManagerPathIndex = signature.path.indexOf(\n '/net/JndiManager.class',\n );\n const jndiLookupPath =\n signature.path.substr(0, jndiManagerPathIndex) + '/lookup/JndiLookup';\n\n const isJndiLookupPresent = signatures.find((element) =>\n element.path.includes(jndiLookupPath),\n );\n\n return !!isJndiLookupPresent;\n }\n\n return false;\n });\n}\n\nfunction exitWithError() {\n const err = new Error() as any;\n err.code = 'VULNS';\n\n throw err;\n}\n"],"names":[],"sourceRoot":""}