用户工具

站点工具


cwe:cn:definition:59

CWE-59:在文件访问前对链接解析不恰当(链接跟随)

Description Summary

The software attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Background Details

Soft links are a UNIX term that is synonymous with simple shortcuts on windows based platforms.

Likelihood of Exploit

Low to Medium

Common Consequences

Scope Technical Impace Note
Confidentiality
Integrity
Access_Control
Read files or directories
Modify files or directories
Bypass protection mechanism
An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism than an attacker may be able to bypass the mechanism.
OtherRemote Execution: Windows simple shortcuts, sometimes referred to as soft links, can be exploited remotely since an ”.LNK” file can be uploaded like a normal file.

Detection Methods

Detection Method - 1

Automated Static Analysis - Binary / Bytecode

According to SOAR, the following detection techniques may be useful:

Detection Method - 2

Manual Static Analysis - Binary / Bytecode

According to SOAR, the following detection techniques may be useful:

Detection Method - 3

=== Dynamic Analysis with automated results interpretation === According to SOAR, the following detection techniques may be useful:

Detection Method - 4

Dynamic Analysis with manual results interpretation

According to SOAR, the following detection techniques may be useful:

Detection Method - 5

Manual Static Analysis - Source Code

According to SOAR, the following detection techniques may be useful:

Detection Method - 6

Automated Static Analysis - Source Code

According to SOAR, the following detection techniques may be useful:

Detection Method - 7

Architecture / Design Review

According to SOAR, the following detection techniques may be useful:

Potential Mitigations

Mitigation - 1

Architecture and Design

Strategy:Separation of Privilege

Follow the principle of least privilege when assigning access rights to entities in a software system.

Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

2013/05/30 09:37

Observed Examples

Reference Description
CVE-1999-1386Some versions of Perl follows symbolic links when running with the -e option, which allows local users to overwrite arbitrary files via a symlink attack.
CVE-2000-1178Text editor follows symbolic links when creating a rescue copy during an abnormal exit, which allows local users to overwrite the files of other users.
CVE-2004-0217Antivirus update allows local users to create or append to arbitrary files via a symlink attack on a logfile.
CVE-2003-0517Symlink attack allows local users to overwrite files.
CVE-2004-0689Window manager does not properly handle when certain symbolic links point to “stale” locations, which could allow local users to create or truncate arbitrary files.
CVE-2005-1879Second-order symlink vulnerabilities
CVE-2005-1880Second-order symlink vulnerabilities
CVE-2005-1916Symlink in Python program
CVE-2000-0972Setuid product allows file reading by replacing a file being edited with a symlink to the targeted file, leaking the result in error messages when parsing fails.
CVE-2005-0824Signal causes a dump that follows symlinks.
CVE-2001-1494Hard link attack, file overwrite; interesting because program checks against soft links
CVE-2002-0793Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files.
CVE-2003-0578Server creates hard links and unlinks files as root, which allows local users to gain privileges by deleting and overwriting arbitrary files.
CVE-1999-0783Operating system allows local users to conduct a denial of service by creating a hard link from a device special file to a file on an NFS file system.
CVE-2004-1603Web hosting manager follows hard links, which allows local users to read or modify arbitrary files.
CVE-2004-1901Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles.
CVE-2005-1111Hard link race condition
CVE-2000-0342Mail client allows remote attackers to bypass the user warning for executable attachments such as .exe, .com, and .bat by using a .lnk file that refers to the attachment, aka “Stealth Attachment.”
CVE-2001-1042FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
CVE-2001-1043FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
CVE-2005-0587Browser allows remote malicious web sites to overwrite arbitrary files by tricking the user into downloading a .LNK (link) file twice, which overwrites the file that was referenced in the first .LNK file.
CVE-2001-1386”.LNK.” - .LNK with trailing dot
CVE-2003-1233Rootkits can bypass file access restrictions to Windows kernel directories using NtCreateSymbolicLinkObject function to create symbolic link
CVE-2002-0725File system allows local attackers to hide file usage activities via a hard link to the target file, which causes the link to be recorded in the audit trail instead of the target file.
CVE-2003-0844Web server plugin allows local users to overwrite arbitrary files via a symlink attack on predictable temporary filenames.
cwe/cn/definition/59.txt · 最后更改: 2014/09/04 14:42 (外部编辑)