TVM Monkey

Serious security biz

Jan 9, 2022 - 1 minute read

Log4j Tenable Data Transformation in Java

2022-01-24 - Now parses and transforms embedded “note” messages from tenable


Two pass java implementation of this tenable data transformation solution.

Info and requirements:

  • must run java 1.8 or greater
  • 2 pass solution reduces memory footprint
  • leverages gradle
  • builds an executable jar with all required libraries for easy execution
  • requires apache commons-csv
  • cross platform

Download the Executable jar file

Download the source code file

Here’s how to compile and run the code:

jason@isat:/tmp$ tar xf ./log4jTenableDT.tgz
jason@isat:/tmp$ cd log4jTenableDT/
jason@isat:/tmp/log4jTenableDT$ ./gradlew shadowJar

BUILD SUCCESSFUL in 554ms
2 actionable tasks: 2 executed
jason@isat:/tmp/log4jTenableDT$ cat /tmp/test2.csv | java -jar ./build/libs/log4jTenableDT-1.0-SNAPSHOT-all.jar > /tmp/out.csv
Starting pass: 1
Dropped non-duple line. Check your output!
Dropped non path group text block. Check your output!
Starting pass: 2
jason@isat:/tmp/log4jTenableDT$

Transformed data results: log4j report after data transformation