> For the complete documentation index, see [llms.txt](https://sansong.gitbook.io/cyber/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sansong.gitbook.io/cyber/rev/pdf.md).

# PDF

https\://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsdevguide/index.html

Du code Javascript peut être injecté dans un PDF. Il est exécuté à l'ouverture du fichier dans [<mark style="color:red;">Adobe Acrobat</mark>](https://www.adobe.com/fr/).

{% hint style="success" %}
[Cheatsheet analyse PDF malveillant (Lenny Zeltser, Pedro Bueno, Didier Stevens)](https://zeltser.com/media/docs/analyzing-malicious-document-files.pdf)
{% endhint %}

## Extraire le Javascript

### peepdf

**Installation**

```
git clone https://github.com/jesparza/peepdf
cd peepdf
```

**Infos sur les sections du pdf**

```
python2 peepdf.py <fichier.pdf>
```

**Analyser les objets**

```
python2 peepdf.py -i <fichier.pdf>
>PPDF: object <num> # afficher l'objet
```

{% embed url="<https://github.com/jesparza/peepdf>" %}

todo: pdfparser
