跳转到帖子

游客您好,欢迎来到黑客世界论坛!您可以在这里进行注册。

赤队小组-代号1949(原CHT攻防小组)在这个瞬息万变的网络时代,我们保持初心,创造最好的社区来共同交流网络技术。您可以在论坛获取黑客攻防技巧与知识,您也可以加入我们的Telegram交流群 共同实时探讨交流。论坛禁止各种广告,请注册用户查看我们的使用与隐私策略,谢谢您的配合。小组成员可以获取论坛隐藏内容!

TheHackerWorld官方

[事件响应]如何使用FastFinder快速搜索可疑文件

精选回复

发布于

[事件响应]如何使用FastFinder快速搜索可疑文件

624cf5053e2bc.jpg

关于FastFinder

FastFinder是一款功能强大的安全事件应急响应工具,在该工具的帮助下,广大研究人员可以快速寻找并定位可疑文件。

FastFinder也是一款轻量级的工具,适用于Windows和Linux平台上的威胁搜索、实时取证和分类。该工具主要侧重于终端枚举以及基于各种标准的可疑文件查找:

1、文件路径/名称

2、MD5/SHA1/SHA256校验和

3、简单的字符串内容匹配

4、基于YARA规则的复杂内容匹配条件

FastFinder已在多个CERT、CSIRT和SOC真实场景中进行过大量测试。

项目的示例目录中包含了真实的恶意软件以及可疑行为以供广大研究人员进行测试和扫描。

工具安装

FastFinder可以在Linux平台上完美运行,跟其他Go语言程序不同的是,如果我们需要使用源码编译和运行的话,则需要安装一些库和编译工具。FastFinder依赖于libyara、go-yara和CGO实现其功能。

工具要求

1、Go >= 1.17

2、正确配置GOPATH / GOOS / GOARCH

3、管理员权限

编译YARA

首先,我们需要下载YARA最新版发布源码:【下载地址】。

第二步,确保已经在本地设备上安装并配置好了automake、libtool、make、gcc和pkg-config,然后按照下列命令解压并编译YARA:

tar -zxf yara-<version>.tar.gz

cd <version>.

./bootstrap.sh

./configure

make

make install

第三步,运行测试样例以确保工具正常运行:

make check

配置CGO

我们可以使用CGO_CFLAGS和CGO_LDFLAGS环境变量来配置CGO:

export CGO_CFLAGS="-I<YARA_SRC_PATH>/libyara/include"

export CGO_LDFLAGS="-L<YARA_SRC_PATH>/libyara/.libs -lyara"

工具编译

现在,我们就可以使用下列命令编译FastFinder了:

go build -tags yara_static -a -ldflags '-s -w' .

工具使用

___       __  ___  ___         __   ___  __

 |__   /\  /__`  |  |__  | |\ | |  \ |__  |__)

 |    /~~\ .__/  |  |    | | \| |__/ |___ |  \

 

  2021-2022 | Jean-Pierre GARNIER | @codeyourweb

  https://github.com/codeyourweb/fastfinder  

 

usage: fastfinder [-h|--help] [-c|--configuration "<value>"] [-b|--build

                  "<value>"] [-o|--output "<value>"] [-n|--no-window]

                  [-u|--no-userinterface] [-v|--verbosity <integer>]

                  [-t|--triage]

 

                  Incident Response - Fast suspicious file finder

 

Arguments:

 

  -h  --help              打印帮助信息

  -c  --configuration      FastFinder配置文件

  -b  --build             输出一个带有配置和规则信息的包

  -o  --output            将FastFinder日志文件保存到指定文件

  -n  --no-window        隐藏FastFinder窗口

  -u  --no-userinterface   隐藏高级用户接口

  -v  --verbosity          文件日志Verbose

                                 | 4: 仅提醒

                                 | 3: 警告和错误

                                 | 2: 警告、错误和I/O操作

                                 | 1: 完整Verbose

                                . Default: 3

  -t  --triage             分类模式 (infinite run - 扫描输入路径目录中的每一个新文件,默认为false

该工具在运行时,将取决于我们所要搜索的文件来决定使用管理员权限或简单用户权限。

根据需要扫描并导出匹配的文件

input:

    path: [] # match file path AND / OR file name based on simple string

    content:

        grep: [] # match literal string value inside file content

        yara: [] # use yara rule and specify rules path(s) for more complex pattern search (wildcards / regex / conditions)

        checksum: [] # parse for md5/sha1/sha256 in file content

options:

    contentMatchDependsOnPathMatch: true # if true, paths are a pre-filter for content searchs. If false, paths and content both generate matchs

    findInHardDrives: true # enumerate hard drive content

    findInRemovableDrives: true # enumerate removable drive content

    findInNetworkDrives: true # enumerate network drive content

    findInCDRomDrives: true # enumerate physical CD-ROM and mounted iso / vhd...

output:

    copyMatchingFiles: true # create a copy of every matching file

    base64Files: true # base64 matched content before copy

    filesCopyPath: '' # empty value will copy matched files in the fastfinder.exe folder

advancedparameters:

    yaraRC4Key: ''    # yara rules can be (un)/ciphered using the specified RC4 key

    maxScanFilesize: 2048 #  ignore files up to maxScanFileSize Mb (default: 2048)               

    cleanMemoryIfFileGreaterThanSize: 512 # clean fastfinder internal memory after heavy file scan (default: 512Mb)

本项目也提供了可供参考的配置样本:【点我获取】

内容搜索

1、在路径中使用“?”来实现简单的字符通配符,例如“powershe??.exe”;

2、在路径中使用“\*”来实现多个字符的字符通配符,例如“\*.exe”;

3、该工具也支持正则表达式,只需要使用斜杠包裹路径即可,例如“/[0-9]{8}\.exe/”;

4、该工具也支持使用环境变量,例如“%TEMP%\myfile.exe”;

发布版本

FastFinder v2.0.0:【Releases】

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

项目地址

FastFinder:【GitHub传送门】

参考资料

https://github.com/codeyourweb/fastfinder/blob/master/examples

https://github.com/VirusTotal/yara

本文作者:Alpha_h4ck

创建帐户或登录后发表意见

最近浏览 0

  • 没有会员查看此页面。