结构: Simple
Abstraction: Variant
状态: Draft
被利用可能性: unkown
The J2EE application directly uses sockets instead of using framework method calls.
The J2EE standard permits the use of sockets only for the purpose of communication with legacy systems when no higher-level protocol is available. Authoring your own communication protocol requires wrestling with difficult security issues.
Without significant scrutiny by a security expert, chances are good that a custom communication protocol will suffer from security problems. Many of the same issues apply to a custom implementation of a standard protocol. While there are usually more resources available that address security concerns related to implementing a standard protocol, these resources are also available to attackers.
cwe_Nature: ChildOf cwe_CWE_ID: 695 cwe_View_ID: 1000 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 695 cwe_View_ID: 699 cwe_Ordinal: Primary
Language: {'cwe_Name': 'Java', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Other | Quality Degradation |
策略:
Use framework method calls instead of using sockets directly.
The following example opens a socket to connect to a remote server.
bad Java
A Socket object is created directly within the Java servlet, which is a dangerous way to manage remote connections.
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
7 Pernicious Kingdoms | J2EE Bad Practices: Sockets | ||
Software Fault Patterns | SFP3 | Use of an improper API |