{"id":5913,"date":"2014-01-19T09:32:47","date_gmt":"2014-01-19T14:32:47","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=5913"},"modified":"2014-01-19T09:32:47","modified_gmt":"2014-01-19T14:32:47","slug":"identifying-php-spam","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/","title":{"rendered":"Identifying PHP Spam"},"content":{"rendered":"<p>To identify PHP Spam when running PHP 5.3 or higher: (Please note the variables below are not enabled by default in php.ini) utilize the following php.ini variable to narrow down the offending script.<\/p>\n<hr \/>\n<p>If you suspect there is a PHP script sending out email (and it is still doing so) try adding these two lines:<br \/>\n<code><br \/>\n mail.add_x_header = On<br \/>\n mail.log = \/var\/log\/php_mail.log<br \/>\n<\/code><br \/>\nto the [mail] section of:<br \/>\n<code><br \/>\n \/usr\/local\/lib\/php.ini<br \/>\n<\/code><br \/>\n<!--more--><br \/>\nAlso make sure to create the log file manually otherwise you may get permissions errors and it won&#8217;t work:<br \/>\n<code><br \/>\n touch \/var\/log\/php_mail.log<br \/>\n chmod 666 \/var\/log\/php_mail.log<br \/>\n<\/code><br \/>\nThe first variable adds:<\/p>\n<p> <strong>X-PHP-Originating-Script:<\/strong><\/p>\n<p>to the exim email header (the header variable should only show up when PHP does the sending).  So, for example if you had a a PHP script sending from bad_script.php the header would look something like:<\/p>\n<p> <strong>X-PHP-Originating-Script: 500:bad_script.php<\/strong><\/p>\n<p>You can actually search the queue for this header (btw, this doesn&#8217;t show up in the regular exim_mainlog) by using:<br \/>\n<code><br \/>\n exiqgrep 'X-PHP-Originating-Script'<br \/>\n<\/code><br \/>\nThis should give you a list of emails that have that have been sent using PHP or, if you know the script name, you could also use:<br \/>\n<code><br \/>\n exiqgrep 'bad_script.php'<br \/>\n<\/code><br \/>\nThis should give you a list of emails that have that have that script name in it and if you&#8217;re REALLY sure that only spam emails are listed you could use:<br \/>\n<code><br \/>\n exiqgrep -i 'bad_script.php' | xargs exim -Mrm<br \/>\n<\/code><br \/>\nwhich filters out all the emails with bad_script.php in it, then only displays the message ids and then delete them.<\/p>\n<p>&nbsp;<br \/>\nThe above header information is really useful, but when combined with the mail.log variables can be useful.  This causes PHP to record whenever:<\/p>\n<p><strong> mail()<\/strong><\/p>\n<p>is used.  A simple output would be similar to:<br \/>\n<code><br \/>\n mail() on [\/home\/user\/public_html\/bad_script.php:11]: To: alice@domain.com -- Headers: From: eve@other.net  Reply-To: bob@next.org  Content-type: text\/html; charset=iso-8859-1<br \/>\n<\/code><br \/>\nIf you were to compare the cwd output of a spam script to this log you could get a pretty good idea of where the spam is coming from.<\/p>\n<p>Ejoy!<\/p>\n<p>p.s.<\/p>\n<p>If you need a spamfu script that identifies spam coming from the server, try this one. This is a script designed to help you find the source of spam quickly. It currently can parse spam from the email queue as well as the exim logs. (Big ups to mwineland for the script; he rox!)<\/p>\n<p><code><br \/>\n#!\/bin\/bash<\/p>\n<p>#Global variables<br \/>\nqueue_total=`exim -bpc` # Saving how many emails are currently in the queue<br \/>\nversion='1.1.1'<\/p>\n<p># Logfile checking variables:<br \/>\nLOGDIR=\/var\/log<br \/>\nLOGFILE=exim_mainlog<br \/>\nGREP=\"grep\"<br \/>\nNUM_RCPTS=15<\/p>\n<p>#############################################<br \/>\n# User changeable variables to choose which #<br \/>\n#  checks are performed during log parsing  #<br \/>\n############################################<\/p>\n<p># Check for emails that were sent from scripts<br \/>\n# by searching for CWD<br \/>\nCHECK_FOR_SCRIPTS=\"true\"<\/p>\n<p># Checks for emails that were sent by a user<br \/>\n# that logged in with a password<br \/>\nCHECK_FOR_AUTH=\"true\"<\/p>\n<p># Checks for emails sent by<br \/>\n# a cpanel\/system account<br \/>\nCHECK_FOR_ACCOUNT=\"true\"<\/p>\n<p># Show the address the most bounce backs<br \/>\n# were returned to<br \/>\nCHECK_FOR_BOUNCES=\"false\"<\/p>\n<p># Does a check for emails sent by a email address<br \/>\n# However this can be forged, may get rid of this function<br \/>\nCHECK_MOST_DOMAIN=\"false\"<\/p>\n<p># Shows what IP's sent the most emails<br \/>\n# 127.0.0.1 is common if sent via script\/webmail<br \/>\nCHECK_MOST_IP=\"false\"<\/p>\n<p># Shows single emails that had the most recipients<br \/>\nCHECK_MOST_RCPTS=\"true\"<\/p>\n<p>##################################################<br \/>\n#     !!!END OF USER DEFINABLE VARIABLES!!!      #<br \/>\n##################################################<\/p>\n<p># Sends script version information to my server<br \/>\n#commented out because the domain expired<br \/>\n#curl --connect-timeout 5 -d \"version=$version\" http:\/\/morzain.net\/spamfu\/spamfu.php<\/p>\n<p>###################################################<br \/>\n###################################################<br \/>\n# This is the main menu of the script             #<br \/>\n# This asks you to check the logs, queue, or exit #<br \/>\n###################################################<br \/>\n###################################################<\/p>\n<p>function spamfu_init<br \/>\n{<br \/>\n    echo \"####################################\"<br \/>\n    echo \"\"<br \/>\n    echo \"SpamFu for Dummies:\"<br \/>\n    echo \"There are currently ${queue_total} emails in the queue\"<br \/>\n    echo \"\"<br \/>\n    echo \"What would you like to do?:\"<br \/>\n    echo \"  (1) Check for spammers via email logs\"<br \/>\n    echo \"  (2) Check for spammers via emails in the queue\"<br \/>\n    echo \"  (3) Exit\"<br \/>\n    echo -n \"Select option: \"<br \/>\n    read spamfu_option<\/p>\n<p>    if [ -z $spamfu_option ]; then<br \/>\n        spamfu_init<br \/>\n    else<br \/>\n        echo \"You have selected $spamfu_option\"<br \/>\n    fi<\/p>\n<p>    if ! [ $spamfu_option -ge 1 -a  $spamfu_option -le 3 ];then<br \/>\n        echo Invalid option<br \/>\n        spamfu_init<br \/>\n    fi<\/p>\n<p>    if [ $spamfu_option = \"1\" ]; then<br \/>\n        logs_init<br \/>\n    fi<\/p>\n<p>    if [ $spamfu_option = \"2\" ]; then<br \/>\n        queue_init<br \/>\n    fi<\/p>\n<p>    if [ $spamfu_option = \"3\" ]; then<br \/>\n        echo \"Exiting\"<br \/>\n        exit<br \/>\n    fi<br \/>\n}<\/p>\n<p>#######################################################<br \/>\n#######################################################<br \/>\n# This is the menu for checking the queue             #<br \/>\n# It asks you how many seconds to check the queue for #<br \/>\n#######################################################<br \/>\n#######################################################<\/p>\n<p>function queue_init<br \/>\n{<br \/>\n    echo \"There are currently ${queue_total} emails in the queue\"<br \/>\n    echo \"\"<br \/>\n    echo \"Parsing the entire queue can take a while\"<br \/>\n    echo \"Instead we can look at a snapshot of the emails in the queue\"<br \/>\n    echo -n \"How many seconds would you like to parse the queue for? 0 is unlimited [0]: \"<\/p>\n<p>    read queue_option<\/p>\n<p>    if [ -z $queue_option ]; then<br \/>\n        echo \"\"<br \/>\n        echo \"You have selected: 0 (unlimited)\"<br \/>\n        echo \"\"<br \/>\n        queue_timeout=\"0\"<br \/>\n        check_queue<br \/>\n    elif<br \/>\n        echo $queue_option | grep -Eq '^[0-9]{0,3}?\\.?[0-9]+$'; then<br \/>\n        queue_timeout=$queue_option<br \/>\n        echo \"Setting timeout to ${queue_timeout} seconds\"<br \/>\n        check_queue<br \/>\n    else<br \/>\n        echo \"\"<br \/>\n        echo \"****************************\"<br \/>\n        echo \"Please enter a valid integer\"<br \/>\n        echo \"****************************\"<br \/>\n        echo \"\"<br \/>\n        queue_init<br \/>\n    fi<br \/>\n}<\/p>\n<p>#######################################################<br \/>\n#######################################################<br \/>\n# This is the menu for checking the logs              #<br \/>\n#######################################################<br \/>\n#######################################################<\/p>\n<p>function logs_init<br \/>\n{<br \/>\n    echo \"\"<br \/>\n    echo \"##########################################################\"<br \/>\n    echo \"Parsing a large file with lots of checks can take a while\"<br \/>\n    echo \"Choose options to pick which logfile, which checks to perform\"<br \/>\n    echo \"as well as how many lines of the file to parse\"<br \/>\n    echo \"\"<br \/>\n    echo \"LOGFILE: `echo $LOGFILE | awk '{print $1}'`\"<br \/>\n    echo \"SIZE: `du -sh $LOGDIR\/$LOGFILE | awk '{print $1}'`\"<br \/>\n    echo \" (1) Proceed with check\"<br \/>\n    echo \" (2) Change log file\"<br \/>\n    echo \" (3) Change which checks are performed\"<br \/>\n    echo \" (4) Change how many lines to parse\"<br \/>\n    echo \" (5) Main Menu\"<br \/>\n    echo -n \"Select option: \"<br \/>\n    read logmenu_option<\/p>\n<p>    if ! [ $logmenu_option -ge 1 -a  $logmenu_option -le 5 ];then<br \/>\n        echo Invalid option<br \/>\n        logs_init<br \/>\n    fi<\/p>\n<p>    if [ $logmenu_option = \"1\" ]; then<br \/>\n        check_logs<br \/>\n    fi<\/p>\n<p>    if [ $logmenu_option = \"2\" ]; then<br \/>\n        logfile_menu<br \/>\n    fi<\/p>\n<p>    if [ $logmenu_option = \"3\" ]; then<br \/>\n        logcheck_menu<br \/>\n    fi<\/p>\n<p>    if [ $logmenu_option = \"4\" ]; then<br \/>\n        logline_menu<br \/>\n    fi<\/p>\n<p>    if [ $logmenu_option = \"5\" ]; then<br \/>\n        spamfu_init<br \/>\n    fi<br \/>\n}<\/p>\n<p>################################<\/p>\n<p>function logfile_menu<br \/>\n{<br \/>\nLOG_NUMBER=0<br \/>\n    echo \"\"<br \/>\n    echo \"######################################\"<br \/>\n    echo \"choose one of the following:\"<\/p>\n<p>    # create an array called LOG_LIST with a list of any file in $LOGDIR<br \/>\n    # that starts with exim_mainlog<br \/>\n    for logfile in `ls $LOGDIR\/exim_mainlog*`; do<br \/>\n        let \"LOG_NUMBER += 1\"<br \/>\n        LOG_LIST[$LOG_NUMBER]=`echo $logfile | awk -F\/ '{print $NF}'`<br \/>\n    done<\/p>\n<p>    # save the number of files in the array and subtract 1<br \/>\n    # becuase we want to start at 1 instead of 0<br \/>\n    LOG_NUMBER=${#LOG_LIST[@]}<br \/>\n#    let \"LOG_NUMBER -= 1\"<\/p>\n<p>    # Create the menu with a loop of 1 to however many files are in the array<br \/>\n    for i in `seq 1 $LOG_NUMBER`; do<br \/>\n        echo \" ($i) `du -sh $LOGDIR\/${LOG_LIST[$i]} | awk '{print $1}'` ${LOG_LIST[$i]}\"<br \/>\n    done<br \/>\n    echo -n \"Select option: \"<br \/>\n    read logmenu_option<\/p>\n<p>    if [ $(echo \"$logmenu_option\" | grep -E \"^[0-9]+$\") ]; then<br \/>\n        if [ $logmenu_option -le $LOG_NUMBER -a $logmenu_option -gt 0 ]; then<br \/>\n            LOGFILE=${LOG_LIST[$logmenu_option]}<br \/>\n            echo \"Using ${LOG_LIST[$logmenu_option]}\"<br \/>\n            if [[ $(file $LOGDIR\/$LOGFILE | grep \"gzip\") ]]; then<br \/>\n                GREP=\"zgrep\"<br \/>\n                echo \"using zgrep\"<br \/>\n            else<br \/>\n                GREP=\"grep\"<br \/>\n                echo \"using grep\"<br \/>\n            fi<br \/>\n            logs_init<br \/>\n        else<br \/>\n            echo \"Invalid option\"<br \/>\n            logfile_menu<br \/>\n        fi<br \/>\n    else<br \/>\n        echo \"Invalid option\"<br \/>\n        logfile_menu<br \/>\n    fi<\/p>\n<p>}<\/p>\n<p>###########################<\/p>\n<p>function logline_menu<br \/>\n{<br \/>\n    echo \"not implemented yet\"<br \/>\n    logs_init<br \/>\n}<\/p>\n<p>function logcheck_menu<br \/>\n{<br \/>\n    echo \"not implemented yet\"<br \/>\n    echo \"these can be modified by editing the script\"<br \/>\n    logs_init<br \/>\n}<\/p>\n<p>####################################################<br \/>\n####################################################<br \/>\n#Function to check the logs                        #<br \/>\n#Called if you choose that option on the main menu #<br \/>\n####################################################<br \/>\n####################################################<\/p>\n<p>check_logs()<br \/>\n{<br \/>\n    # This sets a variable so we can ignore emails sent to domains on the server, as we only want outgoing emails.<br \/>\n    # it takes the list of domains, adds \"for .*@\" to the front of each domain<br \/>\n    # then replaces the newline characters with pipes, and removes the pipe that ends up at the end of the line<br \/>\n    LOCAL_DOMAINS=`cat \/etc\/localdomains | sed  's\/^\/for .*@\/g' | tr '\\n' '|' | sed 's\/|$\/\/'`<\/p>\n<p>    check_for_scripts()<br \/>\n    {<br \/>\n        echo \"Checking for scripts...\"<br \/>\n        SCRIPTED_EMAILS=`$GREP -o \" cwd=[[:alnum:][:graph:]]*\" $LOGDIR\/$LOGFILE |  grep -v spool | sort | uniq -c | sort -rn | head`<br \/>\n        echo  \"Emails sent from scripts:\"<br \/>\n        echo  \"$SCRIPTED_EMAILS\"<br \/>\n        echo<br \/>\n    }<\/p>\n<p>    check_for_auth()<br \/>\n    {<br \/>\n        echo \"Checking for auth users...\"<br \/>\n        AUTH_EMAILS=`$GREP '< =' $LOGDIR\/$LOGFILE | egrep -o \" A\\=(fixed|courier|dovecot)_(login|plain):[[:alnum:][:graph:]]*\" | cut -d: -f2 | sort | uniq -c | sort -rn | head`\n        echo  \"Most emails sent by authenticated users:\"\n        echo  \"$AUTH_EMAILS\"\n        echo\n    }\n\n    check_for_account()\n    {\n       echo \"Checking for cpanel\/system accounts...\"\n       ACCOUNT_EMAILS=`$GREP '<=' $LOGDIR\/$LOGFILE | egrep -v \"$LOCAL_DOMAINS\" | grep -v ' U=mailnull' | grep -o \" U=[[:alnum:][:graph:]]*\" | cut -d= -f2 | sort | uniq -c | sort -rn | head`\n       echo  \"Emails sent from cpanel\/system accounts:\"\n       echo  \"$ACCOUNT_EMAILS\"\n       echo\n    }\n\n    check_for_bounces()\n    {\n        echo \"Checking for bounces...\"\n        BOUNCE_BACKS=`$GREP \" U=mailnull.*returning message\" $LOGDIR\/$LOGFILE | grep -o \" for [[:alnum:][:graph:]]*@[[:alnum:][:graph:]]*\" | cut -d' ' -f3 | sort | uniq -c | sort -rn | head`\n        echo  \"Most bounces returned to:\"\n        echo  \"$BOUNCE_BACKS\"\n        echo\n    }\n\n    check_most_domain()\n    {\n        echo \"Checking 'from' addresses...\"\n        MOST_SENT_DOMAIN=`$GREP '<=' $LOGDIR\/$LOGFILE | grep -v mailnull | egrep -v \"$LOCAL_DOMAINS\" | cut -d\" \" -f6 | sort | uniq -c | sort -rn | head`\n        echo  \"Most frequent senders by 'from' address:\"\n        echo  \"Note: Could be forged addresses\"\n        echo  \"$MOST_SENT_DOMAIN\"\n        echo\n    }\n\n    check_most_ip()\n    {\n        echo \"Checking for sender IP...\"\n        MOST_SENT_IP=`$GREP '<=' $LOGDIR\/$LOGFILE | egrep -v \"$LOCAL_DOMAINS\" | grep -o ' H=.*\\ \\[[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\]' | grep -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' | sort | uniq -c | sort -rn | head`\n        echo  \"Most frequent senders by IP address:\"\n        echo  \"$MOST_SENT_IP\"\n        echo\n    }\n\n    check_most_rcpts()\n    {\n        echo \"Checking for recipients...\"\n        MOST_RCPTS=`$GREP '<=' $LOGDIR\/$LOGFILE | grep -v mailnull | egrep -v \"$LOCAL_DOMAINS\" | awk -v NUM_RCPTS=\"$NUM_RCPTS\" ' \n\n            function shift_list(x)\n            {\n                y=x\n                x++\n                while (x <= NUM_RCPTS)\n                {\n                    TOP_RCPTS[x] = TOP_RCPTS[y]\n                    MAIL_ID[x] = MAIL_ID[y]\n                    SENDER_ID[x] = SENDER_ID[y]\n                    x++\n                    y++\n                }\n            }\n    \n            function save_current()\n            {\n                SENDER_ID[CUR_NUM]=$6\n                MAIL_ID[CUR_NUM]=$4\n                TOP_RCPTS[CUR_NUM]=NUM_ADDRESSES\n            }\n    \n            function display_results()\n            {\n                CUR_NUM=1\n                while (CUR_NUM <= NUM_RCPTS) {\n                    print MAIL_ID[CUR_NUM], \"with\", TOP_RCPTS[CUR_NUM], \"recipients was sent by\", SENDER_ID[CUR_NUM]\n                    CUR_NUM++\n                }\n            }\n    \n            function duplicate_check()\n            {\n                x=NUM_RCPTS\n                y=x-1\n                while (x > 0)<br \/>\n                {<br \/>\n                    if (MAIL_ID[x] == MAIL_ID[y])<br \/>\n                    {<br \/>\n                        MAIL_ID[x]=0<br \/>\n                        TOP_RCPTS[x]=0<br \/>\n                        SENDER_ID[x]=0<br \/>\n                    }<br \/>\n                    x--<br \/>\n                    y--<br \/>\n                 }<br \/>\n            }<\/p>\n<p>            BEGIN {<br \/>\n                CUR_NUM=NUM_RCPTS<br \/>\n                while (CUR_NUM > 0){<br \/>\n                    MAIL_ID[CUR_NUM] = 0<br \/>\n                    TOP_RCPTS[CUR_NUM] = 0<br \/>\n                    SENDER_ID[CUR_NUM] = 0<br \/>\n                    CUR_NUM--<br \/>\n              }<br \/>\n            }<\/p>\n<p>            {<br \/>\n                split($0,RCPTS_TMP,\"from.*for \")<br \/>\n                split(RCPTS_TMP[2],RCPTS,\" \")<\/p>\n<p>                NUM_ADDRESSES=0<br \/>\n                for (ADDRESSES in RCPTS)<br \/>\n                     ++NUM_ADDRESSES<br \/>\n                CUR_NUM=1<br \/>\n                for (EACH in TOP_RCPTS)<br \/>\n                {<br \/>\n                    if (NUM_ADDRESSES > TOP_RCPTS[CUR_NUM])<br \/>\n                    {<br \/>\n                        shift_list(CUR_NUM)<br \/>\n                        save_current()<br \/>\n                        duplicate_check()<br \/>\n                        break<br \/>\n                    }<br \/>\n                    CUR_NUM++<br \/>\n                }<br \/>\n            }<br \/>\n            END {<br \/>\n                display_results()<br \/>\n            }<\/p>\n<p>        '`<br \/>\n        echo  \"Most recipients by Mail and Sender ID's:\"<br \/>\n        echo  \"$MOST_RCPTS\"<br \/>\n    }<\/p>\n<p>    # This is where the functions that were declared above<br \/>\n    # Are actually called, if their variables are set to true<\/p>\n<p>    if [ $CHECK_FOR_SCRIPTS = \"true\" ]; then<br \/>\n        check_for_scripts<br \/>\n    fi<\/p>\n<p>    if [ $CHECK_FOR_AUTH = \"true\" ]; then<br \/>\n        check_for_auth<br \/>\n    fi<\/p>\n<p>    if [ $CHECK_FOR_ACCOUNT = \"true\" ]; then<br \/>\n        check_for_account<br \/>\n    fi<\/p>\n<p>    if [ $CHECK_FOR_BOUNCES = \"true\" ]; then<br \/>\n        check_for_bounces<br \/>\n    fi<\/p>\n<p>    if [ $CHECK_MOST_DOMAIN = \"true\" ]; then<br \/>\n        check_most_domain<br \/>\n    fi<\/p>\n<p>    if [ $CHECK_MOST_IP = \"true\" ]; then<br \/>\n        check_most_ip<br \/>\n    fi<\/p>\n<p>    if [ $CHECK_MOST_RCPTS = \"true\" ]; then<br \/>\n        check_most_rcpts<br \/>\n    fi<\/p>\n<p>}<\/p>\n<p>#############################################<br \/>\n#############################################<br \/>\n# Function to check the emails in the queue #<br \/>\n#############################################<br \/>\n#############################################<br \/>\ncheck_queue()<br \/>\n{<br \/>\n    #Function that stops the find command after X number of seconds<br \/>\n    kill_it()<br \/>\n    {<br \/>\n        sleep $queue_timeout<br \/>\n        PID=`ps aux | grep \"find \/var\/spool\/exim\/input\" | grep -v grep | awk '{print $2}'`<br \/>\n        if [ -n \"${PID}\" ]; then<br \/>\n            kill $PID<br \/>\n        fi<br \/>\n    }<\/p>\n<p>    # Set timer for parsing the queue unless it is 0 (unlimited)<br \/>\n    if [ \"$queue_timeout\" != \"0\" ]; then<br \/>\n        kill_it &<br \/>\n    fi<\/p>\n<p>    # Find emails in exim's spool folder<br \/>\n    queue_tmp=`find \/var\/spool\/exim\/input -name '*-H' | sed '$d' | xargs grep 'auth_id'`<br \/>\n    echo \"Done finding emails, starting to parse\"<\/p>\n<p>    # Parse the queue_tmp variable to sort by auth_id<br \/>\n    queue_senders=`echo -e \"$queue_tmp\" | cut -d: -f2 | sort | uniq -c | sort -rn | head -n5`<\/p>\n<p>    echo -e \"Parsed `echo -e \"$queue_tmp\" | wc -l` emails out of $queue_total in the queue with a $queue_timeout second timeout\"<br \/>\n    echo -e \"Highest number of emails in queue by auth_id:\"<br \/>\n    echo -e \"$queue_senders\"<br \/>\n    echo \"\"<\/p>\n<p>    queue_senders_tmp=`echo \"$queue_senders\" | awk '{print $3}'`<\/p>\n<p>    for each in `echo \"$queue_senders_tmp\"`<br \/>\n    do<br \/>\n        echo \"Example emails sent by $each:\"<br \/>\n        echo \"$queue_tmp\" | grep $each | cut -d: -f1 | head -n5<br \/>\n        echo \"\"<br \/>\n    done<br \/>\n}<\/p>\n<p>clear<br \/>\nspamfu_init<br \/>\n<\/code><\/p>\n<p>To install this script<\/p>\n<p><code><br \/>\nwget -O \/scripts\/spamfu.sh  http:\/\/layer3.liquidweb.com\/scripts\/spamfu.sh<br \/>\nor<br \/>\ntouch \/scripts\/spamfu.sh<br \/>\nchmod +x \/scripts\/spamfu.sh<br \/>\n\/scripts\/spamfu.sh<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To identify PHP Spam when running PHP 5.3 or higher: (Please note the variables below are not enabled by default in php.ini) utilize the following php.ini variable to narrow down the offending script. If you suspect there is a PHP script sending out email (and it is still doing so) try adding these two lines:&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5913","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Identifying PHP Spam - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Identifying PHP Spam - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"To identify PHP Spam when running PHP 5.3 or higher: (Please note the variables below are not enabled by default in php.ini) utilize the following php.ini variable to narrow down the offending script. If you suspect there is a PHP script sending out email (and it is still doing so) try adding these two lines:... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-19T14:32:47+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Identifying PHP Spam\",\"datePublished\":\"2014-01-19T14:32:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/\"},\"wordCount\":359,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/\",\"name\":\"Identifying PHP Spam - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2014-01-19T14:32:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/identifying-php-spam\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Identifying PHP Spam\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Identifying PHP Spam - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/","og_locale":"en_US","og_type":"article","og_title":"Identifying PHP Spam - Linux Shtuff","og_description":"To identify PHP Spam when running PHP 5.3 or higher: (Please note the variables below are not enabled by default in php.ini) utilize the following php.ini variable to narrow down the offending script. If you suspect there is a PHP script sending out email (and it is still doing so) try adding these two lines:... Read More","og_url":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2014-01-19T14:32:47+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Identifying PHP Spam","datePublished":"2014-01-19T14:32:47+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/"},"wordCount":359,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/","url":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/","name":"Identifying PHP Spam - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2014-01-19T14:32:47+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/identifying-php-spam\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/identifying-php-spam\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Identifying PHP Spam"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/5913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=5913"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/5913\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=5913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=5913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=5913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}