Created
January 15, 2016 22:50
-
-
Save eric-lopez/d0321112cc1678566c7e to your computer and use it in GitHub Desktop.
backdoor astara qcow image
This file contains 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
To backdoor an astara qcow image: | |
1. Download astara image qcow image | |
2. As root, enable Network Block Device in Kernel | |
% modprobe nbd | |
3. As root, create a network bood device of the qcow image with QEMU NBD tool: | |
% qemu-nbd -c /dev/nbd1 astara.qcow2 | |
4. As root, Mount the create network boot device to the filesystem: | |
% mount /dev/nbd1p1 /mnt | |
5. As root, change root directory for shell instance to the mount point | |
% chroot /mnt | |
6. Add new user to base image | |
% useradd <username> | |
7. Set password of the user: | |
% passwd <username> | |
8. Add sudo privelages for new user: | |
% vi /etc/sudoers.d/90debuguser | |
'<username> ALL=(ALL) NOPASSWD:ALL' | |
9. then umount network device from filesystem and device tree: | |
% umount /mnt | |
% qemu-nbd -d /dev/nbd1 | |
10. upload astara.qcow2 to glance | |
11. update orchestraotr.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment