Skip to content

Instantly share code, notes, and snippets.

@fliphess
Last active September 11, 2018 07:59
Show Gist options
  • Save fliphess/27830aff72c8e26dcb22 to your computer and use it in GitHub Desktop.
Save fliphess/27830aff72c8e26dcb22 to your computer and use it in GitHub Desktop.
Detect malafide files in websites
#!/bin/bash
grep -RE 'error_reporting\(0\)|preg_replace\(|eval\(|base64_decode|file_put_contents|exec\(|passthru|popen|proc_open|pcntl' --include='*.php' . | cut -d: -f 1 | sort -u | while read line
do
(echo $line | cat - $line) | less
done
#!/bin/bash
test -d ~/bin || mkdir ~/bin
cd ~/bin
wget https://gist.githubusercontent.com/fliphess/27830aff72c8e26dcb22/raw/6de54f7c1c07a25ed9a6fac7a9b30336aae95f42/neo-scan.sh
wget https://gist.githubusercontent.com/fliphess/27830aff72c8e26dcb22/raw/6de54f7c1c07a25ed9a6fac7a9b30336aae95f42/eval-scan.sh
wget https://raw.githubusercontent.com/Neohapsis/NeoPI/master/neopi.py
chmod +x neo-scan.sh eval-scan.sh neopi.py
#!/bin/bash
# To use this tool please install NeoPI: https://github.com/Neohapsis/NeoPI and add it to your PATH
~/bin/neopi.py -aA . | awk {' print $2 '} | grep "\./" | sort | uniq -c | sort -nr | awk '{ print $2 }' | while read line
do
(echo "$line" | cat "$line" - ) | less
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment