<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://hacking-printers.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=78.48.214.196</id>
		<title>Hacking Printers - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://hacking-printers.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=78.48.214.196"/>
		<link rel="alternate" type="text/html" href="http://hacking-printers.net/wiki/index.php?title=Special:Contributions/78.48.214.196"/>
		<updated>2026-06-22T11:23:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.4</generator>

	<entry>
		<id>http://hacking-printers.net/wiki/index.php?title=Factory_defaults&amp;diff=104</id>
		<title>Factory defaults</title>
		<link rel="alternate" type="text/html" href="http://hacking-printers.net/wiki/index.php?title=Factory_defaults&amp;diff=104"/>
				<updated>2017-01-11T10:12:17Z</updated>
		
		<summary type="html">&lt;p&gt;78.48.214.196: Created page with &amp;quot;Resetting a device to factory defaults is a security-critical functionality as it overwrites protection mechanisms like user-set passwords. This can usually be done by pressin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Resetting a device to factory defaults is a security-critical functionality as it overwrites protection mechanisms like user-set passwords. This can usually be done by pressing a special key combination on the printer's control panel. Performing such a cold reset only takes seconds and therefore is a realistic scenario for local attackers or penetration testers, who can for example sneak into the copy room at lunchtime. However, physical access to the device is not always an option. The question comes up, if printer vendors have implemented the possibility to perform factory resets on-line using printer control or page description languages.&lt;br /&gt;
&lt;br /&gt;
== SNMP ==&lt;br /&gt;
&lt;br /&gt;
The Printer-MIB &amp;lt;ref&amp;gt;''[https://www.ietf.org/rfc/rfc3805.txt RFC3805: Printer MIB v2]'', R. Bergman, I. McDonald and H. Lewis, 2004&amp;lt;/ref&amp;gt; defines the ''prtGeneralReset'' Object (OID 1.3.6.1.2.1.43.5.1.1.3.1) which allows an attacker to restart the device (''powerCycleReset(4)''), reset the NVRAM settings (''resetToNVRAM(5)'') or restore factory defaults (''resetToFactoryDefaults(6)'') using [[SNMP]]. Resetting the device to factory default can be accomplished using ''snmpset'' command as shown below:&lt;br /&gt;
&lt;br /&gt;
  $ snmpset -v1 -c public printer 1.3.6.1.2.1.43.5.1.1.3.1 i 6&lt;br /&gt;
&lt;br /&gt;
This feature/attack is supported by a large variety of printers and removes all protection mechanisms like user-set passwords for the embedded web server. While protection mechanisms can be efficiently bypassed, a practical drawback of this approach is that all static IP address configuration will be lost. If no [[DHCP]] service is available, the attacker will not be able to reconnect to the device anymore after resetting it to factory defaults.&lt;br /&gt;
&lt;br /&gt;
== PML ==&lt;br /&gt;
&lt;br /&gt;
In many scenarios an attacker does not have the capabilities to perform SNMP requests because of firewalls or unknown SNMP community strings. On HP devices however, SNMP can be transformed into its [[PML]] representation and embed the request within a legitimate print job. This allows to restart and/or reset the device to factory defaults as shown below:&lt;br /&gt;
&lt;br /&gt;
  @PJL DMCMD ASCIIHEX=&amp;quot;040006020501010301040106&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== How to test this attack? ===&lt;br /&gt;
&lt;br /&gt;
On HP printers, restarting or resetting the device can easily be reproduced using [[PRET]]:&lt;br /&gt;
&lt;br /&gt;
 ./pret.py -q printer pjl&lt;br /&gt;
 Connection to printer established&lt;br /&gt;
 &lt;br /&gt;
 Welcome to the pret shell. Type help or ? to list commands.&lt;br /&gt;
 printer:/&amp;gt; reset&lt;br /&gt;
 printer:/&amp;gt; restart&lt;br /&gt;
&lt;br /&gt;
== PostScript ==&lt;br /&gt;
&lt;br /&gt;
PostScript offers a similar feature: The ''FactoryDefaults'' system parameter, ‘a flag that, if set to true immediately before the printer is turned off, causes all nonvolatile parameters to revert to their factory default values at the next power-on’ &amp;lt;ref&amp;gt;''[https://www.adobe.com/products/postscript/pdfs/PLRM.pdf PostScript Language Reference Manual, 3rd Edition]'', Adobe Systems Inc., 1999, p. 751&amp;lt;/ref&amp;gt;. Restarting the printer on the other hand can be accomplished by SNMP and PML as described above. It must be noted that PostScript itself also has the capability to restart its environment but it requires a [[Credential disclosure|valid password]]. The PostScript interpreter however can be put into an infinite loop as discussed in [[eval-transmission-channel]] which forces the user to manually restart the device and thus reset the PostScript password.&lt;br /&gt;
&lt;br /&gt;
Reset device to factory defaults (PostScript)&lt;br /&gt;
  &amp;lt;&amp;lt; /FactoryDefaults true &amp;gt;&amp;gt; setsystemparams&lt;br /&gt;
&lt;br /&gt;
Restart the PostScript interpreter and VM:&lt;br /&gt;
  true 0 startjob systemdict /quit get exec&lt;br /&gt;
&lt;br /&gt;
=== How to test this attack? ===&lt;br /&gt;
&lt;br /&gt;
Restarting or resetting a printer's PostScript interpreter can easily be reproduced using [[PRET]]:&lt;br /&gt;
&lt;br /&gt;
 ./pret.py -q printer ps&lt;br /&gt;
 Connection to printer established&lt;br /&gt;
 &lt;br /&gt;
 Welcome to the pret shell. Type help or ? to list commands.&lt;br /&gt;
 printer:/&amp;gt; reset&lt;br /&gt;
 printer:/&amp;gt; restart&lt;br /&gt;
&lt;br /&gt;
== PRESCRIBE ==&lt;br /&gt;
&lt;br /&gt;
For Kyocera devices, the PRESCRIBE page description languages may be used to reset the device to factory default from within ordinary print jobs using one of the commands shown below: &amp;lt;!-- may autorize first, using default machine passwords: !R! ACNT &amp;quot;ADMN&amp;quot;, &amp;quot;5200&amp;quot;; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  !R! KSUS &amp;quot;AUIO&amp;quot;, &amp;quot;CUSTOM:Admin Password = 'admin00'&amp;quot;;  CMMT &amp;quot;Drop the security level, reset password&amp;quot;;&lt;br /&gt;
  !R! ACNT &amp;quot;REST&amp;quot;;                                       CMMT &amp;quot;Reset account code admin password&amp;quot;;&lt;br /&gt;
  !R! EGRE;                                              CMMT &amp;quot;Reset the engine board to factory defaults&amp;quot;;&lt;br /&gt;
  !R! SIOP0,&amp;quot;RESET:0&amp;quot;;                                   CMMT &amp;quot;Reset configuration settings&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
% Resetting a printer device to factory defaults to bypass protection mechanisms as proposed in \autoref{sub:factory-defaults} is trivial for a physical/local attacker (AM1). All tested printers (see \autoref{tab:test-printers}) have documented procedures to perform a cold reset by pressing certain key combinations or setting a jumper. For network attackers (AM2) and web attackers (AM3), things are more complicated as discussed below.\\&lt;br /&gt;
&lt;br /&gt;
% PML and PostScript based attacks can be performed in AM1, AM2 and AM3 because they are deployed over the printing channel while SNMP is available solely in AM2. % performing the reset procedure.&lt;br /&gt;
&lt;br /&gt;
% Resetting a device to factory defaults and therefore bypassing protection mechanisms can be performed by a local attacker for all models in the test printer pool, by web attacker for models supporting PML, PostScript or PRESCRIBE and additionally for SNMP by a network attacker a&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>78.48.214.196</name></author>	</entry>

	</feed>