.png)
Abstract:
Hardcoded password 可能会危及系统安全性,并且无法轻易修正出现的安全问题。
Explanation:
使用硬编码方式处理密码绝非好方法。这不仅是因为所有项目开发人员都可以使用通过硬编码方式处理的密码,而且还会使解决这一问题变得极其困难。一旦代码投入使用,除非对软件进行修补,否则您再也不能改变密码了。如果帐户中的密码保护减弱,系统所有者将被迫在安全性和可行性之间做出选择。
示例:以下代码使用 hardcoded password 来连接应用程序和检索地址簿条目:
...
obj = new XMLHttpRequest(); obj.open('GET','/fetchusers.jsp?id='+form.id.value,'true','scott','tiger');
...
该代码会正常运行,但是任何能够访问其中所包含的网页的人都能得到这个密码。
Instance ID: 847A3E3204A25FCA6A424B6AB801BC03
Priority Metadata Values:
IMPACT: 4.0
LIKELIHOOD: 3.2
Legacy Priority Metadata Values:
SEVERITY: 4.0
CONFIDENCE: 5.0
Remediation Effort: 3.0
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Recommendations:
绝不能对密码进行硬编码。通常情况下,应对密码加以模糊化,并在外部资源文件中进行管理。如果将密码以明文形式存储在网站中任意位置,会造成任何有充分权限的人读取和无意中误用密码。对于需要输入密码的 JavaScript 引用,最好在连接时就提示用户输入密码。
Tips:
1. 避免在源代码中对密码进行硬编码,还要避免使用默认密码。如果 hardcoded password 处于缺省状态,则需要修改密码,使其不出现在源代码中。
2. 识别 null password、empty password 和 hardcoded password 时,默认规则只会考虑包含 password 字符的字段和变量。但是,HPE Security Fortify Custom Rules Editor(HPE Security Fortify 自定义规则编辑器)会提供 Password Management 向导,让您轻松创建能够从自定义名称的字段和变量中检测出 password management 问题的规则。
References:
[1] Standards Mapping - Common Weakness Enumeration, CWE ID 259, CWE ID 798
[2] Standards Mapping - FIPS200, IA
[3] Standards Mapping - NIST Special Publication 800-53 Revision 4, SC-28 Protection of Information at Rest (P1)
[4] Standards Mapping - OWASP Mobile Top 10 Risks 2014, M2 Insecure Data Storage
[5] Standards Mapping - OWASP Top 10 2004, A8 Insecure Storage
[6] Standards Mapping - OWASP Top 10 2007, A8 Insecure Cryptographic Storage
[7] Standards Mapping - OWASP Top 10 2010, A7 Insecure Cryptographic Storage
[8] Standards Mapping - OWASP Top 10 2013, A6 Sensitive Data Exposure
[9] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1, Requirement 6.5.8, Requirement 8.4
[10] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2, Requirement 6.3.1.3, Requirement 6.5.8, Requirement 8.4
[11] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0, Requirement 6.3.1, Requirement 6.5.3, Requirement 8.4
[12] Standards Mapping - Payment Card Industry Data Security Standard Version 3.0, Requirement 6.3.1, Requirement 6.5.3, Requirement 8.2.1
[13] Standards Mapping - Payment Card Industry Data Security Standard Version 3.1, Requirement 6.3.1, Requirement 6.5.3, Requirement 8.2.1
[14] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2, Requirement 6.3.1, Requirement 6.5.3, Requirement 8.2.1
[15] Standards Mapping - SANS Top 25 2009, Porous Defenses - CWE ID 259
[16] Standards Mapping - SANS Top 25 2010, Porous Defenses - CWE ID 798
[17] Standards Mapping - SANS Top 25 2011, Porous Defenses - CWE ID 798
[18] Standards Mapping - Security Technical Implementation Guide Version 3.1, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[19] Standards Mapping - Security Technical Implementation Guide Version 3.10, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[20] Standards Mapping - Security Technical Implementation Guide Version 3.4, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[21] Standards Mapping - Security Technical Implementation Guide Version 3.5, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[22] Standards Mapping - Security Technical Implementation Guide Version 3.6, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[23] Standards Mapping - Security Technical Implementation Guide Version 3.7, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[24] Standards Mapping - Security Technical Implementation Guide Version 3.9, APP3210.1 CAT II, APP3340 CAT I, APP3350 CAT I
[25] Standards Mapping - Security Technical Implementation Guide Version 4.1, APSC-DV-001740 CAT I, APSC-DV-002330 CAT II, APSC-DV-003110 CAT I, APSC-DV-003270 CAT II, APSC-DV-003280 CAT I
[26] Standards Mapping - Web Application Security Consortium 24 + 2, Insufficient Authentication
[27] Standards Mapping - Web Application Security Consortium Version 2.00, Insufficient Authentication (WASC-01)
- Fortify漏洞之Dynamic Code Evaluation: Code Injection(动态脚本注入)和 Password Management: Hardcoded Password(密码硬编码)
继续对Fortify的漏洞进行总结,本篇主要针对 Dynamic Code Evaluation: Code Injection(动态脚本注入) 和 Password Management: Har ...
- 密码硬编码(Password Management: Hardcoded Password)
在对项目进行安全扫描时,发现一些密码硬编码问题,本文主要三个方面:1)什么是密码硬编码:2)密码硬编码的危害:3)密码硬编码的解决方案. 一 什么是密码硬编码 将密码以明文的形式直接写到代码中,就是密 ...
- mysql学习之-密码管理(默认密码,修改密码,解决忘记密码)
1. mysql安装后默认没有密码,初始化安装后默认密码登录,需要马上修改root密码.[root@mysql ~]# cat /root/.mysql_secret --查看root账号密码# ...
- Linux CentOS7 VMware usermod命令、用户密码管理、mkpasswd命令
一. usermod命令 usermod可用来修改用户帐号的各项设定 -c, --comment 注释 GECOS 字段的新值 -d, --home HOME_DIR 用户的新主目录 -e, --ex ...
- 系统用户与用户组管|chfn、密码管理、身份切换、sudo
2 系统用户与用户组管理 GID为GroupId,即组ID,用来标识用户组的唯一标识符 UID为UserId,即用户ID,用来标识每个用户的唯一标示符 /etc/passwd /etc/shadow ...
- Password Management:Password in Configuration File 密码管理:配置文件中的密码
- Key Management: Hardcoded Encryption key 密钥管理:硬编码加密密钥
- Fortify Audit Workbench 笔记 Password Management: Password in Configuration File(明文存储密码)
Password Management: Password in Configuration File(明文存储密码) Abstract 在配置文件中存储明文密码,可能会危及系统安全. Explana ...
- 自动化运维工具Fabric - 密码管理(env.password and ssh key)
在使用 Fabric 的过程中,如果大批量服务器处理的话,我们就需要针对配置主机的密码,每台主机的密码相同还好,不同的话,就需要针对不同的主机做配置了,以下有两种配置方式 注:本文主要参考官方文档 P ...
随机推荐
- react-starter-projects
react-starter-projects These are repositories that you copy and modify to create your own React app. ...
- JavaScript新手经常遇到的问题(二)
1.Form表单只提交数据而不进行页面跳转的方法 <script type="text/javascript" src="js/jquery/jquery-1.8. ...
- luogu P2985 [USACO10FEB]吃巧克力Chocolate Eating
题目描述 Bessie拿到了N (1 <= N <= 50,000)块巧克力.她决定想个办法吃掉这些巧克力,使得它在吃巧克力的这段时间里,最不开心的一天尽可能的开心.并且一共吃D (1 & ...
- 使用ASP.NET Core 3.x 构建 RESTful API - 3.3 状态码、错误/故障、ProblemDetails
HTTP状态码 HTTP状态码会告诉API的消费者以下事情: 请求是否执行成功了 如果请求失败了,那么谁为它负责 HTTP的状态码有很多,但是Web API不一定需要支持所有的状态码.HTTP状态码一 ...
- 去除npm run dev日志warn记录
目录 一 babel的一些eslint方法废除了 问题 解决方案 相关文档 二 webpack的loaderUtils.parseQuery()被废弃了 问题 解决方案 相关文档 三 postcss相 ...
- Java修炼——面向对象的三大特征_多态_多态的三个必要条件
多态指的是同一个方法调用,由于对象不同可能会有不同的行为,现实生活中,同一个方法,具体实现会完全不同. 多态的要点: 1.多态是方法的多态,不是属性的多态(多态与属性无关) 2.多态的存在有三个必要条 ...
- Zookeeper选取机制
1)半数机制:集群中半数以上机器存活,集群可用.所以Zookeeper适合安装奇数台服务器. 2)Zookeeper虽然在配置文件中并没有指定Master和Slave.但是,Zookeeper工作时, ...
- CoderForces Round526 (A~E)题解
A. The Fair Nut and Elevator time limit per test 1 second memory limit per test 256 megabytes input ...
- gtest、cmake使用
gtest github: https://github.com/google/googletest 学习:玩转Google开源C++单元测试框架Google Test系列(gtest)(总) 一.安 ...
- C++ 并发编程指南(收藏笔记)
git地址: https://github.com/forhappy/Cplusplus-Concurrency-In-Practice https://github.com/forhappy/Cpl ...