Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
malicious-pdf — Generate malicious PDF test files for penetration testing, bug bounty hunting, and red teaming. Tests SSRF, XSS, XXE, NTLM credential theft, and data exfiltration in PDF viewers, converters, and web applications. Integrates with Burp Collaborator and Interact.sh. | Kitploit
Tools/GitHubGitHub/jonaslejon/malicious-pdf
Phishing ToolsVulnerability ScannersPayload GenerationExploitationWeb Application ExploitationData ExfiltrationPenetration TestingLearning & EducationRed Teaming
GitHubjonaslejon/malicious-pdf

malicious-pdf

Generate malicious PDF test files for penetration testing, bug bounty hunting, and red teaming. Tests SSRF, XSS, XXE, NTLM credential theft, and data exfiltration in PDF viewers, converters, and web applications. Integrates with Burp Collaborator and Interact.sh.

4.1k5461241 day agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository

malicious-pdf.png

made-with-python OpenSSF Best Practices

Malicious PDF Generator ☠️

Generate 67 malicious PDF test files for testing phone-home callbacks, SSRF, XSS, XXE, NTLM credential theft, and data exfiltration in PDF viewers, converters, and web applications. Can be used with Burp Collaborator or Interact.sh

Used for penetration testing, bug bounty hunting, and/or red-teaming etc. I created this tool because I needed a tool to generate a bunch of PDF files with various links. Educational and professional purposes only.

Usage

pip install -r requirements.txt
python3 malicious-pdf.py burp-collaborator-url

Output will be written to the output/ directory as: test1.pdf, test2.pdf, test3.pdf etc.

Options

--output-dir DIR    Directory to save generated PDF files (default: output/)
--no-credit         Do not embed credit/attribution metadata in generated PDFs
--obfuscate LEVEL   Obfuscation level (0-3):
                      0 = None (default)
                      1 = PDF name hex encoding + string octal/hex encoding
                      2 = Level 1 + JS bracket notation + javascript: URI case/whitespace obfuscation
                      3 = Level 2 + FlateDecode stream compression

Example with obfuscation:

python3 malicious-pdf.py https://your-interact-sh-url --obfuscate 2

Maximum obfuscation (Level 4 wraps JS payloads in a base64 decoder stub so the original API calls never appear as literal substrings):

python3 malicious-pdf.py https://your-interact-sh-url --obfuscate 4

Purpose

  • Test web pages/services accepting PDF files
  • Test security products
  • Test PDF readers
  • Test PDF converters
  • Test server-side PDF processing libraries (PDFBox, iText, etc.)
  • Test PDF static analysis tools — staged JS payloads (form-field /V, base64 decoder) defeat naïve /JS regex scanners
  • Bug bounty hunting — useful for finding SSRF, XXE, blind callbacks, and NTLM leaks in file upload endpoints, PDF-to-image converters, and document processing pipelines on programs that accept PDF input

Credits

  • Insecure features in PDFs
  • Burp Suite UploadScanner
  • Bad-Pdf
  • A Curious Exploration of Malicious PDF Documents
  • "Portable Document Flaws 101" talk at Black Hat USA 2020
  • Adobe Reader - PDF callback via XSLT stylesheet in XFA
  • Foxit PDF Reader PoC, DoHyun Lee
  • Eicar test file by Stas Yakobov
  • Multiple PDF Vulnerabilities - FormCalc & XXE
  • PDF - Mess with the web - FormCalc header injection
  • Adobe Reader PDF - Client Side Request Injection
  • ImageMagick - Shell injection via PDF password
  • Portable Data Exfiltration - PortSwigger Research
  • CVE-2024-4367 - Arbitrary JS execution in PDF.js
  • PDF File Formats Security - Philippe Lagadec
  • CVE-2016-2175 - Apache PDFBox XXE
  • CVE-2017-9096 - iText XXE
  • CVE-2020-29075 - Acrobat Reader silent DNS tracking
  • CVE-2022-28244 - Acrobat Reader CSP bypass
  • CVE-2018-5158 - Firefox PDF.js PostScript calculator injection
  • CVE-2018-20065 - PDFium URI action without user gesture
  • ExpMon - Sophisticated Adobe Reader 0-day analysis (April 2026) — inspiration for test33_13/14/15 and obfuscation Level 4

In Media

  • Brisk Infosec
  • Daily REDTeam
  • Malicious PDF File | Red Team | Penetration Testing
  • John Hammond - Can a PDF File be Malware?
  • Black Hat Ethical Hacking
  • 0x1 Pentesting Collection
  • Security Toolkit / WADComs
  • unsafe.sh
  • Cristi Zot on LinkedIn
  • Siva R. on LinkedIn

Complete Test Matrix

Click to expand all 70 test cases
Download Tool