EXPERIMENT_ID: 003
Steganography Tool
CONCEPT
LSB (Least Significant Bit) image steganography implementation in Go. Hides encrypted payloads within PNG pixel data.
OBJECTIVE
Implement a covert channel for data exfiltration by modifying the least significant bits of image pixel data.
CONSTRAINTS
Payload size limited by image dimensions. Not robust against compression.
Go Cryptography Image Processing
src/main.go
package mainimport ("image""image/color")// EmbedHides payload bits into the LSB of image pixelsfunc Embed(img image.Image, payload []byte) image.Image {bounds := img.Bounds()newImg := image.NewRGBA(bounds)// ... bit manipulation logic ...for y := bounds.Min.Y; y < bounds.Max.Y; y++ {for x := bounds.Min.X; x < bounds.Max.X; x++ {r, g, b, a := img.At(x, y).RGBA()// Modify 'r' (red channel) LSB with payload bit// r = (r & 0xFE) | next_bitnewImg.Set(x, y, color.RGBA{uint8(r), uint8(g), uint8(b), uint8(a)})}}return newImg}
READ_ONLY_MODEUTF-8