{"id":28991325,"url":"https://github.com/prdn/ksb","last_synced_at":"2025-06-25T01:16:19.104Z","repository":{"id":293402708,"uuid":"634600861","full_name":"prdn/ksb","owner":"prdn","description":"sb26 [Kernel Socks Bouncer] is a Linux Kernel 2.6.x Loadable Kernel Module that that redirects tcp connection (to user-defined target hosts) through socks 4/5 chains.","archived":false,"fork":false,"pushed_at":"2023-04-30T16:51:49.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T06:44:58.783Z","etag":null,"topics":["kernel","privacy","security"],"latest_commit_sha":null,"homepage":"https://ksb.sourceforge.net/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prdn.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-30T16:51:35.000Z","updated_at":"2024-10-02T19:54:30.000Z","dependencies_parsed_at":"2025-05-15T22:46:29.170Z","dependency_job_id":null,"html_url":"https://github.com/prdn/ksb","commit_stats":null,"previous_names":["prdn/ksb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prdn/ksb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdn%2Fksb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdn%2Fksb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdn%2Fksb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdn%2Fksb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prdn","download_url":"https://codeload.github.com/prdn/ksb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prdn%2Fksb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261783470,"owners_count":23208957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kernel","privacy","security"],"created_at":"2025-06-25T01:16:14.769Z","updated_at":"2025-06-25T01:16:19.091Z","avatar_url":"https://github.com/prdn.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Kernel Socks Bouncer for 2.6.x kernels\n\n\n0] HOW ksb26 WORKS\n1] HOW TO INSTALL ksb26\n2] CONCLUSION\n\n0] HOW ksb26 WORKS and WHY A KERNEL MODULE? \n\n\n* ksb26 redirects connections through a chain of SOCKS5 servers to improve your \n  anonimity on the Net.\n\n* I have choosen this implementation to:\n\t* add support to ALL userspace programs that use kernel's sys_connect system call.\n\t* enjoy myself writing in kernel space.\n\n\n1] HOW TO INSTALL ksb26\n\n1.0] Installation script [ Recommended ]\n\nDefault path of the Linux kernel source directory is:\nkernel_dir=/usr/src/linux\nDefault path for the installation of ksb26manager [userspace tool] is:\nbin_dir=/usr/bin\nYou can modify this two path simply editing install.sh\nTo install ksb26 simply run ./install.sh \nThis script: \n* builds ksb26 Linux kernel module and copies it to\n/lib/modules/2.6.x/extra\n* copies ksb26manager, the managment tool, to /usr/bin [default]\n\n1.1] Manual installation\n\n* Unpack ksb26-x-x-x.tar.gz archive:\n~# mv ksb26-x-x-x.tar.gz /usr/src\n~# cd /usr/src\n~# tar zxvf ksb26.tar.gz\n\n* Build ksb26.c running makemod.sh shell script:\n~# cd /usr/src/ksb26/kernel/\n~# ./makemod.sh\n\n* Copy ksb26.ko to /lib/modules/2.6.x/extra [where 2.6.x is the version\nof the Linux Kernel you're using].\n\n* Copy ksb26manager [ksb26 Manager] to /usr/bin\n[For more informations about ksb26manager read 1.4]\n\n1.2] Loading ksb26 module and /dev/ksb26 device creation\n~# modprobe ksb26 // loads the module with default values\n~# modprobe ksb26 nsocks=N // loads the module; ksb26 will use a chain\n\t\t\t\tof N SOCKS [Ex. nsocks=3].\n[~# insmod /lib/modules/2.6.x/extra/ksb26.ko ]\n\n* Create a character device in /dev directory using major number of ksb26 kernel module.\nTo detect major number read dmesg kernel logs running for example:\n~# dmesg\nor\n~# cat /var/log/messages\nBetween messages of ksb26 module there's this string:\n[ksb26] Major device number = num\n~# mknod /dev/ksb26 c num 0 // creates the char device\n\n1.3] /dev/ksb26 device\n/dev/ksb26 is the character device used by ksb26 to keep SOCKS and target hosts lists updated.\nStrings formats accepted:\n* ip addresses and port of SOCKS5\n* ip addresses of target hosts [when ksb26 finds a new connection from localhost\nto that host, this connection will pass through a SOCKS chain before reach the target host]\n* clear SOCKS list string [ csl ] : ksb26 clears the SOCKS list\n\nSocks format :\nS=socks_ip:socks_port\n\nManual submission of a new SOCKS: ~# echo \"S=127.0.0.1:1080\" \u003e /dev/ksb26\n\nIf you use ksb26manager you can set a default socks list in /etc/ksb26/socks that will be loaded\nautomatically by the userspace tool .\n\nIf you don't use ksb26manager you can create a new file as this below:\nexample:\nS=127.0.0.1:1080\nand then:\n~# cat socks.txt \u003e /dev/ksb26\n\nTo add a new target host to the list [if you use the userspace manager see /etc/ksb26/thosts]:\nH=host_ip:host_port\nIf host_ip is *, connection directed to all IPs will be redirected.\nIf host_port is 0, all connection directed to that host will be redirected through a Socks chain.\nexample:\nH=*:22\nH=192.168.0.1:22\nH=192.168.0.2:0\nH=*:0 [deprecated]\n\nTo clear SOCKS list:\nC\n\n1.4] ksb26manager\nis the userspace manager for ksb26 lkm. It needs wget, egrep and sed to work.\n[You don't need ksb26manager. You can add SOCKS and target hosts manually via /dev/ksb26 character device]\nksb26manager keeps updated the SOCKS list using http://ksb26.sourceforge.net/socks/socks5.php\n\nksb26manager [-h] [-d ksb26_device] [-m ksb26_lkm_name] [-n nsocks] [-t thosts_file] [-w wait_time]\n[-d ksb26_device]: character device used by ksb26\n[-m ksb26_lkm_name]: lkm's name to use in modprobe command\n[-n nsocks]: number of SOCKS used in chains\n[-t thosts_file]: file containing target hosts [default /etc/ksb26/thosts]\n[-s socks_file]: file containing default socks list [default /etc/ksb26/thosts]\n[-w wait_time]: number of seconds to wait before updating the SOCKS list\n[-h]: help\n\n2] CONCLUSION\nFor any question, problem or request write me to:\npaolo.ardoino@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprdn%2Fksb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprdn%2Fksb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprdn%2Fksb/lists"}