GSocket: a hidden backdoor on hacked cPanel/PHP sites
According to Microsoft, after exploiting a web flaw, attackers install the open-source client on the server with a script downloaded via curl. The client lands in the in-memory folder, runs disguised as a system process, and restarts itself through , and shell startup files. It connects outward to a public , so there is no attacker IP address or domain to block. In 63.9% of cases the entry point was a PHP application or cPanel hosting, in 24.3% Apache, and detections rose 356% from March to August. The lesson: updating the vulnerable plugin is only half the fix; the access left behind has to be hunted down separately. Telltale signs: a /dev/shm/.gs-0/ folder, a /tmp/.gsn_ora file, a file or process named systemd-remount-d or defunct, a process named [kaluad], defunct.service, and the download addresses gsocket.io and gsgg.b-cdn.net.
1. Check: cPanel → Terminal (or SSH) as your own user. On CageFS hosting you only see your own files and processes; that's fine.
crontab -l # unknown line, curl/wget, /dev/shm or /tmp path?
ls -la /dev/shm /tmp 2>/dev/null | grep -Ei '\.gs|gsn_ora|systemd-remount|defunct'
ps -u "$USER" -o pid,args | grep -Ei 'gs-netcat|gsocket|systemd-remount|defunct|kaluad' | grep -v grep
grep -nEi 'gsocket|gs-netcat|GS_SECRET|GS_TG_TOKEN|/dev/shm' ~/.bashrc ~/.bash_profile ~/.profile 2>/dev/null2. Backup: if anything turns up, first save the crontab and the list of files found as evidence: crontab -l > ~/crontab-backup.txt.
3. Do it: don't try to clean it up on your own. Tell your hosting provider (they need to examine the account), change the cPanel, FTP, WordPress admin and database passwords, and update all plugins.
4. Check afterwards: the commands above return nothing, and a full scan by your security plugin (e.g. Wordfence) reports no modified files.
Rollback: not needed (read-only commands).
/dev/shm and /tmp with the option. Type your question and open it in your favourite AI chat. The item's background is added automatically. Nothing is stored on our side.