Kernel Socks Bouncer is a loadable module for Linux Kernel 2.6.x that redirects TCP connections.
The software is divided into two parts: ksb26 lkm (Linux Loadable Kernel Module) and a userspace manager. The ksb26 lkm intercepts and redirects tcp connections, while the ksb26manager keeps the SOCKS list updated and loads target hosts lists via a character device.
To load the ksb26 lkm, users can use the modprobe ksb26 [nsocks=N] or insmod /lib/modules/2.6.x/extra/ksb26.ko command. The [nsocks=N] option sets the number of SOCKS used in chain to N.
To detect the major number, users can read dmesg kernel logs running for example, dmesg or cat /var/log/messages. Between messages of ksb26 module, users will find the string: [ksb26] Major device number = num. To create the character device, users can use the command: mknod /dev/ksb26 c num 0.
The ksb26manager is the userspace manager for ksb26 lkm. It needs wget, egrep, and sed to work. However, users can add SOCKS and target hosts manually via /dev/ksb26 character device.
The ksb26manager keeps updated the SOCKS list using various options such as [-h], [-d ksb26_device], [-m ksb26_lkm_name] [-n nsocks], [-t thosts_file], [-w wait_time], [-s socks_file]. Users can add a new SOCKS server or a new target host to the list using different string formats.
If users use ksb26manager, they can set a default socks list in /etc/ksb26/socks that will be loaded automatically by the userspace tool. If they don't use ksb26manager, a new file can be created, and the list can be added using the command: cat socks.txt > /dev/ksb26.
The latest release of the software adds a small bugfix and support for a default socks list in ksb26manager which is useful if users use TOR. Overall, ksb26 is a great tool for redirecting tcp connections through socks 4/5 chains.
Version 0.0.4: N/A