Git Product home page Git Product logo

hideme's Introduction

hideme - stealth data transfer application

Some time ago I read an interesting article about hidden data transfer. The author said that you could take a binary file and put every bit of it the lower bit of every byte into a PNG file. "Okay" - I thought, - "But what if someone tries to read it? What if someone tries to replace that data with their own? How can I protect my data?". So I decided to expand on that idea. And here is the result.

data transfer

I want to transfer a file to my friend. I can only use public channels. Maybe file storage, maybe unsecured email, whatever. I have to take the PNG image and my payload file and pass them as parameters to the inject command.

    ./hideme inject \
        --payload=./original.jpg \
        --carrier=./carrier.png \
        --out=./encoded.png

data encryption

I want to encrypt my data, I have to protect my data.

Let's say that I have agreed in advance with my friend to use a particular encryption key. I can encrypt data with AES by specifying the aes-key parameter.

    ./hideme inject \
        --payload=./original.jpg \
        --carrier=./carrier.png \
        --out=./encoded.png \
        --aes-key=af012453af01245305f76a0005f76a00

I can encrypt it with a key that is equal to (or greater) than length of the original message. Suppose I make an agreement with a friend of mine that at a certain time of a certain day I will send him a file over the Internet. This file will be the encryption key. Some time later, on a different day, I send my encrypted message. I can encrypt my message by specifying the encode-key parameter.

    ./hideme inject \
        --payload=./original.jpg \
        --carrier=./carrier.png \
        --out=./encoded.png \
        --encode-key=./crypt-key.jpg

The tool supports double encryption. I can use both approaches.

    ./hideme inject \
        --payload=./original.jpg \
        --carrier=./carrier.png \
        --out=./encoded.png \
        --encode-key=./crypt-key.jpg \
        --aes-key=af012453af01245305f76a0005f76a00

digital signature

Let's imagine that my friend needs to ensure that the decoded data is not edited by the man in the middle (MITM). I can sign my payload with private async key and give my friend the public key so that he can verify the signature. Now, if the MITM is able to change the message (let's assume that he revealed our keys). Then without knowing my private key he will not be able to fool my friend.

    ./hideme keys &&
    ./hideme inject \
        --payload=./original.jpg \
        --carrier=./carrier.png \
        --out=./encoded.png \
        --private=./rsa_key

file extraction

How can my friend get the hidden file and verify its digital signature? He just has to specify a public key for the program to perform the verification of digital signature.

    ./hideme extract \
        --input=./encoded.png \
        --public=./rsa_key.pub \
        --decode-key=./crypt-key.jpg \
        --aes-key=af012453af01245305f76a0005f76a00

    2022/06/03 16:36:01 the signature is verified well

If you see this message at the bottom (I mean "the signature is verified well"), then the digital signature has been successfully verified. Otherwise, the digital signature is not valid. Information about the presence of a digital signature in case of failure is not disclosed for security reasons.

help

You can get help with application launch options. To do this, simply type:

    ./hideme help

Well, in order to help the author of the project. Just learn programming, learn new techniques, practice making your applications stable and secure. We have so much bad code so far

hideme's People

Contributors

iv-menshenin avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

res10re

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.