Task #1192
Run stegdetect on 1000+ images
Status: | Resolved | Start date: | 04/25/2013 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | 04/26/2013 | ||
Assignee: | linggan | % Done: | 40% | ||
Category: | - | ||||
Target version: | v1 - "Sailor" | ||||
Component: |
Description
We now have a trim version of stegdetect (spotf5) running locally on the machine as well as pixelknot. Let's run 1000+ images through it and see what the success/fail rate is.
After the report back, we will integrate stegdetect (spotf5) directly into the app with the new UI.
History
#1 Updated by abeluck over 4 years ago
1000+ images need to be generated first no?
Harlo said she was going to implement a batch version of PixelKnot. I don't think she's started it yet.
#2 Updated by ex1st over 4 years ago
Gwen said she'd be able to automate it. If not, then 20 images is a good place to start.
#3 Updated by linggan over 4 years ago
Alright, I've written a program that will run the (Java) F5 algorithm (both embedding and extraction functions) on a batch of pictures, given the directory name they're in. Github link: https://github.com/linggan/autosteg.
Some limitations so far:
--in regards to the way the arguments are passed, I haven't coded a way for the user to choose the output file name of the stego'd file. the default is [orginalfilename]1.[ext]. Which is fine for testing purposes, I suppose.
--similarly, the way I've coded the arguments, the password/embedded message is the same for every picture.
--finally, the program will complain about running out of memory on the heap is the picture size is larger than ~3mb. I don't really know Java, so I don't know if this can be fixed/whether this is important.
Now I just have to figure out how to do the same automation with the detection algorithm.
#4 Updated by abeluck over 4 years ago
Nice work!
??--similarly, the way I've coded the arguments, the password/embedded message is the same for every picture. ??
I think it would be useful to run three tests here. One, where the images are different and the message+password are constant. Then a second test where there is only one image used, but the message+password changes. And finally, a third test where the images and message+password are different.
#5 Updated by abeluck over 4 years ago
Also, could you update the README file explaining how to compile and run the program?
#6 Updated by ex1st over 4 years ago
- Status changed from New to In Progress
Running stegdetect currently results in error: segmentation fault
#7 Updated by linggan over 4 years ago
- % Done changed from 0 to 20
I updated the readme on how to compile the stego algorithm--let me know if anything isn't clear.
So passing any file to stegdetect on my computer seems to result in a segmentation fault, but I'm not sure how to tell if the seg fault is from my end or if it something in the original stegdetect code. When I run the program through gdb though, the seg faults seems to happen in one of the stegdetect function calls, so I'm leaning towards the latter? I'll admit I've not had much experience debugging seg faults, so I might be completely off with this.
As for the trimmed stegdetect algorithm, I've put it up here: https://github.com/linggan/spotf5 . My function call to the detect_f5 method is in the file spotf5.c.
#8 Updated by abeluck over 4 years ago
Forked your repo to the guardianproject account: https://github.com/guardianproject/spotf5
Here's some patches for you Gwen: https://github.com/linggan/spotf5/pull/1
Just some fix ups to make it work. The segfault was happening because jpg_open needed to be called BEFORE detect_f5. This required adding some more functions into common. You can see in spotf5.c how I initialize the jpg structs with the call to jpg_open.
Also, I added a build script using cmake for easy compilation. See the README for infos.
#9 Updated by linggan over 4 years ago
Tested spotF5 on a batch of stego-images and seemed to detect every one. Also seemed to detect F5 in non-stego images as well. Really odd. I'm wondering if I might have inadvertently changed something while trimming down stegdetect.
#10 Updated by linggan over 4 years ago
- % Done changed from 20 to 30
Nevermind, that was my bad in reading the ouput log. So out of the 30 pictures I ran the test on, spotf5 detected five. Out of the control, spotf5 detected none
Off the top of my head, further planned testing includes:
--test if re-encryption makes a difference in detection
--test if source (phone camera, computer camera, internet) makes a difference in detection
--test if image subject makes a difference (as in, an IRL photo vs. a computer drawing or graphic)
--test on a larger batch (perhaps, 1000+? even better, over 9000...?), now that we got both encryption and detection able to take in directories as arguments
--include more control pics to see if there are any false positives
--possibly look for similarities in detected pictures
If anyone else has suggestions on things to test for, hit me up.
#11 Updated by linggan over 4 years ago
- % Done changed from 30 to 40
Updated the AutoSteg repo. AutoSteg now includes spotf5 such that every embedded picture is tested against detection. Results are all printed to a csv file in the output directory so you can easily read+do fancy stuff in Excel.
#12 Updated by ex1st over 4 years ago
- Status changed from In Progress to Resolved