Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scan_pdf.py #234

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Update scan_pdf.py #234

merged 1 commit into from
Nov 21, 2022

Conversation

Derekt2
Copy link
Contributor

@Derekt2 Derekt2 commented Nov 19, 2022

Describe the change
This adds a regex to check for phone numbers in PDFs (in various nonstandard formats as used by Adversaries) and stores the phone numbers found in the Strelka output.
Adversaries may be using these techniques such as "Callback RAT" where a victim is instructed to call a phone number in a PDF: https://www.crowdstrike.com/blog/callback-malware-campaigns-impersonate-crowdstrike-and-other-cybersecurity-companies/

Describe testing procedures
Tested using emails with pdf attachments with phone numbers inside, and pdfs directly. Sample for testing: f16fbe567a72ebea8cea6faa5cea5d59 or use samples at https://www.virustotal.com/gui/search/content%253A%2522(864)%2520613-9654%2522/files

Sample output
new output = scan_pdf.phones, array of strings/text.
image

Checklist

  • [ x] My code follows the style guidelines of this project
  • [x ] I have performed a self-review of and tested my code
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings

Copy link
Contributor

@phutelmyer phutelmyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. LGTM.

Additional output sample:

    "pdf": {
      "creation_date": "2019-05-21 04:24:01+08:00",
      "creator": "Adobe InDesign CC 13.1 (Windows)",
      "dirty": false,
      "elapsed": 0.079349,
      "embedded_files": {
        "count": 0
      },
      "encrypted": false,
      "flags": [
        "image_parsing_failure"
      ],
      "format": "PDF 1.4",
      "images": 1,
      "language": "en",
      "lines": 330,
      "modify_date": "2019-05-21 04:24:05+08:00",
      "needs_pass": false,
      "objects": {
        "mediabox": 5,
        "xobject": 6
      },
      "old_xrefs": true,
      "pages": 5,
      "phones": [
        "4083216300"
      ],
      "producer": "Adobe PDF Library 15.0",
      "repaired": false,
      "words": 2214,
      "xrefs": 358
    },

@phutelmyer phutelmyer merged commit c986f59 into target:master Nov 21, 2022
@phutelmyer phutelmyer added the enhancement New feature or request label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants