shadow1ng/fscan · error
%s [invalid_file_type]
Error message
%s [invalid_file_type]
What it means
File-type guard in ldpreload Scan: the configured target file exists but fails p.isValidFile, i.e. it is not a valid shared object (.so) file, so it cannot be used for LD_PRELOAD persistence. The plugin returns a failed Result carrying the i18n invalid_file_type message, with ldpreload_so_required printed to the output buffer.
Source
Thrown at plugins/local/ldpreload.go:76
}
// 检查目标文件是否存在
if _, err := os.Stat(targetFile); os.IsNotExist(err) {
output.WriteString(i18n.Tr("target_file_not_exist", targetFile) + "\n")
return &plugins.Result{
Success: false,
Output: output.String(),
Error: err,
}
}
// 检查文件类型
if !p.isValidFile(targetFile) {
output.WriteString(i18n.Tr("ldpreload_so_required", targetFile) + "\n")
return &plugins.Result{
Success: false,
Output: output.String(),
Error: fmt.Errorf("%s", i18n.GetText("invalid_file_type")),
}
}
output.WriteString(i18n.GetText("ldpreload_header") + "\n")
output.WriteString(i18n.Tr("local_target_file", targetFile) + "\n")
output.WriteString(i18n.Tr("local_platform", runtime.GOOS) + "\n\n")
var successCount int
// 1. 复制文件到系统目录
systemPath, err := p.copyToSystemPath(targetFile)
if err != nil {
output.WriteString(i18n.Tr("ldpreload_copy_system_failed", err) + "\n")
} else {
output.WriteString(i18n.Tr("file_copied_to", systemPath) + "\n")
successCount++
}
View on GitHub (pinned to 95cc12e753)
Solutions
- Provide a correctly built ELF shared library compiled for the target arch
- Re-upload the payload if it was corrupted in transit
- Verify with 'file' that the artifact is a shared object
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at plugins/local/ldpreload.go:76 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/0c4bc47f1e3d80ac.
Report an issue: GitHub.