千家信息网

怎么使用Gargamel工具

发表于:2025-02-07 作者:千家信息网编辑
千家信息网最后更新 2025年02月07日,这期内容当中小编将会给大家带来有关怎么使用Gargamel工具,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。GargamelGargamel是一款基于Rust开发的
千家信息网最后更新 2025年02月07日怎么使用Gargamel工具

这期内容当中小编将会给大家带来有关怎么使用Gargamel工具,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。

Gargamel

Gargamel是一款基于Rust开发的信息安全取证工具,广大研究人员可以使用Gargamel来完成日常的信息取证任务。

工具下载

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

git clone https://github.com/Lifars/gargamel.git

项目编译

假设你已经在本地设备上安装并配置好了Rust v1.41+,打开终端窗口,并切换到项目目录下,输入下列命令即可编译项目:

cargo build --release

我们可以使用下列命令编译调试构建:

cargo build

已编译好的可执行文件可以在target/release/gargamel.exe或target/debug/gargamel.exe路径下找到。

设置日志等级

我们可以按照下列方式修改工具的日志记录等级:

打开src/main.rs;

在第42和43行,将LevelFilter::Info修改为LevelFilter::Trace即可查看更多详细日志信息;

注意,LevelFilter::Trace将会记录下包括密码在内的所有内容;

用户指南

现在,这款应用程序仅支持在Windows系统上运行,目标设备必须是Windows或Linux系统。你还需要确保下列程序已经存储在了跟Gargamel相同的目录之中:

psexec:【下载

paexec:【下载

winpmem:【下载

plink和pscp:【下载

SharpRDP:【下载

WMImplant:【下载

exe:【下载

Gargamel的使用

Gargamel需要在具备高级权限的终端中启动才能完全发挥其功能。目前,它不支持UAC对话框,也不支持在有限权限下运行时的任何类型的通知。当以有限的用户权限运行时,一些操作(如目标内存转储)将不起作用。

基础使用

假设你想要连接到一台带有下列参数的计算机:

地址:192.168.42.47

用户名:Jano

密码:nbusr123

下列命令将利用PsExec方法获取防火墙状态、网络状态、登录用户、运行进程、活动网络连接、注册表、系统&应用事件日志。获取到的取证信息将存储在Gargamel的testResults目录下:

gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults

Gargamel将会询问输入远程用户的密码,我们这里的密码为nbusr123。注意,密码在输入过程中是隐藏的。

我们还可以直接在命令行参数中指定用户名和密码:

gargamel.exe -c 192.168.42.47 -u Jano --psexec -p nbusr123 -o testResults

域使用

假设你想要连接到域中一台带有下列参数的计算机:

域:WORKSPACE

计算机名:JanovPC

用户名:Jano

密码:nbusr123

下列命令将利用PsExec方法获取防火墙状态、网络状态、登录用户、运行进程、活动网络连接、注册表、系统&应用事件日志:

gargamel.exe -c JanovPC -u Jano -d WORKSPACE --psexec -o testResults

或者,直接在命令行参数中指定目标设备信息:

gargamel.exe -c JanovPC -u Jano -d WORKSPACE --psexec -p nbusr123 -o testResults

其他连接方式

PsExec是其中一种支持的连接方法,我们可以将--psexec替换为下列选项:

--psexec

--psrem

--rdp

--wmi

--ssh

我们也可以一次使用多种方法。比如说,同时使用PsExec和RDP:

gargamel.exe -c 192.168.42.47 -u Jano --psexec --rdp -o testResults

获取内存

为了获取内存导转储,可以直接在参数后添加-m选项:

gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -m

如果你只需要获取内存转储而不需要其他取证信息,可以直接使用下列命令:

gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -m --no-events-search --no-evidence-search --no-registry-search

这个功能目前仅支持目标为Windows系统的主机。

运行自定义命令

Gargamel可以在远程主机中运行自定义Windows CMD或Linux Shell命令。

我们需要使用下列内容创建一个custom-commands.txt文件:

# Will be run using any methodipconfig# Will run only when launching with at least one of --all, --psexec, --wmi methods:psexec:wmi ipconfig -all

接下来,我们就可以使用-e选项来运行上述命令了:

gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -e custom-commands.txt

下载自定义文件

Gargamel能够下载远程文件,首先我们需要使用下列内容创建一个custom-files.txt文件:

C:\Users\Public\sss*C:\Users\Jano\danove.pdf# This line and the next one will be ignored# C:\Users\Jano\somBajecny.pptx

接下来,我们就可以使用-s选项来运行上述命令了:

gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -s custom-files.txt

所有选项

USAGE:    gargamel.exe [FLAGS] [OPTIONS] --user  FLAGS:    -a, --all                   Acquire evidence from Windows machine using all supported methods (PsExec, PsRemote,                                WMI, RDP).        --no-events-search      Disables Windows event logs acquisition.        --no-evidence-search    Disables acquisition of evidence that can be usually downloaded quickly (like ipconfig,                                firewall status etc..)        --no-registry-search    Disables target registry acquisition.    -h, --help                  Prints help information    -m, --mem-image             Optional: Memory dump of a target Windows machine.        --local                 Acquire evidence from local machine.        --nla                   Optional: Use network level authentication when using RDP. (Windows targets only)        --no-7z                 Optional: Disable 7zip compression for registry & memory images.This will significantly                                decrease the running time, but WMI and RDP connections will probably not work properly.                                    (Windows targets only)        --psexec                Acquire evidence from Windows machine using PsExec. Requires both PsExec64.exe and                                paexec.exe in the current directory or in the path.        --psrem                 Acquire evidence from Windows machine using PowerShell. Requires both PsExec64.exe and                                paexec.exe in the current directory or in the path.        --rdp                   Acquire evidence from Windows machine using RDP. Requires SharpRDP.exe in the current                                directory or in the path.        --ssh                   Acquire evidence from Linux machine using SSH. Requires both plink.exe and pscp.exe in                                the current directory or in the path.    -V, --version               Prints version information        --wmi                   Acquire evidence from Windows machine using WMI. Requires WMImplant.ps1 in the current                                directory or in the path and PowerShell 3.0+ on the host machine.Note: It is necessary                                to disable Windows Defender real-time protection (other AVs not tested). OPTIONS:    -c, --computer                         Remote computer address/name. [default: 127.0.0.1]    -u, --user                                 Remote user name    -d, --domain                             Optional: Remote Windows domain    -o, --output             Name of local directory to store the evidence [default: evidence-output]     -p, --password             Optional: Remote user password. Skipping this option will prompt a possibility to put a password in hidden            way.To specify an empty password use `-p ""`         --redownload             Optional: Download and DELETE specified file from target computer. Use this in case of previous failed            partially completed operation. For just downloading a file (without deleting it) please use a `search`            switch. If you specify a 7zip chunk (.7z.[chunk-number], e.g. .7z.004), then it will also automatically try to            download subsequent chunks.Use also with --psexec --psrem, --rdp, --wmi, --all     -r, --remote-storage             Name of remote directory to be used as a temporary storage. (Windows targets only) [default:            C:\Users\Public]     -e, --commands              Optional: File with custom commands to execute on remote computer     -s, --search             Optional: File with files names to be searched on remote computer. File names supports also `*` and `?`            wildcards on file names (but not yet parent directories).         --key                               Optional: Name/path of SSH private key file. (Linux target only)         --timeout             Optional: Timeout in seconds for long running operations.This option is a workaround for a bug in            WMImplant.ps1 amd SharpRDP.exe where finishing of a long running operation cannot sometimes properly close            the connection leaving the Gargamel in seemingly frozen state or executing the next operation with the            previous one unfinished on target site.Increasing this timeout may solve issues when acquiring registry or            memory image from target machine. [default: 300]

存在的问题

WMI无法将输出写入至包含"_"符号的路径/文件名中。

上述就是小编为大家分享的怎么使用Gargamel工具了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注行业资讯频道。

命令 运行 用户 密码 信息 文件 工具 内容 参数 日志 系统 支持 内存 方法 状态 目标 网络 项目 取证 编译 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 鸿蒙软件开发看什么书 四川电脑软件开发服务费 如何引导孩子注意网络安全 只狼一直登陆服务器 天下手游公测服务器 家庭成员数据库设计 数据库中没有找到对应的表 学习软件开发需要下什么软件 沈阳软件开发驻场收费报价表 在国内不用备案的服务器 关系数据库系统发展史 计算机网络技术学完可以考吗 攀枝花软件开发平均价格 软件开发这行累吗 数据库借阅者信息 网络安全风险与法律论文 网络安全管理工作体系 建立自己的数据库用什么软件好 比较靠谱的手机测评数据库 北京优势软件开发价格表格 软件开发带隐形眼镜有用吗 张家港中高端服务器厂家直销价格 河北龙赫网络技术有限公司 图书全文数据库 苏州诚信软件开发专业服务 网络安全全球最好的学校 网络安全可视化 高校网络安全技能大赛简报 河南服务器负载均衡云主机 软件开发专业的二本大学
0