Any log4j scanner by Rust?

So far I see scanner tools written in bash, golang, java and python.
Anyone know if there is scanner tool in Rust for log4j(CVE-2021-44228j ?

What exactly do you mean by "scanner tool"?


If all those are available why would one need one written in Rust.

I presume they all work just fine.

  • log4j .jar file scanner

    • locate and parse *.jar on local file system for that have .class embedded
    • poking this flaw remotely. (nice to have)
  • Requirement:

    • Generate a scanner binary and works across all OS and their older version as well.
  • On github and fit my requirement.

    • scan4log4shell : Using Golang, the one I am currently using, I would have set aside time to learn Golang.
    • check-log4j: Using bash+system command.
  • WHY

    • Hoping to use/learn less languages as possible, Rust is top on my list. But I only know a little bit Rust programming. Not able to produce scanner tool.

Great, I certainly encourage everyone to get into Rust.

I guess one does not need to know the language used to create a tool in order to use it?

Trying to implement your own log4j scanner in Rust would be a really good way to gain familiarity with the language!

It's a task that involves

  • Reading/writing files
  • Using crates from (e.g. for reading zip archives or parsing classfiles)
  • Handling errors (parsing files can fail, when scanning loads of JARs we want to handle errors gracefully and continue instead of aborting)

You can also extend it to add things like multi-threading for scanning bulk JARs in parallel or a server that can be used for checking whether a specific JAR is vulnerable.

1 Like

Indeed, I (as sysadmin) use tools like ncat and nmap without the need to read its C language src since it is well-made to its requirement/goal. I am just a little bit surprise no Rust log4j scanner came out yet for this important flaw scanning effort on all computer systems, years to come.

Has some one made a log4j scanner in Java?

It could log its results using log4j...


The algorithm you listed out is all true. Rust log4j scanner will be a very good learning chance for me. But I know my rust knowledge is only suitable to sit on passenger seat thus far. PS: Rust syntax is a hard language for drive-by programmer like me(as sysadmin). I have to think hard for a little ping function I wrote a while back like this line . "fn do_pings() -> PingResult<()> { ... ...}".

Thanks for all responded. Have a great holiday.

That's fine. You will always encounter a bit of friction when picking up any new skill/technology, but that should get easier with more practice and after asking for help/feedback/code reviews on places like this forum.

1 Like

Yes but I forgot its name. The scanner written by Java is feature complete also.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.