Package: peepdf-3
peepdf-3 - peepdf for Python 3peepdf-3 is aPython 3 tool to explore PDF filesin order to find out if the file can be harmful or not. The aim of this tool is to provide all the necessary components that
a security researcher could need in a PDF analysis without using 3 or 4 tools to make
all the tasks.With peepdf it's possible to see all the objects in the document showing
the suspicious elements, supports all the most used filters and encodings, it can parse different versions of a file, object streams and encrypted files. With the installation
ofSTPyV8andPylibemuit providesJavascript and shellcode analysiswrappers too. Apart of this it's able to create new PDF files and to modify/obfuscate existent ones.As of version 3.0.0, peepdf-3 no longer includes pylibemu as arequirementin order to use peepdf-3 on Windows systems. However, all functionality of libemu, pylibemu, and sctest still exist, and will function on Linux systems.FeaturesThe main functionalities of peepdf are the following:Analysis:Decodings: hexadecimal, octal, name objectsMore used filtersReferences in objects and where an object is referencedStrings search (including streams)Physical structure (offsets)Logical tree structureMetadataModifications between versions (changelog)Compressed objects (object streams)Analysis and modification of Javascript (STPyV8): unescape, replace, joinShellcode analysis (Libemu python wrapper, pylibemu)Variables (set command)Extraction of old versions of the documentEasy extraction of objects, Javascript code, shellcodes (>, >>, $>, $>>)Checking hashes onVirusTotalDetection of common encryption methodsOutput of XML and JSON dataCreation/Modification:Basic PDF creationCreation of PDF with Javascript executed wen the document is openedCreation of object streams to compress objectsEmbedded PDFsStrings and names obfuscationMalformed PDF output: without endobj, garbage in the header, bad header...Filters modificationObjects modificationWays to use peepdf:Basic executionInteractive consoleScript modeJSON OutputXML OutputVirusTotal analysisOCRTODO:Embedded PDFs analysisImproving automatic Javascript analysisGUIRelated articles:Spammed CVE-2013-2729 PDF exploit dropping ZeuS-P2P/GameoverNew peepdf v0.2 (Version Black Hat Vegas 2012)peepdf supports CCITTFaxDecode encoded streamsExplanation of the changelog of peepdf for Black Hat Europe Arsenal 2012How to extract streams and shellcodes from a PDF, the easy wayStatic analysis of a CVE-2011-2462 PDF exploitAnalysis of a malicious PDF from a SEO Sploit PackAnalysing theHoneynet Project challenge PDF filewith peepdfPart 1Part 2Analyzing Suspicious PDF Files With PeepdfIncluded in:REMnuxInstallationYou can install / use peepdf-3 via these methods:From PyPI via pip -python3 -m pip install peepdf-3From GitHub via pip and git -python3 -m pip install git+https://github.com/digitalsleuth/peepdf-3.gitClone the GitHub repo, cd into thepeepdf-3folder,chmod +x peepdf.pyand./peepdf.pyCurrent Known LimitationsAs of version 3.0.0, there are no limitations with the installation and usage of peepdf-3, as the hard requirement for pylibemu has been lifted. The functionality still remains for Linux systems.NotesThe current maintainer of this project (Corey Forman - digitalsleuth), does not receive any funding for, and is not currently seeking any monetary contributions for this work. If you are willing to provide assistance, programming contributions, and feedback, that is always welcome.As this project originated with Jose Miguel Esparza, I will continue to leave his sentiments, and PayPal link, below to acknowledge his original product.You are free to contribute with feedback, bugs, patches, etc. Any help is welcome. Also, if you really enjoy using peepdf, you think it is worth it and you feel really generous today you can donate some bucks to the project ;) Thanks!