This script demonstrates how someone could create a simple script to potentially access your password information without your knowledge.
-
Initialization: After running
init.py, this script will generate a pickle file in the same directory asinit.py. -
Platform Check: When executed, the script will check the platform. If it's not Linux, the script will delete itself to avoid any unintended consequences on incompatible systems.
-
Execution: When you run
run.py, the script will load the pickle file and modify itself. -
Second Execution: If you execute
run.pyfor the second time the main script will attempt to access information stored in/etc/passwd. It will then save this information in a file called.passwdwithin the same directory as the script and once the code runs successfully, the script will change its own source code to a simple "Hello, World!" comment, effectively altering its functionality.
**Note that this script is not harmfull or any other type of viruses. this will just read a file, main porpse is to show how pickle viruses work.**
- Clone repository
git clone https://github.com/Kourva/PicklePasswd- Open source folder
cd PicklePasswd- Execute
init.pyto create pickle script
python3 init.py- Execute
run.pyto load pickle script
python3 run.py- Execute
run.pyagain to run script
python3 run.py