逆向工程 - 樣本分析 - 如何製作AutoRun PDF檔案



參考資訊:
https://github.com/cornerpirate/JS2PDFInjector
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf
https://unix.stackexchange.com/questions/277892/how-do-i-create-a-blank-pdf-from-the-command-line

步驟如下:

$ cd
$ git clone https://github.com/cornerpirate/JS2PDFInjector
$ cd JS2PDFInjector

$ convert xc:none -page A4 main.pdf
$ echo 'app.alert("hello, world!");' > main.js
$ java -jar JS2PDFInjector-1.0.jar ./main.pdf ./main.js
    [*] Original PDF: ./main.pdf
    [*] JavaScript Payload: ./main.js
    [*] Output File Path: ./js_injected_main.pdf
    [*] Poisoned File Created: ./js_injected_main.pdf

執行js_injected_main.pdf