Skip to content

Python Script for gathering information of a machine and mailing it. Can be used as a payload.

License

Notifications You must be signed in to change notification settings

VENGENCE7/PySPY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues GPL3 License LinkedIn


Logo

PySPY

Python Script for gathering information of a machine and mailing it to a desired email. Can be used as a payload to monitor Target and gather intel.
Explore the docs »

View Images · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Key Features
  3. Python Modules Used
  4. Getting Started
  5. Configure & Customize Script
  6. Usage & Possible Upgrades
  7. Contributing
  8. License
  9. Contact
  10. Acknowledgments

About The Project

NOTE - Not to be used to harm others or for malicious activities.

The PySPY project has two parts for two different works :

  • Target Machine Script

    • Runs on the target machine
    • Contains 9 functions and 1 main function
    • Collects System information, screenshots, audio, clipboard data & key-logs
    • Responsible for :
      • Gathering data
      • Encrypting data
      • Compressing data
      • Mailing data
      • Deleting data
  • Attacker Machine Script

    • Runs on the user's machine
    • One script created to assist the user with the results of Victm Machine script
    • Help the user to do it all in console
    • Created to assist the user for the following :
      • Key generation
      • Decryption of Data
      • Get zip information
      • Unzipping

(Back to top)


Key Features

  • Highly and easily customizable as per the requirements
  • Additional Script for the user to reduce his work after attack and for key generation
  • Encryption and Compression of data
  • Mailing to desired mail
  • Threading used for better efficiency and quick execution
  • Fast , Takes close to 26 seconds to :
    • Take 3 screenshots at 2sec interval each
    • 3sec of audio
    • System information including :
      • saved-wifi passwords
      • Mac address
      • Ip address
      • platform & Machine information
    • 4 clipboard text at 2sec interval each with timestamp and doesnt copy if duplicate data present
    • Keylogs for 10s
    • Encrypt it all with key created by the user
    • Zip the data
    • Mail the zip to the desired mail
    • Clear tracks ,all files created are deleted

(Back to top)

Python Modules used


Need Installation


Built-In

  • Threading
  • Os
  • Zipfile
  • Time
  • Platform
  • Socket
  • Subprocess
  • Email
  • Shutil

(Back to top)

Getting Started

NOTE :- TO BE USED FOR EDUCATIONAL PURPOSES ONLY

Prerequisites

  • Python 3
  • Python modules installed as mentioned here
  • E-mail Account with less secure app access

Installation

  1. Clone the repo

    git clone https://github.com/VENGENCE7/PySPY.git
  2. Install Python 3 if not installed and set it up.

  3. Install required modules from the Requirements.txt file present in respective script

    pip install -r /path/to/requirements.txt

    Check if required modules are present and verify with Modules needed using :

    pip freeze

    For missing modules use:

    pip install <module_name>

(Back to top)

Configure Mail Account

Setup E-mail for for sending mail to the recipient address.This requires to allow less secure app access on ur mail account.

Refer below for setting up G-mail account so that the Script can access it.

  • Turning on 'less secure apps' settings as mailbox user
    • Go to your (Google Account).
    • On the left navigation panel, click Security.
    • On the bottom of the page, in the Less secure app access panel, click Turn on access.
    • If you don't see this setting, your administrator might have turned off less secure app account access (check the instruction above).
    • Click the Save button.

For other mail accounts look up for the required settings (Less Secure App Access) to be changed for mailing accordingly.

(Back to top)

Configure and Customize Script Setup

For configure the PySPY Script for being operational and customizing it as per one's needs follow through the instructions below

Target-Script Setup

NOTE : Only edit [ Main.py ] in target machine unless you know what your doing

;) Programs are filled with comments to explain whats goin on :).

Follow :

  1. Go through the comments of main.py for understanding whats being done
  2. All the places you need to change are mentioned with +[EDIT and example for how to be changed]+ in the code for ease
  3. Generate Key using Attacker Script or you can use a separate script too.
  4. Make sure to save and keep the key safe,it will be needed for decrypting.

All changes needed to be entered are:

  • File Path
    • Make sure its valid.Do your research on target well ;)
    • If path is invalid it will use current directory path too :)
  • Key
    • Your own key can be entered
    • Use the Attacker-Script to generate one.
    • Can use the "Key-Generate.py" present in Separate-scripts for individual use folder in the Attacker-Script folder
  • Folder-Name
    • Choose a unique name inorder to avoid script crash _ -_O _
  • Zip File-Name
  • File-Names of
    • All the Files that are going to be created during execution with proper extensions(its mentioned in the comments and code,read closely)
  • Script Execution Settings
    • FUll Script Execution time interval AND iterations
    • Audio-Recording time
    • Clipboard-Copy settings regarding iterations and time interval between each
    • Screen-Shots settings regarding iterations and time interval between each
  • Mailing Details ,Make sure to use proxy accoount
    • From-Address Account
    • Password of From address Account
    • To-Address can be any valid mail-ID

(Back to top)

Attacker-Script Setup

No Setup required

Its a complimentary Script for PySPY to reduce the attackers work to access and perform operations from a single screen :)

Can create your own Script for your tasks its not mandatory to use this ><

  • Just run the Script in powershell or cmd in windows.
  • Its interactive
  • Choose options as per your needs
  • Separate Scripts for each operation in the Script is also available if requried

(Back to top)

Usage And Possible Upgrades

Target Machine Script

  1. Once Configured it can be converted into an executable that can be sent to the Target and trick him to run it .
  2. Can be used as a Payload to be used on the target machine .
  3. Can be run as a Script on machines that are compromised .
  4. Using an anonymous account and recipient account to avoid any connection that can compromise the attacker .
  5. Can be used to:
    • To monitor target
    • Gather intel about the target
    • Allows to have a variety of data using just a single script

Possible Upgrades

  • Application of asymetric encryption or any other complex encyption techniques
  • Configuring to create a hidden folder
  • Masking its working with additional programs
  • Perform other faster compressing techniques
  • Clearing logs of tasks
  • Creating password protected files
  • Record audios at multiple intervals
  • Gather additional information of network
  • Creating session for Screen share to have direct stream of the target
  • Get intel through camera access

(Back to top)

Attacker Machine Script

  1. Allows one screen access to all functionality .
  2. Reduced post-attack work .
  3. Can be used as a general script for doing unzipping and getting zip info as well to lookout for malicious content .

Possible Upgrades

  • To create a systematic way to store all intel according to a order by creating & integrating another Script for storing files accordingly,which can help in scanning and investigating data for any threats .
  • For creating complex keys .
  • Faster execution of unzipping and decryption .
  • Integration of tasks like self zipping and decryption as per the file names(as we mention in target Script)
  • Judging a zip to be safe to be unzipped if any anonmalies detected and warm

(Back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Don't forget to give the project a star! Thanks again!

(Back to top)

License

Distributed under the License. See LICENSE.txt for more information.

(Back to top)

Contact

Bhavish Anand :- bhavish007anand@gmail.com

Project Link: :- PySPY

(Back to top)

Acknowledgments

(Back to top)

About

Python Script for gathering information of a machine and mailing it. Can be used as a payload.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages