Inspiration
3 years ago, I took a cybersecurity class in high school where I first learned about steganography. It was fascinating. Like I genuinely hadn't enjoyed anything in that class up to that point, but I enjoyed that topic so much I ended up building a project where you could encode and decode messages from audio files using steganography. While it was pretty basic and harmless, it was cool to work with files on the binary level for the first time in my life.
That being said, I'm a machine learning guy at heart, so when I went to UMD, that's the path I signed up for and got into. However, fast forwarding to this semester, I took a class on binary exploitation, which honestly rekindled my passion for working with binary. I'm now a cybersecurity minor in addition to my machine learning major, and so I thought it would be a good idea to combine ML with cyber in my Bitcamp 2025 project.
All of these thoughts kind of combined in my mind literally one hour before the opening ceremony, and I instantly called my best friend to ask him if I was being an idiot or if this would be a good idea. He gave me some encouraging words, and the rest is history, I suppose.
What it does
Steganography is the process of basically taking the least significant bits of information and writing over them to secretly encode your own information in files. While small changes to information can cause huge differences in many file types, files like images and videos are perfect for this type of encrypting technique, as the change in what you see visually is minuscule. This fact alone makes these attacks extremely dangerous as they have no visible trace to the human eye. My solution is to try to use an AI model that will read in the least significant bytes of an image and predict if there is some sort of malicious payload in those least significant bytes.
TLDR: The program takes in a PNG image (as steganographic attacks are only used on image types without compression) and uses a sequential neural networking model to detect whether that image has a payload injected into it via steganography.
How we built it
I built it by first getting data from a dataset on Kaggle containing images with and without steganographic injected payloads in them. I read the bytes from the images, used bitwise operations to get the least significant bits, and grouped them into a sequence of bytes. I then converted those bytes into floats between 0.0 and 1.0 so I could feed them into a sequential neural network model to find patterns in the least significant bit data of images that would correspond to whether or not they contained steganography.
Next, I built a Flask API using the model so that users could interact with the model and find out if their images had steganography or not. I coupled this with a simple front-end in React where users could upload a file, click a button, and then interact with the model and find out whether or not their image has steganographic binary in it.
Finally, I built the readme for the project.
Challenges we ran into
Some challenges I ran into included converting the least significant bits into something that could be used by a machine learning model. I initially had read and stored the least significant bytes as a string, but not only was that inefficient, but it also made it very difficult to use with machine learning models. After some research, I discovered that converting the raw bytes to float values between 0 and 1 and using a sequential neural networking model would be the best way to use the raw bytes in the way I intended (which is for them to be read in order and see if that sequence is malicious).
Another challenge I ran into was the physical limitations of my laptop/optimization of my code. I initially intended to use the entire dataset size to train, especially since I was using a neural network and neural networks need a large amount of data, but my laptop could only handle a couple of hundred images at first. After a lot of optimization using vector multiplication, I was able to increase my dataset size to a couple thousand images.
Accomplishments that we're proud of
I'm proud I completed the project start to finish, and I'm proud that I decided to go do something out of my comfort zone. This was my first time ever working with a neural network, so I'm glad I tried and learned something new. I'm also glad I didn't use my laptop as an excuse to just give up on the project and instead sought ways to optimize my code so I could get as much data as possible for my neural network.
What we learned
I learned a lot about how neural networks work. I learned about things like weights, biases, epochs, and also the types of neural networks. I also learned how to deal with larger datasets in the future (to start off with small sections of that data, optimize your code, and then try to get more at a time). I definitely made the mistake of trying to get all the data at once, and that led to my computer crashing a lot. So that's a good lesson I'll take with me into the future.
What's next for Steg Detector
I plan to improve the accuracy of my model by getting more data from the dataset, a little at a time. I also plan to try to address the issues of false negatives in my project by adjusting the prediction threshold at which I classify something as either steganographically injected or clean.
Additionally, I want to try to get random images from online as "clean" images too, so that my dataset for "clean" images has more variance and mimics the variance in real-world internet images better, as the current dataset has no grayscale images and has the same pixel size (512 by 512). I would probably do the same for the "steganographic" images too if I could find another dataset.
Finally, in the far future, I would like to expand this steganographic check to audio and possibly video forms of media too.
Built With
- css
- html
- javascript
- jupyternotebook
- python
- react

Log in or sign up for Devpost to join the conversation.