Skip to content

Instantly share code, notes, and snippets.

@emilyploszaj
Last active June 7, 2023 19:59
Show Gist options
  • Save emilyploszaj/a9693c4f3de5ec9fbc255c51ff3ca47e to your computer and use it in GitHub Desktop.
Save emilyploszaj/a9693c4f3de5ec9fbc255c51ff3ca47e to your computer and use it in GitHub Desktop.
Very Naive CF Malware Scanner
#! /bin/bash
echo "This check is not perfect, and can trigger both false positives AND false negatives, don't assume malware based on results"
echo ""
HIGHLIGHTED='\033[0;31m'
RESET='\033[0m'
INPUT=./*.jar
for file in $INPUT
do
unzip $file -d classes > /dev/null
if grep -e "ClassLoader" -r classes > /dev/null; then
echo -e "[!] WARNING ${HIGHLIGHTED}$file${RESET} contains a class loader and may be Fractureiser, please decompile and manually check!"
echo " Check the following classes:"
grep -e "ClassLoader" -r classes
fi
rm -rf classes
done
@Kraugel13
Copy link

how do I run all this? VS code? windows power shell? install as a notepad file and run it?

@SylvKT
Copy link

SylvKT commented Jun 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment