Live data from Hacker News

Show HN: Big List of Naughty Strings for testing user-input data

github.com

61–70 of 80 posts

Re: Show HN: Big List of Naughty Strings for testing user-input data

#61

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... Is it naughty to include it here? X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* [0] https://en.wikipedia.org/wiki/EICAR_test_file

Aw, Sophos on OS X doesn't think it's a threat.

Re: Show HN: Big List of Naughty Strings for testing user-input data

#62
post #54

Earlier quoted context omitted.

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.

Should it really tell the user that it's a dangerous file? Although if it didn't, malicious files could use that to their advantage.

Yes. Otherwise the only way to verify an anti malware system is working is with something actually malicious. So, you know, that's a bad plan. Think of system administrators deploying and validating a security package.

Re: Show HN: Big List of Naughty Strings for testing user-input data

#64
post #28

Earlier quoted context omitted.

Some would argue that if you're testing on a system you can't recreate easily/quickly, you're doing devops wrong.

And I'd agree, but this would be a pretty disproportionate punishment for the crime of doing devops wrong :P

It's two crimes: doing devops wrong, and having a huge security hole.

Re: Show HN: Big List of Naughty Strings for testing user-input data

#65

Earlier quoted context omitted.

Full context, this is the beggining of the bible.

Yes, I'm lazy. :p

You'd do better with "הבה נרדה ונבלה שם שפתם אשר לא ישמעו איש שפת ראהו" (Genesis 11:7) That's God saying he will make multiple languages to confuse everyone...

Re: Show HN: Big List of Naughty Strings for testing user-input data

#66
post #19

" # Server Code Injection # # Strings which can cause user to run code on server as a privileged user (c.f. https://news.ycombinator.com/item?id=7665153 ) /dev/null; rm -rf /*; echo " That's a little aggressive for testing no?

Likewise:

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

Re: Show HN: Big List of Naughty Strings for testing user-input data

#67
post #54

Earlier quoted context omitted.

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.

Should it really tell the user that it's a dangerous file? Although if it didn't, malicious files could use that to their advantage.

From the same Wikipedia article:

>Anti-virus programmers set the EICAR string as a verified virus, similar to other identified signatures. A compliant virus scanner, when detecting the file, will respond in exactly the same manner as if it found a harmful virus. Not all virus scanners are compliant, and may not detect the file even when they are correctly configured.

Re: Show HN: Big List of Naughty Strings for testing user-input data

#68

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... Is it naughty to include it here? X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* [0] https://en.wikipedia.org/wiki/EICAR_test_file

I've submitted a PR [0] that also includes Spamassassin's GTUBE [1] which is designed to do a similar thing.

[0] https://github.com/minimaxir/big-list-of-naughty-strings/pul... [1] http://spamassassin.apache.org/gtube/

Re: Show HN: Big List of Naughty Strings for testing user-input data

#69
post #61

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... Is it naughty to include it here? X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* [0] https://en.wikipedia.org/wiki/EICAR_test_file

Aw, Sophos on OS X doesn't think it's a threat.

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)?

Re: Show HN: Big List of Naughty Strings for testing user-input data

#70
post #29

The list seems to be missing the simplest naughty string of all: The empty string! (Well, the text file has empty lines separating the comments and example strings so it technically includes the empty string, but it's not in the JSON file.)

There is a pull request pending that fixes this.

I also submitted a pull request with an infinitely long string, but it's still pending...
Post reply on HN