hacktricks/linux-unix/privilege-escalation/exploiting-yum.md

3.8 KiB

{% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %} {% endhint %}

Dalji primeri oko yum-a mogu se naći na gtfobins.

Izvršavanje proizvoljnih komandi putem RPM paketa

Proveravanje okruženja

Da bi se iskoristio ovaj vektor, korisnik mora biti u mogućnosti da izvršava yum komande kao korisnik sa višim privilegijama, tj. root.

Radni primer ovog vektora

Radni primer ovog eksploita može se naći u daily bugle sobi na tryhackme.

Pakovanje RPM-a

U sledećem odeljku, pokriću pakovanje reverzne ljuske u RPM koristeći fpm.

Primer ispod kreira paket koji uključuje trigger pre instalacije sa proizvoljnim skriptom koji može biti definisan od strane napadača. Kada se instalira, ovaj paket će izvršiti proizvoljnu komandu. Koristio sam jednostavan primer reverzne netcat ljuske za demonstraciju, ali ovo se može promeniti po potrebi.

{% 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">\
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)

<details>

<summary>Support HackTricks</summary>

* Check the [**subscription plans**](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)**.**
* **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>
{% 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 %}
</details>
{% endhint %}
</details>
{% endhint %}
</details>
{% endhint %}
</details>
{% endhint %}