Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (41 sloc) 1.4 KB
# A simple check to see if running ssh processes contain any string that have
# been designated an indication of Fokirtor by Symantec.
# More info here:
# (c) 2013, Kumina bv,
# You are free to use, modify and distribute this check in any way you see
# fit. Just don't say you wrote it.
# This check is created for Debian Squeeze/Wheezy, no idea if it'll work in
# other distros. You'll need gdb-minimal (for gcore) installed.
# We need to be root
if [ `/usr/bin/id -u` -ne 0 ]; then
echo "You need root for this script. Sorry."
exit 1
# For all pids of the ssh process, do the check
for pid in `/bin/pidof sshd`; do
/usr/bin/gdb </dev/null --nx --batch \
-ex "set pagination off" -ex "set height 0 " -ex "set width 0" \
-ex "attach $pid" -ex "gcore $t" -ex detach -ex quit
for str in hbt= key= dhost= sp= sk= dip=; do
/usr/bin/strings $t | /bin/grep "${str}[[:digit:]]"
if [ $? -eq 0 ]; then
i=$(($i + 1))
/bin/rm $t
if [ $i -eq 6 ]; then
echo "CRITICAL: Fokirtor strings found in sshd process ${pid}!"
exit 2
echo "OK: No indication of Fokirtor found."
exit 0