chroot sshã®ã¨ãã«åºã¦ããã®ã§åå¼·ããããã§ãã£ã¦linuxã®å ±æã©ã¤ãã©ãªã®ãã¨ãå°ãå¦ç¿ãããlsã¨ãcdã¨ãã®ãã¤ããªã®ã³ãã³ãã¯ãããåä½ã ãã§å®è¡ã§ãããã®ã ã¨æã£ã¦ã¾ãããã§ãããã¯å¤§ééãã§ãè²ããªå ±æã©ã¤ãã©ãªã«ä¾åãã¦ãããã§ãã
hoge@hoge % ldd /bin/ls linux-gate.so.1 => (0xffffe000) librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7edf000) libacl.so.1 => /lib/libacl.so.1 (0xb7ed6000) libselinux.so.1 => /lib/libselinux.so.1 (0xb7ec3000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d94000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7d82000) /lib/ld-linux.so.2 (0xb7efb000) libattr.so.1 => /lib/libattr.so.1 (0xb7d7e000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d7b000) libsepol.so.1 => /lib/libsepol.so.1 (0xb7d42000)
ããããã¨lsã使ã£ã¦ãã©ã¤ãã©ãªãããããåºã¦ããããã¼ããªã®ã§ãã®è¾ºã®ãã¡ã¤ã«ç¾¤ããªãã¨lsåºæ¥ãªãããã§ããªã
â詳ããã¯ãã®è¾ºåç §
UNIXã®é¨å± æ¤ç´¢:ldd
ãã ããã®ãã¼ã¸ã«ã¯
ãã OS ã®èµ·åæã«ä½ãä¸å ·åããã£ã¦ã·ã³ã°ã«ã¦ã¼ã¶ã¢ã¼ãã§èµ·åããã¨ãã/bin/ls ã /bin/mount ã/usr/lib/libc.* ãå¿ è¦ã¨ããã¨ãããã/usr ããã¦ã³ãããã¦ããªãã¨å¾©æ§ä½æ¥ã¯ã§ããªããªã£ã¦ãã¾ãããã®ããã/binã/sbin ãªã©ã®ã³ãã³ãã¯ã©ã³ã¿ã¤ã ã©ã¤ãã©ãªãå¿ è¦ã¨ããªãããã«ä½ããã¦ããã
ã¨ãªã£ã¦ãã®ãä¸æè°ã§ããunixã¨linuxã®éãã¨ããªãã§ããããã¨ããããæ°ã«ããªãã§ãããã
linux-gate.so.1
ãããããã¡ãã£ã¨åµã£ã¦ãã¾ã£ãã®ãã/bin/lsãlddããã¨ãã®1åç®ã®"linux-gate.so.1"ã£ã¦ãã¡ã¤ã«ãããã ããç¹æ®ã大æµã®ã©ã¤ãã©ãªã¯ã·ã³ããªãã¯ãªã³ã¯ã§å¥ã®ãã¡ã¤ã«ãåç
§ãã¦ããä¸ãã4ã¤ç®ã®ã¯ãã«ãã¹ã§ãã¡ã¤ã«ãã®ãã®ã表示ããã¦ããããã¼1åç®ã®ã¯ä½ãããã¨ãfindãã¦ãlocateãã¦ãåºã¦ããªãããããã¼æ°ã«ãªãã
ã¨æ©ãã§ããã¨ãããæã£ã¦ãããã®ã次ã®webãã¼ã¸ã
Stray Penguin - Linux Memo (jail-2)
ä¸çªä¸ã® linux-gate.so.1 ã¯ãå®ä½ããç¡ããã¤ã¾ãã«ã¼ãã«ã«ã¹ã¿ãã£ãã¯ã³ã³ãã¤ã«ãããã©ã¤ãã©ãªãªããã§ãããããªãã¡ã¤ã«ã©ãæ¢ãã¦ãç¡ããããªããï¼ãã¨æ©ãå¿ è¦ã¯ãªãã
ãã¼ãªãã»ã©ï¼ããã§è§£æ±ºã ãchroot-sshã®memoã¯ã¾ãå¾æ¥ã