Originally published on Securityelites — AI Red Team Education, where the full and current version of this course lesson lives.
Someone sends you a photo of a 'burned out warehouse' that is spreading on social media. The EXIF is empty, the hands look slightly odd, and an online detector says 87 percent AI. Your manager wants a yes or no by lunch.
Today I teach you to stop asking for a yes or no from one signal. You will collect several small signals, rate how much each one is worth, and write down a confidence level you can defend. We also look at a second question that matters just as much: what is hiding inside the image.
One signal never decides
On Day 2 you learned that metadata is a claim, not a fact. Image analysis works the same way. Every technique today produces a signal, and every signal can be wrong. Your job is to collect several, rate each one, and see whether they agree.
I use four ratings. Strong means hard to fake or explain away. Moderate means suggestive and needs support. Weak means it happens in genuine images all the time. None means you looked and found nothing, which is not the same as proving the image is real.
A defensible finding says 'three moderate signals agree, no strong signal found, confidence medium'. It never says 'this is definitely AI' on the strength of one tool.
Visual tells: look before you run anything
Open the image at full size and zoom in. Do this on your working copy, never the original. Generators are better than they were, but they still slip in four places.
- Check hands and teeth. Count fingers, look at joints and where fingers meet objects. Teeth that merge into one band are a tell. Rate it moderate at best, because newer models often get hands right.
- Read any text. Signs, labels and shirt logos. Garbled or inconsistent letters are a good signal, usually moderate. Real photos can have blurred text, so compare sharpness with the rest of the scene.
- Compare reflections and shadows. Do mirrors, glasses and windows show what should be in front of them? Do all shadows fall the same way? Physical inconsistency is moderate to strong when it is clear.
- Scan the background. Look for repeating patterns, melting edges, objects that blend into each other, and crowds with identical faces. Weak to moderate.
Do not trust your first impression. Compression, a phone's beauty filter and a cheap lens all produce odd-looking genuine photos. Write down what you see, not what you feel.
Watch me do it: ELA and noise residual
Error level analysis (ELA) re-saves a JPEG at a known quality and shows how much each area changed. Regions that were edited or pasted in often respond differently from the rest. A noise residual subtracts a blurred copy to expose the fine grain a camera sensor leaves. Everything here runs on a file on your own machine.
- Make a working folder and copy. Run the commands in the next block. Pick any JPEG of your own, such as a phone photo, and replace photo.jpg with its name. You should see a hash line printed.
- Save the script. Create a file called ela.py with the code two blocks down. Pillow and NumPy come from your Day 1 setup. If you get ModuleNotFoundError, run pip install pillow numpy.
- Run it. Run python3 ela.py work/photo.jpg. You should see two lines of numbers and two new PNG files in work/.
- Read the output images. Open the ELA and noise PNGs. Look for a patch that is much brighter or smoother than its surroundings. Uniform brightness across the whole picture is normal and means nothing.
mkdir -p work && cp ~/Pictures/photo.jpg work/photo.jpg sha256sum ~/Pictures/photo.jpg work/photo.jpg import io, os, sys import numpy as np from PIL import Image, ImageChops, ImageFilter path = sys.argv[1] img = Image.open(path).convert("RGB") buf = io.BytesIO() img.save(buf, "JPEG", quality=90) buf.seek(0) resaved = Image.open(buf).convert("RGB") diff = np.asarray(ImageChops.difference(img, resaved)).astype(float) print("ELA mean", round(diff.mean(), 2), "max", diff.max()) scale = 255.0 / max(diff.max(), 1) out = Image.fromarray((diff * scale).astype("uint8")) out.save(path + ".ela.png") blur = img.filter(ImageFilter.GaussianBlur(2)) res = np.asarray(img).astype(float) - np.asarray(blur).astype(float) print("Noise std", round(res.std(), 2)) noise = np.clip(np.abs(res) * 8, 0, 255).astype("uint8") Image.fromarray(noise).save(path + ".noise.png") What just happened: the script amplified tiny differences so your eyes can compare regions. A bright edge around a face, or one smooth patch in a grainy photo, is worth a note. But screenshots, heavy filters and repeated re-uploads also create odd ELA, so I rate ELA as weak to moderate. Fully generated images often show unusually smooth, even noise, which is another moderate signal at best.
Detector tools and their false positives
Online AI-image detectors give you a percentage. It feels scientific, but it is a classifier's guess trained on particular generators. A new model, a screenshot, a resize or a heavy filter can fool it in either direction.
Continue reading the full course lesson on Securityelites — AI Red Team Education


