您好,登錄后才能下訂單哦!
這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)?lái)有關(guān)怎么使用Gargamel工具,文章內(nèi)容豐富且以專(zhuān)業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
Gargamel是一款基于Rust開(kāi)發(fā)的信息安全取證工具,廣大研究人員可以使用Gargamel來(lái)完成日常的信息取證任務(wù)。
廣大研究人員可以使用下列命令將該項(xiàng)目源碼克隆至本地:
git clone https://github.com/Lifars/gargamel.git
假設(shè)你已經(jīng)在本地設(shè)備上安裝并配置好了Rust v1.41+,打開(kāi)終端窗口,并切換到項(xiàng)目目錄下,輸入下列命令即可編譯項(xiàng)目:
cargo build --release
我們可以使用下列命令編譯調(diào)試構(gòu)建:
cargo build
已編譯好的可執(zhí)行文件可以在target/release/gargamel.exe或target/debug/gargamel.exe路徑下找到。
我們可以按照下列方式修改工具的日志記錄等級(jí):
打開(kāi)src/main.rs;
在第42和43行,將LevelFilter::Info修改為L(zhǎng)evelFilter::Trace即可查看更多詳細(xì)日志信息;
注意,LevelFilter::Trace將會(huì)記錄下包括密碼在內(nèi)的所有內(nèi)容;
現(xiàn)在,這款應(yīng)用程序僅支持在Windows系統(tǒng)上運(yùn)行,目標(biāo)設(shè)備必須是Windows或Linux系統(tǒng)。你還需要確保下列程序已經(jīng)存儲(chǔ)在了跟Gargamel相同的目錄之中:
psexec:【下載】
paexec:【下載】
winpmem:【下載】
plink和pscp:【下載】
SharpRDP:【下載】
WMImplant:【下載】
exe:【下載】
Gargamel需要在具備高級(jí)權(quán)限的終端中啟動(dòng)才能完全發(fā)揮其功能。目前,它不支持UAC對(duì)話框,也不支持在有限權(quán)限下運(yùn)行時(shí)的任何類(lèi)型的通知。當(dāng)以有限的用戶權(quán)限運(yùn)行時(shí),一些操作(如目標(biāo)內(nèi)存轉(zhuǎn)儲(chǔ))將不起作用。
假設(shè)你想要連接到一臺(tái)帶有下列參數(shù)的計(jì)算機(jī):
地址:192.168.42.47
用戶名:Jano
密碼:nbusr123
下列命令將利用PsExec方法獲取防火墻狀態(tài)、網(wǎng)絡(luò)狀態(tài)、登錄用戶、運(yùn)行進(jìn)程、活動(dòng)網(wǎng)絡(luò)連接、注冊(cè)表、系統(tǒng)&應(yīng)用事件日志。獲取到的取證信息將存儲(chǔ)在Gargamel的testResults目錄下:
gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults
Gargamel將會(huì)詢(xún)問(wèn)輸入遠(yuǎn)程用戶的密碼,我們這里的密碼為nbusr123。注意,密碼在輸入過(guò)程中是隱藏的。
我們還可以直接在命令行參數(shù)中指定用戶名和密碼:
gargamel.exe -c 192.168.42.47 -u Jano --psexec -p nbusr123 -o testResults
假設(shè)你想要連接到域中一臺(tái)帶有下列參數(shù)的計(jì)算機(jī):
域:WORKSPACE
計(jì)算機(jī)名:JanovPC
用戶名:Jano
密碼:nbusr123
下列命令將利用PsExec方法獲取防火墻狀態(tài)、網(wǎng)絡(luò)狀態(tài)、登錄用戶、運(yùn)行進(jìn)程、活動(dòng)網(wǎng)絡(luò)連接、注冊(cè)表、系統(tǒng)&應(yīng)用事件日志:
gargamel.exe -c JanovPC -u Jano -d WORKSPACE --psexec -o testResults
或者,直接在命令行參數(shù)中指定目標(biāo)設(shè)備信息:
gargamel.exe -c JanovPC -u Jano -d WORKSPACE --psexec -p nbusr123 -o testResults
PsExec是其中一種支持的連接方法,我們可以將--psexec替換為下列選項(xiàng):
--psexec
--psrem
--rdp
--wmi
--ssh
我們也可以一次使用多種方法。比如說(shuō),同時(shí)使用PsExec和RDP:
gargamel.exe -c 192.168.42.47 -u Jano --psexec --rdp -o testResults
為了獲取內(nèi)存導(dǎo)轉(zhuǎn)儲(chǔ),可以直接在參數(shù)后添加-m選項(xiàng):
gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -m
如果你只需要獲取內(nèi)存轉(zhuǎn)儲(chǔ)而不需要其他取證信息,可以直接使用下列命令:
gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -m --no-events-search --no-evidence-search --no-registry-search
這個(gè)功能目前僅支持目標(biāo)為Windows系統(tǒng)的主機(jī)。
Gargamel可以在遠(yuǎn)程主機(jī)中運(yùn)行自定義Windows CMD或Linux Shell命令。
我們需要使用下列內(nèi)容創(chuàng)建一個(gè)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
接下來(lái),我們就可以使用-e選項(xiàng)來(lái)運(yùn)行上述命令了:
gargamel.exe -c 192.168.42.47 -u Jano --psexec -o testResults -e custom-commands.txt
Gargamel能夠下載遠(yuǎn)程文件,首先我們需要使用下列內(nèi)容創(chuàng)建一個(gè)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
接下來(lái),我們就可以使用-s選項(xiàng)來(lái)運(yùn)行上述命令了:
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無(wú)法將輸出寫(xiě)入至包含“_”符號(hào)的路徑/文件名中。
上述就是小編為大家分享的怎么使用Gargamel工具了,如果剛好有類(lèi)似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。