fscan/plugins/services/neo4j/exploiter.go
ZacharyZcR 4a3f281b6b refactor: 统一Plugins目录大小写为小写
- 将所有Plugins路径重命名为plugins
- 修复Git索引与实际文件系统大小写不一致问题
- 确保跨平台兼容性和路径一致性
2025-08-12 13:08:06 +08:00

42 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package neo4j
import (
"context"
"fmt"
"github.com/shadow1ng/fscan/common"
"github.com/shadow1ng/fscan/plugins/base"
)
// Neo4jExploiter Neo4j利用器实现
type Neo4jExploiter struct{}
// NewNeo4jExploiter 创建Neo4j利用器
func NewNeo4jExploiter() *Neo4jExploiter {
return &Neo4jExploiter{}
}
// Exploit 执行Neo4j利用
func (e *Neo4jExploiter) Exploit(ctx context.Context, info *common.HostInfo, creds *base.Credential) (*base.ExploitResult, error) {
// Neo4j插件主要用于服务识别和认证测试不进行进一步利用
return &base.ExploitResult{
Success: false,
Error: fmt.Errorf("Neo4j插件不支持进一步利用"),
}, nil
}
// GetExploitMethods 获取支持的利用方法
func (e *Neo4jExploiter) GetExploitMethods() []base.ExploitMethod {
return []base.ExploitMethod{
{
Name: "信息收集",
Type: base.ExploitDataExtraction,
Description: "收集Neo4j图数据库信息",
},
}
}
// IsExploitSupported 检查是否支持指定的利用类型
func (e *Neo4jExploiter) IsExploitSupported(method base.ExploitType) bool {
return method == base.ExploitDataExtraction
}