Live data from Hacker News

Smuggling arbitrary data through an emoji

paulbutler.org

141–150 of 206 posts

Re: Smuggling arbitrary data through an emoji

#141
post #139

Earlier quoted context omitted.

That's already happening - my kids have had papers unfairly blamed on chatgpt by automated tools. Protect yourself kids, use an editor that can show letter by letter history.

Do you have any examples of editors that show letter by letter history? I have never looked for that as a feature. Edit: I've been looking, and Google Docs seems to have version history to the minute.

Yes exactly. They keep track of their diffs in that interface.

Re: Smuggling arbitrary data through an emoji

#142
post #37

I'm not too surprised by this, but I'm annoyed that no amount of configuration made those bytes visible again in my editor. Only using hexdump revealed them.

vscode's "Unicode Highlight: Non-basic ASCII" causes the character to get highlighted. Sadly, the more appropriate "Unicode Highlight: Invisible Characters" setting does not reveal them.

Re: Smuggling arbitrary data through an emoji

#143

Earlier quoted context omitted.

Just you wait until AI starts calling human output to be slop.

That's already happening - my kids have had papers unfairly blamed on chatgpt by automated tools. Protect yourself kids, use an editor that can show letter by letter history.

2 people I worked with had this happen and one of them is going to war over it as it was enough to lower the kids grade for college or something. Crazy times.

Re: Smuggling arbitrary data through an emoji

#144

Oh this is just the tip of the iceberg when it comes to abusing Unicode! You can use a similar technique to this to overflow the buffer on loads of systems that accept Unicode strings. Normally it just produces an error and/or a crash but sometimes you get lucky and it'll do all sorts of fun things! :) I remember doing penetration testing waaaaaay back in the day (before Python 3 existed) and using mere diacritics to…

Yeah. Zalgo text is a common test for input fields on websites. But it usually doesn't do anything interesting. Maybe an exception trigger on some database length limit. Doesn't typically even kill any processes. The exception is normally just in your thread. You can often trigger it just by disabling JS on even modern forms, but,, at best you're maybe leaking a bit of info if they left debug on and print the stack trace or a query. Another common slip-up is failing to count \n vs \r\n in text strings since JS usually usually counts a carriage return as 1 byte, but HTTP spec requires two.

unescape(encodeURIComponent("ç")).length is the quick and dirty way to do a JS byte length check. The \r\n thing can be done just by cleaning up the string before length counting.

Re: Smuggling arbitrary data through an emoji

#145
post #112

Earlier quoted context omitted.

"Visually identical" is never good enough. Have you heard of attacks confusing Latin letters and Cyrillic letters? For example C versus С. (The latter is known as CYRILLIC CAPITAL LETTER ES.) Have you heard of NFC forms versus NFD forms? For example é versus é (LATIN SMALL LETTER E + COMBINING ACUTE ACCENT versus LATIN SMALL LETTER E WITH ACUTE.) Nothing that's important when it comes to security and privacy should…

As the sibling comment has mentioned Unicode in DNS uses a punycode encoding but even further then that the standard specifies that the Unicode data must be normalized to NFC[0] before being converted to punycode. This means that your second example (decomposed e with combining acute accent vs the composed variant) is not a valid concern. The Cyrillic one is however. [0] https://www.rfc-editor.org/rfc/rfc5891 § 4.1 "…

The OP said link. The NFC/NFD issue remains if these are part of a path name or query parameter.

Re: Smuggling arbitrary data through an emoji

#146

I love the idea of using this for LLM output watermarking. It hits the sweet spot - will catch 99% of slop generators with no fuss, since they only copy and paste anyway, almost no impact on other core use cases. I wonder how much you’d embed with each letter or token that’s output - userid, prompt ref, date, token number? I also wonder how this is interpreted in a terminal. Really cool!

There are other possible approaches to LLM watermarking that would be much more robust and harder to detect. They exploit the fact that LLMs work by producing a probability distribution that gives a probability for each possible next token. These are then sampled randomly to produce the output. To add fingerprints when generating, you could do some trickery in how you do that sampling that would then be detectable by re-running the LLM and observing its outputs. For example, you could alternate between selecting high-probability and low-probability tokens. (A real implementation of this would be much more sophisticated than that obviously, but hopefully you get the idea)

Re: Smuggling arbitrary data through an emoji

#147
post #50
post #25

Earlier quoted context omitted.

Wow, that's interesting! I wonder if this reproduces with a different message, or if it was a lucky guess. I looked at how the strings tokenize and they do appear to conserve enough information that it could be decoded in theory.

> or if it was a lucky guess It’s like guessing 1/2 or 2/3 on a math test. The test authors pick nice numbers, and programmers like ”hello”. If the way to encode the secret message resembles other encodings, it’s probably that the pattern matching monster picked it up and is struggling to autocomplete (ie backwards rationalize) a reason why.

I did some experimentation today. I wouldn't expect AI to solve it using only their own reasoning, but I've had a decent hit rate of getting AI to solve them when they have access to a Python interpreter. Here's Gemini Flash 2 solving one (albeit it lost the spaces) in a single prompt and about 7 seconds!

https://bsky.app/profile/paulbutler.org/post/3lhzhroogws2g

Re: Smuggling arbitrary data through an emoji

#148
(author here) some people in this thread and elsewhere asked me about whether an LLM could decode this, and the answer seems to be: not likely by itself, but it often can if it has access to a Python interpreter!

Here's a demo of Gemini Flash 2 solving one in 7s: https://bsky.app/profile/paulbutler.org/post/3lhzhroogws2g

Re: Smuggling arbitrary data through an emoji

#150
post #130

StegCloak [0] is in the same ballpark and takes this idea a step further by encrypting the hidden payload via AES-256-CTR -- pretty neat little trick [0] https://github.com/KuroLabs/stegcloak

wow, thats neat. Wanted to try on Cloudflare DNS TXT record. But Cloudflare is smart enough to decode when pasting in TXT field.

DNS only supports ASCII for record values. It has a hack to support unicode domain names using Punycode
Post reply on HN