4 ms·
I wrote a textual steganography library and CLI in 2011, called Plainsight: https://github.com/rw/plainsight https://github.com/rw/plainsight Additionally, @wo
by rw 13y ago
I wrote a textual steganography library and CLI in 2011, called Plainsight: https://github.com/rw/plainsight https://github.com/rw/plainsight
Additionally, @workmajj and I wrote TweetFS using Plainsight. It lets you recursively pack up directories and post them as an encoded linked list of Tweets to Twitter: https://github.com/rw/tweetfs https://github.com/rw/tweetfs
I presented Plainsight at Hack'n'Tell NYC in 2011 and a video was recorded: http://bit.ly/pecGgW http://bit.ly/pecGgW
Plainsight uses each byte of the input message to generate tokens. Bits are used to decide how to traverse the token tree, weighted by frequency. The drawbacks are 1) verbosity and 2) incorrect grammar.
One of the lessons of writing Plainsight is that spam can be used to contain secret messages. Send enough gibberish to enough people, with your intended recipient included, and you'll look like a spammer--not a spy.
I also wrote a fuzzing tool, called Shag, to find edge cases, e.g. for single-byte inputs: https://github.com/rw/shag/blob/master/shag.rb https://github.com/rw/shag/blob/master/shag.rb
-- Example 1 (regular text)
Type your message to encode:
echo 'Meet at Union Square at noon. The password is FuriousGreen.' > cleartext
Then, pipe it through Plainsight:
cat cleartext | plainsight -m encipher -f sherlock.txt > ciphertext
The output will be Doyle-esque gibberish:
cat ciphertext | fold -s
which was the case, of a light. And, his hand. "BALLARAT." only applicant?"
decline be walking we do, the point of the little man in a strange, her
husband's hand, going said road, path but you do know what I have heard of you,
I found myself to get away from home and for the ventilator little cold night,
and I he had left my friend Sherlock of our visitor and he had an idea was not
to abuse step I of you, I knew what I was then the first signs it is the
daughter, at least a fellow-countryman. had come. as I have already explained,
the garden. what you can see a of importance. your hair. a picture upon of the
money which had brought a you have a little good deal in way: out to my wife
and hurry." made your hair. a charge me a series events, and excuse no sign his
note-book has come away and in my old Sherlock was already down to do with the
twisted
Now, decipher that ciphertext:
cat ciphertext | plainsight -m decipher -f sherlock.txt > deciphered
cat deciphered
Meet at Union Square at noon. The password is FuriousGreen.
-- Example 2 (binary data)
$ dd if=/dev/urandom of=/dev/stdout bs=1 count=10 | plainsight -m encipher -f 1984.txt
10+0 records in
10+0 records out
10 bytes (10 B) copied, 9e-05 s, 111 kB/s
Adding models:
Model: 1984.txt added in 0.89s (context == 2)
input is "<stdin>", output is "<stdout>"
enciphering: 100%|#####################################################################################################################################################################|474.67 B/s | Time: 0:00:00
which is a war is real, the proles used mind on the telescreen. He could see through all right to. You have read what said. 'Yes,' only in the Ministry
- dpapathanasiou 13y agoThanks for hijacking my thread! ;) Seriously, though, how would your library work for twitter? It seems that the encoding process creates texts much, much larger than the original message.
- rw 13y agoTweetFS uses the SeqTweet library, which takes care of sequencing the tweets for you. Specifically, see the _list_to_twitter method: https://github.com/workmajj/seqtweet/blob/master/seqtweet/seqtweet.py#L36 https://github.com/workmajj/seqtweet/blob/master/seqtweet/se... One of the use cases of TweetFS is to use Twitter as a 'dead drop'. You'll generate a lot of tweets by doing that, but there's no harm done. I don't think I hijacked your thread. The other comments also discuss textual steganography.
- dpapathanasiou 13y agoThanks I'll look more into how TweetFS works. I was just kidding about the hijiacking comment; don't people know how to interpret emoticons anymore? :D
- epaga 13y agoI think the problem is that unlike ":)", too often people use passive-aggressive ";)"s, not meaning them in the friendly way they were originally intended but with a slightly bitter aftertaste. But this is getting a bit off-topic I suppose... :)
- 616c 13y agoVery impressive stuff, sir. Will check out your work in depth this weekend!
- rw 13y agoOne serious use case is to seed the generator with a spam email corpus. This lets you generate messages that look like spam. Example: wget https://spamassassin.apache.org/publiccorpus/20030228_spam.tar.bz2 tar -jxvf 20030228_spam.tar.bz2 cat spam/0* > spam-corpus.txt echo "The Magic Words are Squeamish Ossifrage" | plainsight -m encipher -f spam-corpus.txt > spam_ciphertext $ cat spam_ciphertext (8.11.6/8.11.6) 3 (Normal) Internet can send e-mails until to transfer 26 10 [127.0.0.1] also include address from the most logical, mail business for your Car have a many our portals ESMTP Thu, 29 1.0 this letter on internet, <a style=3D"color: 0px; text/plain; cellspacing=3D"0" how quoted-printable about receiving you would like width=3D"15%" width=3D"15%" border="0" width="511" Date: Tue, 27 Thu, 19 26 because zzzz@localhost.spamassassin.taint.org for $ cat spam_ciphertext | plainsight -m decipher -f spam-corpus.txt Adding models: Model: spam-corpus.txt added in 2.57s (context == 2) input is "<stdin>", output is "<stdout>" deciphering: 100%|#####################################################################################################################################################################|543.84 B/s | Time: 0:00:00 The Magic Words are Squeamish Ossifrage