GithubHelp home page GithubHelp logo

Comments (11)

elarlang avatar elarlang commented on June 27, 2024 2

We have requirement 2.1.3:

# Description L1 L2 L3 CWE NIST ยง
2.1.3 [MODIFIED] Verify that passwords are not truncated. (C6) โœ“ โœ“ โœ“ 521 5.1.1.2

Maybe we can make it more abstract, idea:
Verify that the application compares and hashes the password from the user as it was sent without doing any modification such as truncation or transforming to lowercase.

from asvs.

Sjord avatar Sjord commented on June 27, 2024 1

Nice, I've shortened it a bit:

Verify that the application verifies the user's password exactly as received from the user, without any modifications such as truncation or case transformation.

from asvs.

jmanico avatar jmanico commented on June 27, 2024

from asvs.

elarlang avatar elarlang commented on June 27, 2024

Never seen it in practice... but whatever the policy is, if an attacker figures it out (and it is not hard to do that), it makes guessing passwords so much easier.

I think it's worth a separate or to be mentioned in some requirement - it is easy to test, easy to (not) implement, and for that effort, it provides a good impact.

from asvs.

jmanico avatar jmanico commented on June 27, 2024

from asvs.

csfreak92 avatar csfreak92 commented on June 27, 2024

Wordsmithing it a little bit just to make it clear where we are sending it to:

Verify that the application compares and hashes the password from the user as it was sent to the back-end without doing any modification such as truncation or transforming to lowercase.

What do you think?

from asvs.

elarlang avatar elarlang commented on June 27, 2024

I analyzed my proposal and was able to verify 2 problems:

  • it is not aligned with NIST, which allows to replacement multiple consecutive space characters with a single space character
  • old-school applications add salt and pepper "manually" to the password and as it happens before hashing, one may interpret the requirement to disallow that

Quotes from NIST SP 800-63B

from asvs.

jmanico avatar jmanico commented on June 27, 2024

from asvs.

Sjord avatar Sjord commented on June 27, 2024

I don't understand why NIST has this exception for multiple spaces. Typing multiple spaces by accident does not seem common to me. Does anyone have more insight into why an exception is added for this particular situation? I think it's reasonable if the ASVS requires application to match as-is, and don't collapse multiple spaces.

I agree that this can be merged with 2.1.3, about truncating passwords.

old-school applications add salt and pepper "manually" to the password and as it happens before hashing, one may interpret the requirement to disallow that

I think this can be solved with a little bit better phrasing. It also depends on what you define as the "hash algorithm", whether that includes adding the salt or only concerns the MD5 function.

Perhaps we can leave it a bit more vague:

Verify that passwords are processed by the application exactly as received from the user, without any modifications such as truncation or case transformation.

Or we can define it more functionally and less technically. Only the exact password that the user configured should give access to the application.

Verify that the application grants access solely based on the exact password configured by the user without any alterations, such as trunaction or case transformation.

from asvs.

elarlang avatar elarlang commented on June 27, 2024

"granting access" goes already away from authentication topic.

One more proposal:

Verify that the application uses the password from the user for password verification exactly as received from the user, without any modifications such as truncation or case transformation.

from asvs.

elarlang avatar elarlang commented on June 27, 2024

I created PR #1814 , also removed CWE as it was not correct.

from asvs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.