Last active
December 20, 2015 07:39
-
-
Save wcypierre/6095072 to your computer and use it in GitHub Desktop.
Copy binary with dependencies into a folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp /bin/sh /var/chroot/sshd/bin/;\ | |
ldd /bin/sh|awk '{print $3}'|grep -e '^/'|xargs -I{} cp -v --parent '{}' /var/chroot/sshd/ | |
Credits to: http://blog.jandorsman.com/2011/10/copying-a-binary-and-its-shared-libraries-to-a-chrooted-directory/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment