Executar análise estática (SAST) na base de código à procura do padrão inseguro no fluxo de dados.
Windows Shortcut Following (.LNK)
This vulnerability occurs when an application opens a file or directory without properly validating that it is a Windows shortcut (.LNK). If the shortcut's target points to a location outside the…
What is CWE-64?
Real-world CVEs caused by CWE-64
-
network access control service executes program with high privileges and allows symlink to invoke another executable or perform DLL injection.
-
Mail 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."
-
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
-
FTP server allows remote attackers to read arbitrary files and directories by uploading a .lnk (link) file that points to the target file.
-
Browser 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.
-
".LNK." - .LNK with trailing dot
-
Rootkits can bypass file access restrictions to Windows kernel directories using NtCreateSymbolicLinkObject function to create symbolic link
Trajeto do atacante passo a passo
- 1
Identificar um caminho de código que trata input não confiável sem validação.
- 2
Criar um payload que explora o comportamento inseguro — injeção, traversal, overflow ou abuso de lógica.
- 3
Entregar o payload através de um pedido normal e observar a reação da aplicação.
- 4
Iterar até que a resposta exponha dados, execute código do atacante ou escale privilégios.
Vulnerable pseudo
A MITRE não publicou um exemplo de código para este CWE. O padrão abaixo é ilustrativo — consulte os Recursos para referências canónicas.
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
// Untrusted input flows directly into the sensitive sink.
return executeUnsafe(input);
} Secure pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
const safe = validateAndEscape(input);
return executeWithGuards(safe);
} How to prevent CWE-64
- Architecture and Design 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.
How to detect CWE-64
Executar testes dinâmicos de segurança de aplicações (DAST) contra o endpoint em execução.
Monitorizar os registos em tempo de execução para traços de exceção invulgares, input malformado ou tentativas de contornar a autorização.
Revisão de código: sinalizar qualquer novo código que trate input desta superfície sem usar os ajudantes validados do framework.
O Plexicus deteta automaticamente o CWE-64 e abre um PR de correção em menos de 60 segundos.
O Codex Remedium analisa cada commit, identifica esta fraqueza exata e entrega um pull request pronto para revisão com o patch. Sem tickets. Sem transferências.
Frequently asked questions
O que é o CWE-64?
This vulnerability occurs when an application opens a file or directory without properly validating that it is a Windows shortcut (.LNK). If the shortcut's target points to a location outside the application's intended security boundary, an attacker can trick the software into accessing unauthorized files.
Qual a gravidade do CWE-64?
A MITRE classifica a probabilidade de exploração como Baixa — a exploração é pouco comum, mas a fraqueza deve mesmo assim ser corrigida quando descoberta.
Que linguagens ou plataformas são afetadas pelo CWE-64?
MITRE lists the following affected platforms: Windows.
Como posso prevenir o CWE-64?
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.
Como é que o Plexicus deteta e corrige o CWE-64?
O motor SAST do Plexicus correlaciona a assinatura de fluxo de dados do CWE-64 em cada commit. Quando é encontrada uma correspondência, o nosso agente Codex Remedium abre um PR de correção com o código corrigido, testes e um resumo de uma linha para o revisor.
Onde posso saber mais sobre o CWE-64?
A MITRE publica a definição canónica em https://cwe.mitre.org/data/definitions/64.html. Pode também consultar a documentação da OWASP e do NIST para orientações adjacentes.
Weaknesses related to CWE-64
Improper Link Resolution Before File Access ('Link Following')
This vulnerability occurs when an application uses a filename to access a file but fails to properly check if that name points to a…
Insecure Operation on Windows Junction / Mount Point
This vulnerability occurs when a Windows application opens a file or directory without properly validating that the path is not a symbolic…
UNIX Symbolic Link (Symlink) Following
This vulnerability occurs when a software application opens files or directories without properly checking if they are symbolic links…
UNIX Hard Link
This vulnerability occurs when an application opens a file or directory without verifying if the name points to a hard link that leads…
Windows Hard Link
This vulnerability occurs when a Windows application opens a file or directory without properly verifying if the path points to a hard…
Pare de pagar por desenvolvedor.
Comece a fechar o ciclo.
O Plexicus é o ASPM nativo de IA que verifica, filtra, corrige, pentesta e explica — de forma autónoma. Programadores ilimitados, repos ilimitados, ações de IA de utilização justa. Nível gratuito real, €269/mo anual quando estiver pronto.