Log4j Exploit FTB Academy 1.16

  • Tech Support section is for getting help with FTB related problems. If there's a repeatable issue that can be labeled as a bug, then please use the issue tracker for the pack or the app at GitHub issue trackers - If there's no repository for a pack that means that the pack is old and/or will not be updated. Bugs for older packs will not be fixed, unless they are critical.
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

LordOfTimeLords

New Member
Jan 4, 2022
3
0
2
I installed FTB Academy 1.16 on my server the other day using the official download link from the FTB app, and I have since done testing and it appears my server is susceptible to log4j attacks. I found this out by simply logging into my server with my client and typing this in the chat "${date:YYYY}", and when I checked the latest logs "2022" was printed out. How do I fix the log4j exploit? My server files and start.sh file that was automatically generated upon server installation seems to use a file in the log4jfix directory called Log4jPatcher-1.0.0.jar. My start.sh file looks like this:

#!/bin/bash
if ! grep -q "eula=true" eula.txt; then
echo "Do you agree to the Mojang EULA available at https://account.mojang.com/documents/minecraft_eula ?"
read -N 1 -p "[y/n] " EULA
if [ "$EULA" = "y" ]; then
echo "eula=true" > eula.txt
echo
fi
fi
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -javaagent:log4jfix/Log4jPatcher-1.0.0.jar -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx5000M -Xms4000M -jar forge-1.16.5-36.2.2.jar nogui

Isn't this supposed to fix the log4j exploit? If not, then how do I fix the exploit? I have already taken down the server but I would like to run it soon if possible.
 

Halibut

New Member
Jan 6, 2022
1
0
2
Have you tried adding `Dlog4j2.formatMsgNoLookups=true` before `-jar` in your server launch script?

I haven't seen the log4jpatcher jar before.

Edit: Just found creeperhosts log4jpatcher. Maybe upgrade to the latest 1.0.1 release of it?
 
Last edited:

LordOfTimeLords

New Member
Jan 4, 2022
3
0
2
Have you tried adding `Dlog4j2.formatMsgNoLookups=true` before `-jar` in your server launch script?

I haven't seen the log4jpatcher jar before.

Edit: Just found creeperhosts log4jpatcher. Maybe upgrade to the latest 1.0.1 release of it?

How would I update the log4jpatcher jar? It came with the server download.
 

LordOfTimeLords

New Member
Jan 4, 2022
3
0
2
Have you tried adding `Dlog4j2.formatMsgNoLookups=true` before `-jar` in your server launch script?

I haven't seen the log4jpatcher jar before.

Edit: Just found creeperhosts log4jpatcher. Maybe upgrade to the latest 1.0.1 release of it?
Nevermind. There was an update to the client, so I figured there would be a server update too and downloaded the latest server files. It is fine now. I tested it using the method of trying to print the date to my logs. It didn't print 2022. It printed ${date:YYYY} in the logs.