Fpicker:一款支持多种模式的模糊测试工具套件

VSole2021-10-06 16:49:58

关于Fpicker

Fpicker是一款基于Frida的模糊测试套件,可以帮助广大研究人员以多种模式来进行渗透测试,例如AFL++模式或被动追踪模式等。值得一提的是,该工具可以在所有支持Firda的系统平台上运行。

工具要求

Fpicker运行要求

frida_compile

frida-core-devkit

AFL++模式要求

macOS:

使用“CFLAGS=”-DUSEMMAP=1””编译。

iOS:

应用aflpp-ios.patch,Fpicker需要在iOS上以root用户身份运行,如果目标不是以root用户身份运行,它将无法读取和写入共享内存。接下来,使用“CFLAGS=”-DUSEMMAP=1””编译。

工具安装

广大研究人员可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/ttdennis/fpicker.git

项目构建和运行

Fpicker可以在macOS、iOS或Linux平台上运行。Makefile当前仅支持针对iOS和macOS平台进行构建,但我们也可以使用iOS工具链来针对Linux平台进行项目构建。

make fpicker-macos
make fpicker-ios
make fpicker-linux

项目构建完成之后,我们就可以继续构建模糊测试组件了。

首先,我们需要针对目标创建一个自定义模糊测试组件(例如examples/test/test.js)。

接下来,使用frida-compile编译自定义组件:

frida-compile test.js -o harness.js

现在,Fpicker就可以开始对目标进行模糊测试了。具体要执行的命令取决于我们的配置。接下来,我们会给出一些简单的使用样例,大部分样例都在项目中的“examples”目录中给出了。

以AFL++代理运行Fpicker,并跟目标进程绑定,然后测试指定功能函数:

afl-fuzz -i examples/test-network/in -o ./examples/test-network/out -- \\./fpicker --fuzzer-mode afl -e attach -p test-network -f ./examples/test-network/harness.js

以单独模式运行Fpicker,跟服务器绑定,运行一个客户端程序来发送模糊测试输出:

./fpicker --fuzzer-mode standalone -e attach -p server-process -f harness.js --input-mode cmd \\--command "./client-send @@" -i indir -o outdir

以单独模式运行Fpicker,跟服务器绑定,使用自定义变异cmd进行模糊测试:

./fpicker --fuzzer-mode active --communication-mode shm -e attach -p server-process -f harness.js \\-i indir -o outdir --standalone-mutator cmd --mutator-command "radamsa"

以单被动模式运行Fpicker,跟服务器绑定,收集覆盖率和Payload:

./fpicker --fuzzer-mode passive --communication-mode send -e attach -p server-process -o outdir -f harness.js

以单独模式运行Fpicker,跟远程设备上一个正在运行绑定,使用自定义变异cmd进行模糊测试:

./fpicker --fuzzer-mode active -e attach -p test -D remote -o examples/test/out/ -i examples/test/in/ \\-f fuzzer-agent.js --standalone-mutator cmd --mutator-command "radamsa"

创建自定义模糊测试组件

我们需要针对不同的目标创建自定义模糊测试组件。下面给出的是一个组件实现样例:

// Import the fuzzer base class
const Fuzzer = require("harness/fuzzer.js");// The custom fuzzer needs to subclass the Fuzzer class to work properly
class TestFuzzer extends Fuzzer.Fuzzer {
    constructor() {
        // The constructor needs to specify the address of the targeted function and a NativeFunction
        // object that can later be called by the fuzzer.        const FUZZ_FUNCTION_ADDR = Module.getExportByName(null, "FUZZ_FUNCTION");
        const FUZZ_FUNCTION = new NativeFunction(
            FUZZ_FUNCTION_ADDR,
            "void", ["pointer", "int64"], {
        });
        super("test", FUZZ_FUNCTION_ADDR, FUZZ_FUNCTION);    }
}
const f = new TestFuzzer();
exports.fuzzer = f;

参考资料

https://insinuator.net/2021/03/fpicker-fuzzing-with-frida/

https://frida.re/docs/javascript-api/#stalker

https://github.com/AFLplusplus/AFLplusplus/

https://github.com/frida/frida-compile

https://github.com/frida/frida/releases

本作品采用《CC 协议》,转载必须注明作者和本文链接
Fpicker一款基于Frida模糊测试套件,可以帮助广大研究人员以多种模式来进行渗透测试,例如AFL++模式或被动追踪模式等。值得一提的是,该工具可以在所有支持Firda系统平台上运行。
联邦调查局 透露,古巴勒索软件团伙已经破坏了来自美国关键基础设施部门至少49个组织网络。相反,这会促使勒索软件针对更多受害者进行操作,并激励其他网络犯罪团体加入他们进行类似非法活动。然而,联邦机构承认勒索软件攻击可能对企业造成损害,因为高管可能被迫考虑支付赎金以保护股东、客户或员工。联邦调查局强烈敦促向当地联邦调查局外地办事处报告此类事件。
由于对破解版广泛使用,NVISO 研究人员发现公网 Cobalt Strike 服务器中有超过四分之一使用加密密钥对都是相同,使用这些密钥就可以对部分加密 Cobalt Strike 流量进行解密。
VSole
网络安全专家