Giter VIP home page Giter VIP logo

sneakpeeker's Introduction

SneakPeeker

SneakPeeker is a tool designed to detect suspicious URLs in various file formats. It processes ZIP, DOCX, XLSX, PPTX, and PDF files to uncover hidden links that might indicate unauthorized access or data leaks.

Features

  • Scans directories and files for suspicious URLs
  • Supports ZIP, DOCX, XLSX, PPTX, and PDF file formats
  • Outputs found URLs to the console
  • Optionally removes canary tokens from files
  • Generates a JSON report file

Installation

  1. Clone the repository:
git clone https://github.com/Lercas/SneakPeeker.git
cd SneakPeeker
  1. Build the tool:
go build -o sneakpeeker main.go

Or you can install:

go install github.com/Lercas/[email protected]

Usage

./sneakpeeker [-f] [-r report_file] FILE_OR_DIRECTORY_PATH

Parameters

-f: (Optional) Remove canary tokens from files. -r report_file: (Optional) Specify the name of the JSON report file. Default is report.json. FILE_OR_DIRECTORY_PATH: Path to the file or directory you want to scan.

Examples

Scan a directory and output results to the console:

./sneakpeeker /path/to/directory

Scan a file and output results to the console:

./sneakpeeker /path/to/file.docx

Scan a file and remove canary tokens:

./sneakpeeker -f /path/to/file.pdf

Scan a file and generate a JSON report:

./sneakpeeker -r myreport.json /path/to/file.pdf

How It Works

  • PDF Files: Scans for URL patterns in decompressed PDF streams.
  • ZIP, DOCX, XLSX, PPTX Files: Decompresses the files and scans for URL patterns in the extracted contents.

Example Output

[INFO] The file /path/to/file.docx is suspicious. URLs found:
http://suspicious-example.local
https://another-suspicious-example.local

[INFO] The file /path/to/anotherfile.pdf seems normal.

Docker Usage

First, build the Docker image:

docker build -t canarycatcher:1.0 .

Then, run the container with volume mounting to access your files. For example, if you want to scan the /path/to/scan directory on your host, you can run:

docker run --rm -v /path/to/scan:/data canarycatcher:1.0 /data

If you want to use additional flags -f to remove canary tokens, you can do so as follows:

docker run --rm -v /path/to/scan:/data canarycatcher:1.0 -f /data

Example command to run with a JSON report:

docker run --rm -v /path/to/scan:/data canarycatcher:1.0 -r /data/report.json /data

sneakpeeker's People

Contributors

lercas avatar

Stargazers

 avatar  avatar  avatar  avatar DayDream avatar  avatar  avatar Evgenii Shein avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.