Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 目录 FILETYPE_DIR int = 0 // 泛泛指代文件,不知道具体类型 // todo 根据已知的文件,再做一个更加细致的分裂 FILECATEGORY_FILE int = 1 FILETYPE_ELF int = 3 /* 文件的重要性定义。 */ // 可以忽略的文件 FILEIMPORTANCE_IGNORE = 0 // 未知的文件,也不知道重要级别 FILEIMPORTANCE_UNKNOWN = -1 )
Variables ¶
This section is empty.
Functions ¶
func NewDefaultLog ¶
Types ¶
type BinFileInfo ¶ added in v0.0.2
type CFG ¶
type CFG struct { // 预分析的bin文件路径 BinFile string // 数据库服务器的IP地址 DBHost string // 数据库服务器的用户名 DBUser string // 数据库服务器的用户名对应的密码 DBPassword string // 数据库名 DBName string // 常见的压缩文件后缀名 CompressSuffix []string // 文件类型[类型]ID的映射表 // FileTypeMap map[string]int `json:"file type map"` // 是否忽略别名文件 IgnoreAlias bool // 需要跳过分析的目录 SkipDir []string // 未知文件加分 ScoreUnknown int // 未知elf文件加分 ScoreUnknownElf int // 未知文件后缀名 ScoreUnknownSuffix int }
func InitConfig ¶
type ExtractedFile ¶ added in v0.0.2
type ExtractedFile struct { // 文件名 Name string // 文件所在的目录 Dir string // 文件类别。区分目录和一般文件。 TypeIndex int // 文件类别名称说明。 TypeName string // 该文件的重要性。如果重要性为0,在分析的时候直接忽略。 Score int // 这个文件出现的次数 Count int // 该文件的md5值。 Md5 string // 文件的描述信息。 Description string }
文件的结构体,描述文件的信息
type Result ¶ added in v0.0.2
type Result struct { Binfile BinFileInfo KernelVersion string KernelInfo string Kernelvulnerablities []Vulnerablity Programvulnerablities []Vulnerablity }
type Version ¶
type Vulnerablity ¶ added in v0.0.2
type Vulnerablity struct { // 漏洞编号,一般为CVE或者CNVD等 ID string // 影响的内核的版本号 AffectedVersion string // 漏洞类型 Type string // 漏洞描述 Description string // 漏洞严重程度,1-10评分,1不严重,10最严重 Severity int // 修复建议 FixSuggestion string // 攻击层。 // kernel // shell // file system // user applicaion LayerOfAttack string // 攻击目标 TargetOfAttack string }
Click to show internal directories.
Click to hide internal directories.