您好,登錄后才能下訂單哦!
這期內容當中小編將會給大家帶來有關怎么使用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需要在具備高級權限的終端中啟動才能完全發揮其功能。目前,它不支持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 method ipconfig # 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 <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 <computer> Remote computer address/name. [default: 127.0.0.1] -u, --user <user> Remote user name -d, --domain <domain> Optional: Remote Windows domain -o, --output <local-store-directory> Name of local directory to store the evidence [default: evidence-output] -p, --password <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 <re-download> 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 <remote-store-directory> Name of remote directory to be used as a temporary storage. (Windows targets only) [default: C:\Users\Public] -e, --commands <custom-command-path> Optional: File with custom commands to execute on remote computer -s, --search <search-files-path> 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 <ssh-key> Optional: Name/path of SSH private key file. (Linux target only) --timeout <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工具了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關知識,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。