<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2009-0229_Microsoft_Windows_2000_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AE%80%E5%8F%96%E6%BC%8F%E6%B4%9E</id>
	<title>CVE-2009-0229 Microsoft Windows 2000 任意文件讀取漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2009-0229_Microsoft_Windows_2000_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AE%80%E5%8F%96%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2009-0229_Microsoft_Windows_2000_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AE%80%E5%8F%96%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-17T01:47:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=CVE-2009-0229_Microsoft_Windows_2000_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AE%80%E5%8F%96%E6%BC%8F%E6%B4%9E&amp;diff=890&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==INFO== &lt;pre&gt; # CVE-2009-0229-PoC PoC for CVE-2009-0229 &quot;Print Spooler Read File Vulnerability&quot; LPE AFR (related to CVE-2020-1048)   ## Details * Author: Andrei Costin (zveri...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2009-0229_Microsoft_Windows_2000_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AE%80%E5%8F%96%E6%BC%8F%E6%B4%9E&amp;diff=890&amp;oldid=prev"/>
		<updated>2021-04-02T03:28:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==INFO== &amp;lt;pre&amp;gt; # CVE-2009-0229-PoC PoC for CVE-2009-0229 &amp;quot;Print Spooler Read File Vulnerability&amp;quot; LPE AFR (related to CVE-2020-1048)   ## Details * Author: Andrei Costin (zveri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==INFO==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# CVE-2009-0229-PoC&lt;br /&gt;
PoC for CVE-2009-0229 &amp;quot;Print Spooler Read File Vulnerability&amp;quot; LPE AFR (related to CVE-2020-1048)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Details&lt;br /&gt;
* Author: Andrei Costin (zveriu@gmail.com)&lt;br /&gt;
    * https://twitter.com/costinandrei/&lt;br /&gt;
* PoC date: 2010-xx-xx&lt;br /&gt;
* Release date: 2020-05-14 (reminded/inspired by CVE-2020-1048 - yes, I am too late to the party :D )&lt;br /&gt;
* TL;DR&lt;br /&gt;
    * If you want 0days, dig Printing and Faxing sub-system of OSes :) - lots of legacy code due to historical reasons - there are vulns for everyone =)&lt;br /&gt;
&lt;br /&gt;
# Notes&lt;br /&gt;
* Note1: Unverified - unsure 100% is the same bug that triggers the CVE-2009-0229&lt;br /&gt;
&lt;br /&gt;
* Note2: Unverified - could work on newer systems like Windows Server 2012 and Windows Server 2016&lt;br /&gt;
&lt;br /&gt;
* Note3: All Windows releases come with 4 default &amp;quot;Separator Page&amp;quot; files&lt;br /&gt;
    * pcl.sep&lt;br /&gt;
    * pscript.sep&lt;br /&gt;
    * sysprint.sep&lt;br /&gt;
    * sysprtj.sep&lt;br /&gt;
&lt;br /&gt;
* Note4: This trick is older than Windows 95 =), pretty sure it was used by pros for &amp;quot;stealth info recovery&amp;quot; ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Pre-requisites&lt;br /&gt;
* (non-admin) local attacker has &amp;quot;printer management rights&amp;quot;&lt;br /&gt;
    * option1: can add a new printer&lt;br /&gt;
    * option2: can modify settings of an existing &amp;quot;system wide&amp;quot; printer (many times the case)&lt;br /&gt;
* &amp;quot;arbitrary file&amp;quot; for exfiltration does not have explicit &amp;quot;Deny Read&amp;quot; permission&lt;br /&gt;
    * highly unlikely as that would make accessing files for the victim really unpractical/unusable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## PoC Execution&lt;br /&gt;
* Local attacker configures any printer s/he has access to so that it uses &amp;quot;Separator Page&amp;quot; file supplied by the attacker (attack.sep), now attacker has &amp;quot;weaponized printer&amp;quot;&lt;br /&gt;
   * See &amp;quot;Windows &amp;quot;Separator Page&amp;quot; References&amp;quot; below for details&lt;br /&gt;
&lt;br /&gt;
* Local attacker crafts the &amp;quot;Separator Page&amp;quot; file (attack.sep) to use the &amp;quot;@F&amp;quot;/&amp;quot;$F&amp;quot; operator, as follows, where the file to be exfiltrated is assumed to be &amp;quot;C:\secret.txt&amp;quot; (notice the \\ and the direct concatenation to @F operator)&lt;br /&gt;
```&lt;br /&gt;
@&lt;br /&gt;
@FC:\\secret.txt&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
* Local attacker needs to print something using the &amp;quot;weaponized&amp;quot; printer above&lt;br /&gt;
    * For example, local attacker opens Notepad, prints the empty document through the printer configured above with &amp;quot;Separator Page&amp;quot; file&lt;br /&gt;
    * Local attacker uses the &amp;quot;print to file&amp;quot; (e.g., c:\temp\exfiltrated.out) option when printing - there are &amp;quot;print to file&amp;quot; .ps in most Windows versions + .xps in newer ones (http://ps-2.kev009.com/pcpartnerinfo/ctstips/e94a.htm)&lt;br /&gt;
        * This is done so that the content of the exfiltrated file does not go to the printer (though this is also an option), but becomes immediately available to the attacker&lt;br /&gt;
&lt;br /&gt;
* Attack improvement: one &amp;quot;Separator Page&amp;quot; file can have a brute-force list of most common filepaths/filenames&lt;br /&gt;
* There is also @L operator :)&lt;br /&gt;
   * see my &amp;quot;PostScript: Danger Ahead?!&amp;quot; https://scholar.google.fr/scholar?oi=bibs&amp;amp;hl=en&amp;amp;q=related:RGJbW-sFP9sJ:scholar.google.com/&lt;br /&gt;
   * see also pscript.sep and sysprint.sep&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Trivia&lt;br /&gt;
* Found back in 2010 when I was doing &amp;quot;Hacking Printers for Fun and Profit&amp;quot; research/talks&lt;br /&gt;
    * https://www.youtube.com/watch?v=R56ZXErKCeE&lt;br /&gt;
    * https://www.youtube.com/watch?v=KrWFOo2RAnk &lt;br /&gt;
    * https://www.youtube.com/watch?v=JcfxvZml6-Y&lt;br /&gt;
    * http://andreicostin.com/papers/Conf%20-%20EuSecWest2010_AndreiCostin_HackingPrintersForFunAndProfit_full.pdf&lt;br /&gt;
    * found independently from CVE-2009-0229 submitter - until today, I did not know there is this CVE-2009-0229 =)), thought I was sitting on a 0day =))&lt;br /&gt;
&lt;br /&gt;
* I am pretty sure the Printing and Faxing sub-systems are bug-trapped with vulns back since Windows 3.1 (for historical reasons)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## Security References&lt;br /&gt;
* &amp;quot;Microsoft Security Bulletin MS09-022 - Critical&amp;quot;&lt;br /&gt;
    * https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-022&lt;br /&gt;
    * https://support.microsoft.com/de-ch/help/961501&lt;br /&gt;
* CVE-2009-0229&lt;br /&gt;
    * https://nvd.nist.gov/vuln/detail/CVE-2009-0229&lt;br /&gt;
    * https://vuldb.com/?id.48511&lt;br /&gt;
&lt;br /&gt;
* CVE-2020-1048&lt;br /&gt;
    * https://windows-internals.com/printdemon-cve-2020-1048/&lt;br /&gt;
&lt;br /&gt;
## Windows &amp;quot;Separator Page&amp;quot; References&lt;br /&gt;
* This is how &amp;quot;Separator Page&amp;quot; dialogs look on various Windows versions&lt;br /&gt;
    * https://www.google.com/search?q=%22Separator+Page%22+windows&amp;amp;source=lnms&amp;amp;tbm=isch&lt;br /&gt;
* This is how &amp;quot;Print to file&amp;quot; looks in some Windows versions&lt;br /&gt;
    * http://ps-2.kev009.com/pcpartnerinfo/ctstips/e94a.htm&lt;br /&gt;
* &amp;quot;Separator Page&amp;quot; in &amp;quot;Hands-On Microsoft Windows Server 2016 By Michael Palmer&amp;quot;&lt;br /&gt;
    * https://books.google.fi/books?id=zi-dBAAAQBAJ&amp;amp;pg=PA267&amp;amp;lpg=PA267&amp;amp;dq=%22SYSPRTJ.SEP%22+windows+10&amp;amp;source=bl&amp;amp;ots=TUGyElUQdc&amp;amp;sig=ACfU3U0WMpu6Y3EY5vo5MAJxNE04DjRtbg&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ved=2ahUKEwid6arL6LPpAhUPAxAIHaF9AXYQ6AEwA3oECAcQAQ#v=onepage&amp;amp;q=%22SYSPRTJ.SEP%22%20windows%2010&amp;amp;f=false&lt;br /&gt;
* &amp;quot;Create Custom Separator Pages in Windows Server 2012/2016&amp;quot;&lt;br /&gt;
    * https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj149734(v=ws.11)?redirectedfrom=MSDN&lt;br /&gt;
* &amp;quot;Use a Separator Page When Printing in Windows&amp;quot;&lt;br /&gt;
    * https://computingondemand.com/use-a-separator-page-when-printing-in-windows/&lt;br /&gt;
* &amp;quot;How do I configure a Print Separator Page?&amp;quot;&lt;br /&gt;
    * https://www.itprotoday.com/cloud-computing/how-do-i-configure-print-separator-page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>