There are two methods to test and find out if your server or desktop powered by Linux is secure or not:
(a) A simple C test program for all Linux based servers (distro independent; generic method).
(b) A simple bash shell test program for RHEL or CentOS or Scientifc Linux server only.
Method #1: GHOST.C Glibc Vulnerability Test C Program
Type the following wget command to download GHOST.C on a Linux based system:
wget https://webshare.uchicago.edu/orgs/ITServices/itsec/Downloads/GHOST.c ## OR wget -O GHOST.c https://gist.githubusercontent.com/koelling/ef9b2b9d0be6d6dbab63/raw/de1730049198c64eaf8f8ab015a3c8b23b63fd34/gistfile1.c
gcc -o GHOST GHOST.c
Method #2: GHOST-test.sh Vulnerability Test Bash Script
wget -O GHOST-test.sh http://www.cyberciti.biz/files/scripts/GHOST-test.sh.txt bash GHOST-test.sh
What to do if my server is not secure or Vulnerable to the Ghost attack?
See this tutorial page for securing your server by applying patches to glibc.