Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
scanners: fs: add additional NOTROBIN artifacts from upcoming blog
Browse files Browse the repository at this point in the history
  • Loading branch information
williballenthin committed Mar 25, 2020
1 parent 85d36ed commit 6c590fe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scanners/fs-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ scan_fs_notrobin() {
fi
done

declare -a dirs;
dirs[0]="/var/vpn/theme";
dirs[1]="/var/vpn/themes";

declare -a blacklist;
blacklist[0]="[a-f0-9]\{32\}\.php";
blacklist[1]="[a-f0-9]\{32\}_[a-zA-Z0-9]\{1,12\}\.\(php\|pl\)";

for dir in "${dirs[@]}"; do
if [ -d "$root_directory/$dir" ]; then
for blackterm in "${blacklist[@]}"; do
local entries=$(ls "$root_directory/$dir" | grep "$blackterm");
if [ -n "$entries" ]; then
found=true;
report_match "$entries, known path to NOTROBIN artifact.";
fi
done
fi
done

if [ "$found" != true ]; then
debug "did not find NOTROBIN artifacts";
fi
Expand Down
Empty file.
Empty file.

0 comments on commit 6c590fe

Please sign in to comment.