Invisible Malicious Unicode Risks

This wiki page explains the security risk of invisible characters in Unicode that can be copied and pasted into terminal emulators or introduced as vulnerabilities/backdoors in source code contributions, along with documentation that can help to check files and folders for malicious Unicode.
OOPS! They tricked me to install MALWARE! Clipboard Hidden Text Attacks explained
Contents
Unicode as a Security Risk[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Unicode?oldid=92071#Unicode_as_a_Security_Risk
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Unicode#Unicode_as_a_Security_Risk|Unicode as a Security Risk]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Unicode as a Security Risk](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Unicode_as_a_Security_Risk)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Unicode as a Security Risk](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Unicode_as_a_Security_Risk)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Unicode?oldid=92071#Unicode_as_a_Security_Risk]Unicode as a Security Risk[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
There are invisible characters that might be copied that can do malicious actions. This is a security risk for:
- A) For users: Commands copied and pasted into a terminal emulator.
- B) For developers: Introduction of invisible vulnerabilities or backdoors through source code contributions.
These adversarial encodings produce no visual artifacts probably in most editors and terminals.
Original attack research:
https://trojansource.codes/
Forum discussion:
https://forums.whonix.org/t/detecting-malicious-unicode-in-source-code-and-pull-requests/13754
Checking Files for Unicode[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Unicode?oldid=92071#Checking_Files_for_Unicode
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Unicode#Checking_Files_for_Unicode|Checking Files for Unicode]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Checking Files for Unicode](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Checking_Files_for_Unicode)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Checking Files for Unicode](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Checking_Files_for_Unicode)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Unicode?oldid=92071#Checking_Files_for_Unicode]Checking Files for Unicode[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
NOTE: Not all unicode in files is necessarily malicious. Only some unicode characters in some files is suspicious or potentially malicious.
grep-find-unicode-wrapper
[1] can help to check files for unicode.
Syntax for files:
grep-find-unicode-wrapper /path/to/filename
Example for files:
Note: The following example check file ~/.bashrc
. Replace ~/.bashrc
with the actual file to check.
Click = Copy Copied to clipboard! grep-find-unicode-wrapper ~/.bashrc
Syntax for folders:
grep-find-unicode-wrapper -r /path/to/folder
Example for folders:
Note: The following example check the user's home folder. Replace ~/
with a different folder if another folder should be checked.
Click = Copy Copied to clipboard! grep-find-unicode-wrapper -r ~/
Expected output:
- A) If no unicode has been found: None.
- B) If unicode has been found: All lines that include unicode.
Resources[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Unicode?oldid=92071#Resources
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Unicode#Resources|Resources]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Resources](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Resources)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Resources](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Resources)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Unicode?oldid=92071#Resources]Resources[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
- gcc protects from this https://www.phoronix.com/news/GCC-LLVM-Trojan-Source
but other compilers and script interpreters don't even have bug reports.
- "31m"?! ANSI Terminal security in 2023 and finding 10 CVEs
- https://www.bleepingcomputer.com/news/security/phishing-attack-hides-javascript-using-invisible-unicode-trick
- https://x.com/aemkei/status/1843756978147078286
- https://embracethered.com/blog/posts/2024/terminal-dillmas-prompt-injection-ansi-sequences/
See Also[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Unicode?oldid=92071#See_Also
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Unicode#See_Also|See Also]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[See Also](https://www.kicksecure.com/wiki/Unicode?oldid=92071#See_Also)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[See Also](https://www.kicksecure.com/wiki/Unicode?oldid=92071#See_Also)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Unicode?oldid=92071#See_Also]See Also[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
Footnotes[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Unicode?oldid=92071#Footnotes
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Unicode#Footnotes|Footnotes]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Footnotes](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Footnotes)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Footnotes](https://www.kicksecure.com/wiki/Unicode?oldid=92071#Footnotes)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Unicode?oldid=92071#Footnotes]Footnotes[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.


Copy as Wikitext

for Discourse, reddit, GitHub

Copy as Markdown

Copy as phpBB Click below ↴ = Open social URL with share data











We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!