Most of what I do involves the messy world of text, and I think this is a great resource. I wish the software I depended on tested against it.
I can think of a few more cases that I've seen cause havoc: - U+FEFF in the middle of a string (people are used to seeing it at the beginning of a string, because Microsoft, but elsewhere it may be more surprising) - U+0 (it's encoded as the null byte!) - U+1B (the codepoint for "escape") - U+85 (Python's "codecs" module thinks this is a newline, while the "io" module and the Python 3 standard library don't) - U+2028 and U+2029 (even weirder linebreaks that cause disagreement when used in JSON literals) - A glyph with a million combining marks on it, but not in NFC order (do your Unicode algorithms use insertion sort?) - The sequence U+100000 U+010000 (triggers a weird bug in Python 3.2 only) - "Forbidden" strings that are still encodable, such as U+FFFF, U+1FFFF, and for some reason U+FDD0 People should also test what happens with isolated surrogate codepoints, such as U+D800. But these can't properly be encoded in UTF-8, so I guess don't put them in the BLNS. (If you put the fake UTF-8 for them in a file, the best thing for a program to do would be to give up on reading the file.)
Isolated UTF-16 surrogate code points definitely crash Unity when it tries to display them. (Seen when I pasted some emoji in a text box in TIS-100 and tried to backspace.)
It's supposed to be reserved for applications. In practice... you may see them in the wild anyway. So it's important that they show up in test vectors!
One fun (and very interesting) string is EICAR[0]. I worked for an antivirus company once and we had the EICAR string for testing but couldn't check it into source control because it triggered the AV software which we dogfooded...
Fun times indeed. Windows defender picks up a test.txt with those contents as malicious (and closes the file handle causing Notepad to misbehave) but if you add a space between EI and CAR it doesn't see anything.
Edit: Seriously, Microsoft? Category: Virus Description: This program is dangerous and replicates by infecting other files. Recommended action: Remove this software immediately. Items:
file:C:\Users\Adam\Desktop\test.txt
Microsoft is doing the right thing. The whole point of that string is to trigger such behaviour. It's so you can use it to test that your antivirus is working.
Without giving too much away, I was sufficiently surprised by that that I downloaded the Sophos for Mac Home Edition. It does recognise it.
Here's what I get: http://i.imgur.com/JQzVsQf.png This was picked up by the on-access scanner and a manual scan. The Web Protection doesn't complain about the text in a page (rightly or wrongly). Are you using a centrally managed version (i.e. not Home Edition)?
Interestingly, I found what caused the false-negative. If I used Vim to create the file, it was picked up. If I "echo ...EICAR > text.txt" it doesn't get picked up, at least not immediately!
Yeah, I would make the SQL injection and command injections test a little less kinetic =). Using a simple SELECT test, like SELECT @@VERSION, would be a little safer... Edit: Forget to say thanks! This is a pretty cool list.
Not necessarily. If you do a test with good SQL and a second test with SQL Injection and compare the responses that can show SQL Injection exists without having to change the database. This won't work for all SQL injection tests, but I would rather take this approach first.
Comments (79) 27 threads
I can think of a few more cases that I've seen cause havoc:
- U+FEFF in the middle of a string (people are used to seeing it at the beginning of a string, because Microsoft, but elsewhere it may be more surprising)
- U+0 (it's encoded as the null byte!)
- U+1B (the codepoint for "escape")
- U+85 (Python's "codecs" module thinks this is a newline, while the "io" module and the Python 3 standard library don't)
- U+2028 and U+2029 (even weirder linebreaks that cause disagreement when used in JSON literals)
- A glyph with a million combining marks on it, but not in NFC order (do your Unicode algorithms use insertion sort?)
- The sequence U+100000 U+010000 (triggers a weird bug in Python 3.2 only)
- "Forbidden" strings that are still encodable, such as U+FFFF, U+1FFFF, and for some reason U+FDD0
People should also test what happens with isolated surrogate codepoints, such as U+D800. But these can't properly be encoded in UTF-8, so I guess don't put them in the BLNS. (If you put the fake UTF-8 for them in a file, the best thing for a program to do would be to give up on reading the file.)
Continue this thread — 1 reply
/dev/null; rm -rf /*; echo " That's a little aggressive for testing no?
1;DROP TABLE users 1'; DROP TABLE users--
Seems a bit hairy to have that in there in case someone tries to run these tests on their prod environment
So someone may test against prod if they didn't really know what these things could do.
Is it naughty to include it here?
[0] https://en.wikipedia.org/wiki/EICAR_test_fileEdit: Seriously, Microsoft?
Category: Virus
Description: This program is dangerous and replicates by infecting other files.
Recommended action: Remove this software immediately.
Items: file:C:\Users\Adam\Desktop\test.txt
Continue this thread — 2 replies
Here's what I get: http://i.imgur.com/JQzVsQf.png
This was picked up by the on-access scanner and a manual scan. The Web Protection doesn't complain about the text in a page (rightly or wrongly).
Are you using a centrally managed version (i.e. not Home Edition)?
Continue this thread — 1 reply
[0] https://github.com/minimaxir/big-list-of-naughty-strings/pul... [1] http://spamassassin.apache.org/gtube/
All comments shown.
Couldn't load more comments. Check your connection and try again.