Skip to main content

Linux Container LXD

"LXD is a system container and virtual machine manager that uses LXC to create and manage the containers."

Install LXD on Fedora Workstation 32

$ sudo snap install lxd
lxd 4.9 from Canonical✓ installed
$ which lxd
/var/lib/snapd/snap/bin/lxd
$ lxd --version
4.9

Install LXD on Alpine Linux

$ sudo apk add lxd

$ which lxd
/usr/sbin/lxd
$ lxd version
5.0.2

Debian 9 on LXD


lxc launch images:debian/stretch debian901
lxc exec debian901 -- /bin/bash
cat /etc/*release

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Add alias to existing image

$ lxc image ls
+-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
| ALIAS | FINGERPRINT  | PUBLIC |               DESCRIPTION               |  ARCH  |  SIZE  |         UPLOAD DATE         |
+-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
|       | de84726269bd | no     | Alpinelinux 3.12 x86_64 (20210104_0506) | x86_64 | 0.00MB | Jan 5, 2021 at 2:34am (UTC) |
+-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
$ lxc image alias create newalpine de84726269bd
$ lxc image ls
+-----------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
|   ALIAS   | FINGERPRINT  | PUBLIC |               DESCRIPTION               |  ARCH  |  SIZE  |         UPLOAD DATE         |
+-----------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
| newalpine | de84726269bd | no     | Alpinelinux 3.12 x86_64 (20210104_0506) | x86_64 | 0.00MB | Jan 5, 2021 at 2:34am (UTC) |
+-----------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+
$

Practice

>>> THM | Gaming Server - Exploit LXD Container to get root flag

>>> THM | toc2

>>> THM | HA Joker CTF

Popular posts from this blog

Windows 10 1903 Critical Error: Your Start menu isn't working

Windows 10 1903 Critical Error: Your Start menu isn't working. We'll try to fix it the next time you sign in.

[PowerShell]: Powershell script uploading backup databases to ftp server

Author:  Enrique Puig Nouselles http://gallery.technet.microsoft.com/scriptcenter/80647f66-139c-40a4-bb7a-04a2d73d423c Nhu cầu - Học sử dụng Powershell và áp dụng vào thực tế - Server chạy MS SQL được backup mỗi ngày và lưu các file backup ở folder mặc định "C:/Program Files/Microsoft SQL Server/MSSQL11.MSSQLSERVER/MSSQL/Backup" - Upload các file database backup về một ftp server khác để lưu "offsite" # Begin script # Thanks to: Enrique Puig Nouselles http://gallery.technet.microsoft.com/scriptcenter/80647f66-139c-40a4-bb7a-04a2d73d423c # Khai báo folder chứa các file backup database, dưới đây là folder backup mặc định của MS SQL 2012 $Dir="C:/Program Files/Microsoft SQL Server/MSSQL11.MSSQLSERVER/MSSQL/Backup"   # ftp server $ftp = "ftp://IPAddres/subfolder/subsubfolder" $user = "usernamehere" $pass = "passwordhere" # DO NOT use $(Get-Date), use $d variable instead, otherwise SQL Agent gets error "The...