{"id":18469590,"url":"https://github.com/christarazi/steganography","last_synced_at":"2026-05-18T02:34:11.661Z","repository":{"id":78435904,"uuid":"84156665","full_name":"christarazi/steganography","owner":"christarazi","description":"A command-line C program that hides / reveals messages in Bitmap images (BMP) using steganography ","archived":false,"fork":false,"pushed_at":"2017-05-07T05:08:57.000Z","size":3015,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T16:45:43.466Z","etag":null,"topics":["bitmap","bmp","c","cli","linux","obscurity","security","steganography"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christarazi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-07T05:00:06.000Z","updated_at":"2024-04-08T01:38:59.000Z","dependencies_parsed_at":"2023-04-10T15:01:42.729Z","dependency_job_id":null,"html_url":"https://github.com/christarazi/steganography","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/christarazi/steganography","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christarazi%2Fsteganography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christarazi%2Fsteganography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christarazi%2Fsteganography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christarazi%2Fsteganography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christarazi","download_url":"https://codeload.github.com/christarazi/steganography/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christarazi%2Fsteganography/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268986261,"owners_count":24340617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitmap","bmp","c","cli","linux","obscurity","security","steganography"],"created_at":"2024-11-06T10:10:59.480Z","updated_at":"2026-05-18T02:34:06.635Z","avatar_url":"https://github.com/christarazi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# steganography\nA command-line C program that hides / reveals messages in Bitmap images (BMP)\nusing steganography. This program supports the\n[LSB method](https://en.wikipedia.org/wiki/Least_significant_bit) (least\nsignificant bit).\n\nThis program conforms to the POSIX.1 standard so it will work on any POSIX.1\ncompliant system.\n\n**Disclaimer**: this was created for educational purposes. I do not take any\nresponsibility for any misuse of this program.\n\n## Usage\n\n### Dependencies\n\nThis program will compile on any POSIX.1 compliant system with the following:\n\n - gcc (gnu11)\n - make\n\n### Build / Installation\n\nSimply download / clone the repo then run:\n\n```shell\n$ cd /path/to/code/\n$ make\n```\n\nThe executable `steg` should be created.\n\nTo use `steg`:\n\n```shell\n# Encode the message below into the provided sample BMP `tree.bpm`\n# This will output a file in the current directory like `fileXXXXXX`\n$ ./steg -m lsb -t message -e \"Hidden message\" samples/tree.bmp\n\n# Decode the message from above\n$ ./steg -m lsb -t message -d `fileXXXXXX`\n\n# Encode message using 'simple' method\n# Check out the differences in output between 'lsb' and 'simple' with `hexdump`\n$ ./steg -m simple -t message -e \"Hidden message\" samples/tree.bmp\n\n# Decode the message from above\n$ ./steg -m simple -d `fileXXXXXX`\n\n# Encode / decode files\n$ ./steg -m lsb -t file -e \u003cSOMEFILE\u003e samples/tree.bmp\n$ ./steg -m lsb -t file -d `fileXXXXXX`\n\n# See more usage help\n$ ./steg -h\n```\n\n## How does it work?\n\nBitmap images are very simple files. They contain some header information, then\nraw RGB pixels. The RGB pixels can be thought of as:\n\n```c\nstruct RGB {\n\tunsigned char blue;\n\tunsigned char green;\n\tunsigned char red;\n};\n```\n\nAs you can see, there is 1 byte for every channel. To perform steganography, we\ncan replace one of the channels with a byte from the message.\n\nFor example, if your message was \"hello\", then the 'h' will replace the first\nRGB byte, 'e' will replace the second RGB byte, and so on.\n\nIn this program, I chose to overwrite the blue channel for no other reason than\nit is the first channel in Bitmap images.\n\nFor the LSB method, instead of simply overwriting the image data, each bit from\nthe message is spread across 8 (blue) RGB bytes. This method is significantly\nbetter at disguising the message, compared to the simple method.\n\n**Note**: there are 7 different types of Bitmap files. See this Wikipedia page:\nhttps://en.wikipedia.org/wiki/BMP_file_format to read more about them.\nThis program only supports the `BITMAPV5HEADER` type and 24 bpp format (meaning\n8 bits per channel [1 byte]) which seems to be the most popular type on the\nInternet. The images in `samples/` are some examples of that.\n\n## TODO\n\n - ~~Add LSB (least significant bit) method instead of simply overwriting\n bytes~~\n - ~~Add images within images~~\n - Add more support for different images\n\n## Contribution\n\nPlease fork and submit a pull request. If you find a bug, submit an issue. I welcome feedback as well.\n\n## License\n\nThis program is free software, distributed under the terms of the [GNU] General\nPublic License as published by the Free Software Foundation, version 3 of the\nLicense (or any later version).  For more information, see the file LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristarazi%2Fsteganography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristarazi%2Fsteganography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristarazi%2Fsteganography/lists"}