# agent-cpp **Repository Path**: BiuXWT/agent-cpp ## Basic Information - **Project Name**: agent-cpp - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-01-14 - **Last Updated**: 2024-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## c++ agent 在嵌入式平台,接收corpus并执行被测程序,回传crash状态,bitmap,覆盖率信息 #### 编译 ```shell mkdir build cd build #指定编译工具 cmake -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ .. make -j 4 ``` #### 配置文件 - corpus_full_path:http接收的语料(http-body部分),保存到该文件 - target_full_path:被测目标的绝对路径 - target_option:被测目标的命令行参数列表 - target_env:共享内存的环境变量名 > abfast:__ABF_SHM_ID afl++: __AFL_SHM_ID - shared_mem_size:共享内存大小 > `8M` `64K` 两种 - server_port:http服务的端口 示例: ```json { "corpus_full_path": "/home/root/test/input/corpus", "target_full_path": "/home/root/test/test", "target_option": ["/home/root/test/test","/home/root/test/input/corpus"], "target_env": ["__ABF_SHM_ID"], "shared_mem_size": "64K", "server_port": 8080 } ``` #### 语料接收及执行 语料发送到 `ip:port/abfuzz/abproxy/v1/projects/{project_id}/fuzzings/{fuzzing_id}/corpus` 路径,会保存在配置文件的 `corpus_full_path` 指定的文件中, 随后按照配置文件中的命令行参数启动被测目标完成一次测试,被测目标需要harness来解析这个文件并执行,