├── README.md └── canarytokendetector.sh /README.md: -------------------------------------------------------------------------------- 1 | # CanaryTokensDetector 2 | ## Summary 3 | This script will detect canary token in microsoft word documents. It prevent tracking via canary tokens. 4 | ## How to run? 5 | This script tested on Kali Linux & MacOS,Unzip package must be install on your Linux or Mac system. you can install it on debian linux via following commands 6 | #### apt-get install unzip 7 | give executable permission. 8 | #### chmod +x canarytokendetector.sh 9 | Run it and follow instructions. 10 | #### ./canarytokendetector.sh 11 | ### Video Demo 12 | [![How to easily detect canarytokens tracking links](https://img.youtube.com/vi/EpTcxoAhKyI/0.jpg)](https://www.youtube.com/watch?v=EpTcxoAhKyI) 13 | #### For More Video subcribe TechChip YouTube Channel 14 | -------------------------------------------------------------------------------- /canarytokendetector.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Canary Token Detector 3 | # Version 1.0 4 | # This script will detect canary token in word documents 5 | # Author - Anil Parashar 6 | # www.techchip.net 7 | # www.youtube.com/techchipnet 8 | clear 9 | /bin/cat <<'Techchip' 10 | _______ _ _____ _ _ 11 | |__ __| | | / ____| | (_) 12 | | | ___ ___| |__ | | | |__ _ _ __ 13 | | |/ _ \/ __| '_ \| | | '_ \| | '_ \ 14 | | | __/ (__| | | | |____| | | | | |_) | 15 | |_|\___|\___|_| |_|\_____|_| |_|_| .__/ 16 | | | 17 | Your True Tech Navigator |_|.net 18 | www.techchip.net | youtube.com/techchipnet 19 | Techchip 20 | tput setaf 3 21 | echo "" 22 | echo "Canary Token Detector for Microsoft Word Document" 23 | echo "Version 1.0 | Author: TechChip (Anil Parashar) " 24 | echo "" 25 | tput sgr0 26 | read -p "Please Enter Word Document File name : " file 27 | if [ ! -f $file ] 28 | then 29 | echo "File not exists" 30 | exit 1 31 | fi 32 | if [[ $file == *.docx ]] || [[ $file == *.doc ]] 33 | then 34 | unzip -o $file 35 | if [ ! -f word/footer1.xml ] 36 | then 37 | echo ":::::::::::::::::::::::::::" 38 | echo "This file should be normal" 39 | echo ":::::::::::::::::::::::::::" 40 | exit 1 41 | fi 42 | if grep -q canarytoken word/footer2.xml word/footer1.xml word/footer3.xml word/header1.xml word/header2.xml word/header3.xml; 43 | then 44 | echo ":::::::::::::::::::::::::::" 45 | tput setaf 1 46 | tput bel 47 | echo "[x] canary token detected" 48 | tput sgr0 49 | echo ":::::::::::::::::::::::::::" 50 | else 51 | echo ":::::::::::::::::::::::::::" 52 | tput setaf 2 53 | echo "This file is seem normal" 54 | tput sgr0 55 | echo ":::::::::::::::::::::::::::" 56 | fi 57 | rm -rf word docProps _rels 58 | else 59 | echo "This is not a word document file, select correct file" 60 | fi 61 | --------------------------------------------------------------------------------