-
-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Cryptography reqs be Level 1 #2477
Comments
6.3.1 - if it is not practically easily guessable in some time-frame, but if it is not CSPRNG? For others, I would like to see a high likelihood and/or impact attack scenario that only relies on given requirements. In another issue (#2476) you used arguments:
Why not here? |
I don't believe that using good crypto algorithms has a high barrier to entry. This is a pretty low bar and these requirements involve using very standard and well supported algorithms.
Makes up for it by being quite easy to verify white box (unlike input validation) and in many cases there will be ways of doing this black box as well, e.g. burp sequencer for insufficient random, https://hashes.com/en/tools/hash_identifier. |
One this is for sure, we have quite a different view on this. You have you beliefs but I have not seen arguments on attack scenarios. |
I would include these in L1 as well:
Reasons:
For this requirements and some others, having an simple L1 application which complies with the requirement is not very difficult: don't use crypto in your application code, let the frameworks do the stuff for me and you should be fine. Using custom crypto code without make these verification might lead you to make dangerous design choices (when used with broken crypto) and you would better use a different design which avoids cryptography. Typical examples I have seen in the wild:
I would even claim that this type of pattern is probably prevalent in L1-level applications and that having these requirements might force the authors of L1 applications to remove dubious cryptography and implement a proper design (such as fixing the lack of correct authorization). |
Let's be clear - do we talk about 1st or 2nd layer of defense here? Important - I don't say we don't need those requirements, I want to understand, are those worth the L1 spotlight. Is the likelihood/impact close to SQL injection, trivial authentication or authorization bypass?
There are many things that are not difficult to check, (e.g. cookie attributes), but it does not make it L1. We move away from "testability".
Can you provide me a "L1 worth" attack scenario using this? First example is more like authorization problem to solve? Is it better solution, when used some other crypto-algorithm instead of where some simple user authorization would have been fine? Second example - to be not required in L1 does not mean you need to make your own crypto. If we could use that view, we shoul put a lot of things into L1. The question here is, how critical is this problem to be solved as a first things to do. |
Yes, I agree that these examples might be more a problem of something else is not quite right in the design of the application (such as the authorization should be fixed). So there are two cases to consider for the broken/fake crypto usage:
A simple case would be for digital signature (which not covered in the requirement but probably should). If the application is generating tokens using ECDSA and reuses nonces, the private key can be recovered and the token can be forged. I think we could come up with interesting attacks when some state is stored in encrypted token in cookies. I'll try to expand on this. If 6.5.1 is L1, it would probably make sense to have 6.5.3 and probably 6.2.2 as well. |
+1 @randomstuff I back this general direction as well. Nice example, thank you. |
We currently have an explanation of the thinking around L1 which can be found here.
There are a few major areas where we have differing opinions about whether a particular type of control falls into the category of L1 for version 5.0.
This issue is to discuss cryptography requirements from the current chapter 6.
The only requirements being considered for L1 are below (ignore the level marking below). It is agreed (between Josh and Elar for now) that the others in this chapter are not L1.
I personally believe that these requirements do belong in L1 for the following reasons:
The text was updated successfully, but these errors were encountered: