LSB音频隐写

题目

There is a hidden message in this slide-show, we’re absolutely sure! Can you find it?

movie.apng

题解

准备首先利用apngdis将apng转换成一帧一帧形式,windows下我使用apngdis_gui.exe进行转换

转换结果包含多张图片,从大小推断有两种较大图片,大小不连续,猜测可能存在问题apngframe0438.png和apngframe0580.png

使用https://stegonline.georgeom.net/upload 查看bitplanes,发现两张图片Blue 0可以衔接起来

涉及LSB图片隐写

1
2
3
4
5
6
7
8
9
10
11
12
import cv2 as cv
import matplotlib.pyplot as plt
from bitstring import BitStream, BitArray

with open("out.rar", "wb") as f:
for name in ["apngframe0438.png", "apngframe0580.png"]:
img = cv.imread(name)
blue_plane = img[:,:,0] & 1 # get LSB from 0'th channel (blue)获取Blue通道最低有效位
plt.imshow(blue_plane); plt.show() # debug printing so that we know we have the correct files
bits = "".join(blue_plane.flatten().astype(str)) # flatten 1920x1080 array of 0/1 to string
by = BitArray(bin=bits).tobytes() # bitstring to bytes
f.write(by)

简单修复一下,并观看视频