Reputation
68,085
Next tag badge:
679/400 score
78/80 answers
Badges
19 169 264
Newest
 aes
Impact
~3.1m people reached

Apr
20
comment XSS between tags when only < and > are encoded?
@pee2pee Not in your VERY specific example. But I'll edit again to show how even then it's broken.
Apr
20
comment XSS between tags when only < and > are encoded?
@pee2pee No. See my edit.
Apr
20
comment XSS between tags when only < and > are encoded?
@pee2pee Right, which is why I said "if you only filter for script tags". Your question wasn't clear as to which approach you were actually taking. But, realistically, you need to filter for a number of characters (at least ><"&'/). Triangle bracket fitlering alone won't help you if you echo content into an attribute, for example. As the XSS Prevention Cheat Sheet I linked you says, you need a proper secure encoding library.
Apr
14
comment What security impact is caused by a TLS server continuing the handshake when presented with an invalid SNI?
Great answer as usual, Tom. Thanks!
Apr
12
comment Is a reversible microphone kill switch in hardware plausible?
@Vessik As an after-market mod to a modern smartphone it's difficult. You could do it, probably, with a really low-profile DIP switch and a hole in the case, but it'd be hacky. As an in-built feature it'd be easily doable. But the link you showed was talking about a laptop, so there's plenty of space there.
Apr
12
comment Why shouldn't we roll our own?
@lepe Rather coincidentally, answered by me ;)
Apr
8
comment how is public key being exchanged in asymmetric cryptography?
In what system? You can exchange it in lots of ways. In PKI, each server's certificate (containing the public key) is signed by the private key of a CA, whose corresponding public key is pre-installed into your device's key store. But this is just one way of doing it; it's entirely dependent on the protocol / system.
Apr
8
comment Question on MAC(Message Authentication code)?
@Xander You are correct; a MAC, by its very definition, provides integrity. But this is a by-product of the fact that authenticity automatically implies integrity (if you had no integrity, you couldn't prove authenticity, at least in any scheme I'm aware of). I just thought it important to separate the terms to be absolutely clear.
Apr
7
comment Question on MAC(Message Authentication code)?
Slight nitpick: A MAC provides message authenticity, whereas a MIC provides message integrity. In many cases these are the same, and in most cases one implies the other, but in some cases this is not the case. Interchanging the terms can lead to misunderstandings. An example would be a manifest file containing plain SHA256 hashes of files, which itself is signed with RSA or similar. The plain hashes provide integrity, whereas the digital signature provides authenticity. The threat models against the two components of such a scheme are different, and this is important.
Apr
7
comment Incrementing Work-Factor of Hash Functions Over Time
In addition to this, I'd note that it's worth re-evaluating which password storage function you're using periodically too, to keep in line with modern practices. Additionally, once you've verified that no users in your database have old hashes any more (this helps if you implement the lockout and blanking method), you should remove the code from your system which handles the older hash verification.
Apr
6
comment Are there any examples of huge damages done by password leaks, or bad password management policies?
The problem with measuring losses from password breaches is that they're not reported. A stolen password often compromises another account elsewhere, which makes it hard to track the initial breach point unless it's highly publicised. There's also the reselling market for personal information to consider, where consumer costs are even less measurable. You're much better off looking at data breaches in terms of cost-to-business, particularly in relation to regulatory fines (e.g. fines handed out by the ICO in the UK), without limiting yourself to breaches of passwords.
Mar
30
comment Is it possible to crack g++ rand()?
I suspect this is a challenge of sorts, which is why I didn't provide a "this is how you win" walkthrough answer. And also because that's a lot of effort. But regardless, you're right - LCG/LFSR designs simply aren't of the right quality for security purposes.
Mar
29
comment How does SSL/TLS work?
Four years later and I've now written a working TLS implementation in Python as the basis of a spec-correctness test. The answers here were a fantastic reference alongside the official spec.
Mar
15
comment Virus Encoded in Video
@Pacerier VLC itself? Feb 2015 was VLC's last security bulletin. But VLC relies on a whole host of decoder libraries which could also be vulnerable, e.g. ffmpeg 2.8.6 fixed five security-impacting bugs in Feb 2016. So the real answer is "continuously".
Mar
15
comment What does it actually mean when someone says their website is hacked?
@BobEbert No, I mean an insecure direct object reference bug.
Feb
28
comment Is my developer's home-brew password security right or wrong, and why?
@MateenUlhaq No, because if you know what the shuffle is (which you have to assume an attacker does; i.e. Kerckhoffs's principle) then you can trivially un-shuffle and crack it regardless. It should also be noted that standard cryptographic hashes are TERRIBLE for storing passwords.
Feb
10
comment Is it safe to binary-deserialize user-provided data?
@deed02392 It's just part of an example of a class someone might write.
Feb
5
comment Is this c# digital signature implementation secure?
Without going into a full answer, there are issues here. You're using strings a lot (they're immutable and won't be cleared by the GC reliably), you've not checked that results are as expected (e.g. using fixed array indices from split strings without checking array length), there's no exception handling, etc.
Jan
12
comment What is a YubiKey and how does it work?
@ott The round contact is for you to press. It's what triggers it to type its stored data.
Dec
16
comment Is my developer's home-brew password security right or wrong, and why?
@monster That's a common way of denoting placeholder variables, hence why the comment says "user data". They'll be filled in with actual values from the calling code.