60 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{#include ../banners/hacktricks-training.md}}
# 基本信息
从 [这里](http://hacking-printers.net/wiki/index.php/Port_9100_printing)原始打印是我们定义的连接到网络打印机的9100/tcp端口的过程。这是CUPS和Windows打印架构与网络打印机通信的默认方法因为它被认为是“_用于打印机的最简单、最快且通常是最可靠的网络协议_”。原始9100端口打印也称为JetDirect、AppSocket或PDL数据流实际上**本身并不是打印协议**。相反,**所有发送的数据都由打印设备直接处理**就像通过TCP的并行连接一样。与LPD、IPP和SMB相比这可以向客户端发送直接反馈包括状态和错误消息。这样的**双向通道**使我们能够直接**访问** **PJL**、**PostScript**或**PCL**命令的**结果**。因此原始9100端口打印——几乎所有网络打印机都支持——被用作与PRET和PFT进行安全分析的通道。
如果你想了解更多关于[**黑客打印机的信息,请阅读此页面**](http://hacking-printers.net/wiki/index.php/Main_Page)。
**默认端口:** 9100
```
9100/tcp open jetdirect
```
# 枚举
## 手动
```bash
nc -vn <IP> 9100
@PJL INFO STATUS #CODE=40000 DISPLAY="Sleep" ONLINE=TRUE
@PJL INFO ID # ID (Brand an version): Brother HL-L2360D series:84U-F75:Ver.b.26
@PJL INFO PRODINFO #Product info
@PJL FSDIRLIST NAME="0:\" ENTRY=1 COUNT=65535 #List dir
@PJL INFO VARIABLES #Env variales
@PJL INFO FILESYS #?
@PJL INFO TIMEOUT #Timeout variables
@PJL RDYMSG #Ready message
@PJL FSINIT
@PJL FSDIRLIST
@PJL FSUPLOAD #Useful to upload a file
@PJL FSDOWNLOAD #Useful to download a file
@PJL FSDELETE #Useful to delete a file
```
## 自动化
```bash
nmap -sV --script pjl-ready-message -p <PORT> <IP>
```
```bash
msf> use auxiliary/scanner/printer/printer_env_vars
msf> use auxiliary/scanner/printer/printer_list_dir
msf> use auxiliary/scanner/printer/printer_list_volumes
msf> use auxiliary/scanner/printer/printer_ready_message
msf> use auxiliary/scanner/printer/printer_version_info
msf> use auxiliary/scanner/printer/printer_download_file
msf> use auxiliary/scanner/printer/printer_upload_file
msf> use auxiliary/scanner/printer/printer_delete_file
```
## 打印机黑客工具
这是您想要用来滥用打印机的工具:
{{#ref}}
https://github.com/RUB-NDS/PRET
{{#endref}}
# **Shodan**
- `pjl port:9100`
{{#include ../banners/hacktricks-training.md}}