April 2005
Intermediate to advanced
344 pages
11h 59m
English
The hide_sshd.c source code assumes we are
trying to hide the presence of sshd running on a
host. If you want to hide any other service, change the value of
PORT_TO_HIDE. For the purposes of this section, we
assume that sshd is running on the host. Make sure
by running netstat:
[notroot]$ netstat -na | grep 22
tcp 0 0.0.0.0:22 0.0.0.0:* LISTENUse the following makefile:
obj-m += hide_sshd.o
Compile using the following make command:
[notroot]$ make -C /usr/src/linux-`uname -r` SUBDIRS=$PWD modulesInsert the module:
[root]# insmod ./hide_sshd.koNow sshd will not be visible. Try the
netstat query again:
[notroot]# netstat -na | grep 22Unload the module when done:
[root]# rmmod hide_sshdRead now
Unlock full access