jk_check(8)
hey bestie! β¨ welcome to the jk_check(8) page β this is the manual for jk_check, a utility that will check a jail for security problems. let's get into it π
πΈ NAME πΈ
jk_check β a utility that will check a jail for security problems. π
β¨ SYNOPSIS β¨
jk_check jail
jk_check -v -c configfile jail
π¦ DESCRIPTION π¦
okay so jk_check will run several tests on all files and directories in a jail. the tests are:
- -test for setuid (set user id) or setgid (set group id) files
- -test for file modifications, using an MD5 checksum on the file in the jail and the same file in the real root
- -test for group writable or world writable directories
- -test for matching user information in the jail and on the real system
It will test directories based on the config file /etc/jailkit/jk_check.ini but also based on jail patterns (dir/./dir) found in the home directories in /etc/passwd.
π EXAMPLE π
Minimal configfile
The most minimal configuration looks like:
[/home/testchroot]
This will include all the files and directories in /home/testchroot for testing. β¨
More extended configfile
Often you want to ignore some tests on some directories, the following configfile shows some examples:
[/home/testchroot]
ignorepatheverywhere =
ignorepathoncompare = /home/testchroot/home, /home/testchroot/etc
ignorewritableforgroup = /home/testchroot/home
ignorewritableforothers = /home/testchroot/home/tmp
ignoresetuidexecuteforuser = /home/testchroot/usr/bin/smbmnt
ignoresetuidexecuteforgroup = /home/testchroot/usr/bin/smbmnt
ignoresetuidexecuteforothers =
ignorepatheverywhereβ no single test is performed in these directories. You should not use this option unless you what you are doing.ignorepathoncompareβ files in listed directories are not compared with their non-jail counterparts. Useful for directories like/etc/and/home/where you know you'll have different files inside the jail and outside the jail.ignorewritableforgroupβ listed directories that are writable for the group are not reported.ignorewritableforothersβ listed directories that are writable for others are not reported.ignoresetuidexecuteforuserβ ignore the setuid bit on a file that is executable for a user, a file with-rws------permissions that is. Use with care! Remember that user root can break out of a jail, therefore any program running with root privileges is theoretically capable of breaking out of the jail!ignoresetuidexecuteforgroupβ ignore the setuid bit for a file that is executable for the group, a file with-rws--x---permissions that is.ignoresetuidexecuteforothersβ ignore the setuid bit for a file that is executable for others, a file with-rws--x--xpermissions that is.
π OPTIONS π
-vβ Will give verbose output.-c configfileβ Use alternative configfile.-hβ The help screen.
π FILES π
/etc/jailkit/jk_check.ini
π₯ SEE ALSO π₯
jailkit(8) jk_chrootlaunch(8) jk_chrootsh(8) jk_cp(8) jk_init(8) jk_jailuser(8) jk_list(8) jk_lsh(8) jk_procmailwrapper(8) jk_socketd(8) jk_uchroot(8) jk_update(8) chroot(2)
π COPYRIGHT π
Copyright (C) 2003, 2004, 2005, 2006, 2007, Olivier Sessink
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
this page was brought to you by JAILKIT, version 07-02-2010, and the jk_check(8) manual. mwah π stay safe out there bestie!
π¦ where this page comes from
- debian bookworm: jailkit 2.23-2 Β· BSD-3-Clause
- debian trixie: jailkit 2.23-2+b1 Β· BSD-3-Clause
- ubuntu jammy: jailkit 2.23-1 Β· BSD-3-Clause
- ubuntu noble: jailkit 2.23-2 Β· BSD-3-Clause
- ubuntu questing: jailkit 2.23-2
- ubuntu resolute: jailkit 2.23-3 Β· BSD-3-Clause
- ubuntu stonking: jailkit 2.23-3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms