Hayabusa คือ เครื่องมือสร้างไทม์ไลน์การพิสูจน์หลักฐานบันทึกเหตุการณ์ที่รวดเร็วของ Windows และ เครื่องมือค้นหาภัยคุกคาม ที่สร้างโดยกลุ่มรักษาความปลอดภัย Yamato ในญี่ปุ่น ฮายาบูสะ แปลว่า "เหยี่ยวเพเรกริน" ในภาษาญี่ปุ่น และได้รับเลือกให้เป็นเหยี่ยวเพเรกรินเป็นสัตว์ที่เร็วที่สุดในโลก ล่าสัตว์เก่งและฝึกได้ดีมาก เขียนด้วยภาษา Rust และรองรับการทำงานแบบมัลติเธรดเพื่อให้ทำงานได้เร็วที่สุด เราได้จัดเตรียมเครื่องมือในการแปลงกฎ Sigma เป็นรูปแบบกฎของ Hayabusa กฎการตรวจจับ Hayabusa ที่เข้ากันได้กับ Sigma เขียนขึ้นใน YML เพื่อให้ปรับแต่งและขยายได้ง่ายที่สุด Hayabusa สามารถรันบนระบบที่ทำงานเพียงระบบเดียวสำหรับการวิเคราะห์แบบเรียลไทม์ โดยการรวบรวมบันทึกจากระบบเดียวหรือหลายระบบสำหรับการวิเคราะห์แบบออฟไลน์ หรือโดยการรันสิ่งประดิษฐ์ Hayabusa ด้วย Velociraptor สำหรับการตามล่าภัยคุกคามและการตอบสนองต่อเหตุการณ์ทั่วทั้งองค์กร เอาต์พุตจะถูกรวมเป็นไทม์ไลน์ CSV เดียวเพื่อการวิเคราะห์ที่ง่ายดายใน LibreOffice, Timeline Explorer, Elastic Stack, Timesketch ฯลฯ...
evtx
ที่ได้รับการดูแลมากขึ้น-T
ตัวเลือก)-H
)-M
Multiline Output)computer-metrics
computer-metrics
computer-metrics
eid-metrics
eid-metrics
eid-metrics
eid-metrics
logon-summary
logon-summary
logon-summary
pivot-keywords-list
pivot-keywords-list
pivot-keywords-list
search
search
search
ไฟล์กำหนดค่าคำสั่งcsv-timeline
csv-timeline
csv-timeline
json-timeline
json-timeline
และไฟล์ปรับแต่งlevel-tuning
level-tuning
level-tuning
list-profiles
set-default-profile
set-default-profile
update-rules
update-rules
minimal
standard
verbose
all-field-info
all-field-info-verbose
super-verbose
timesketch-minimal
timesketch-verbose
ปัจจุบัน Hayabusa มีกฎ Sigma มากกว่า 4,000 กฎและกฎการตรวจจับในตัวของ Hayabusa มากกว่า 170 กฎ โดยมีการเพิ่มกฎเพิ่มเติมเป็นประจำ สามารถใช้สำหรับการตามล่าภัยคุกคามเชิงรุกทั่วทั้งองค์กร เช่นเดียวกับ DFIR (Digital Forensics and Incident Response) ได้ฟรีด้วยสิ่งประดิษฐ์ Hayabusa ของ Velociraptor ด้วยการรวมเครื่องมือโอเพ่นซอร์สทั้งสองนี้เข้าด้วยกัน คุณจะสามารถสร้าง SIEM ย้อนหลังได้เมื่อไม่มีการตั้งค่า SIEM ในสภาพแวดล้อม คุณสามารถเรียนรู้เกี่ยวกับวิธีการทำเช่นนี้ได้โดยการชมคำแนะนำ Velociraptor ของ Eric Capuano ที่นี่
การวิเคราะห์บันทึกเหตุการณ์ของ Windows เดิมทีเป็นกระบวนการที่ยาวและน่าเบื่อมาก เนื่องจากบันทึกเหตุการณ์ของ Windows คือ 1) ในรูปแบบข้อมูลที่ยากต่อการวิเคราะห์ และ 2) ข้อมูลส่วนใหญ่เป็นสัญญาณรบกวนและไม่มีประโยชน์สำหรับการตรวจสอบ เป้าหมายของฮายาบูสะคือการดึงเฉพาะข้อมูลที่เป็นประโยชน์ออกมาและนำเสนอในรูปแบบที่กระชับที่สุดเท่าที่จะเป็นไปได้ที่อ่านง่าย ซึ่งไม่เพียงแต่นักวิเคราะห์ที่ได้รับการฝึกอบรมอย่างมืออาชีพเท่านั้น แต่ยังใช้งานได้กับผู้ดูแลระบบ Windows ด้วย ฮายาบูสะหวังว่าจะให้นักวิเคราะห์ทำงานเสร็จ 80% ใน 20% ของเวลาทั้งหมด เมื่อเปรียบเทียบกับการวิเคราะห์บันทึกเหตุการณ์ของ Windows แบบเดิม
-T
ตัวเลือก) -H
) -M
Multiline Output) คุณสามารถเรียนรู้วิธีวิเคราะห์ไทม์ไลน์ CSV ใน Excel และ Timeline Explorer ได้ที่นี่
คุณสามารถเรียนรู้วิธีนำเข้าไฟล์ CSV ลงใน Elastic Stack ได้ที่นี่
คุณสามารถเรียนรู้วิธีนำเข้าไฟล์ CSV ลงใน Timesketch ได้ที่นี่
คุณสามารถเรียนรู้วิธีวิเคราะห์ผลลัพธ์ในรูปแบบ JSON ด้วย jq
ได้ที่นี่
|equalsfield
และ |endswithfield
0xc0000234
-> ACCOUNT LOCKED
)โปรดดาวน์โหลด Hayabusa เวอร์ชันเสถียรล่าสุดพร้อมไบนารีที่คอมไพล์แล้ว หรือคอมไพล์ซอร์สโค้ดจากหน้าเผยแพร่
เราจัดเตรียมไบนารีสำหรับสถาปัตยกรรมต่อไปนี้:
hayabusa-xxx-lin-aarch64-gnu
)hayabusa-xxx-lin-x64-gnu
)hayabusa-xxx-lin-x64-musl
)hayabusa-xxx-mac-aarch64
)hayabusa-xxx-mac-x64
)hayabusa-xxx-win-aarch64.exe
)hayabusa-xxx-win-x64.exe
)hayabusa-xxx-win-x86.exe
)ด้วยเหตุผลบางประการ ไบนารี Linux ARM MUSL ทำงานไม่ถูกต้อง ดังนั้นเราจึงไม่ได้จัดเตรียมไบนารีนั้นไว้ มันอยู่นอกเหนือการควบคุมของเรา ดังนั้นเราจึงวางแผนที่จะให้บริการในอนาคตเมื่อได้รับการแก้ไข
ตั้งแต่เวอร์ชัน 2.18.0 เป็นต้นไป เรามีแพ็คเกจ Windows พิเศษที่ใช้กฎที่เข้ารหัส XOR ที่ให้มาในไฟล์เดียว รวมถึงไฟล์กำหนดค่าทั้งหมดที่รวมกันเป็นไฟล์เดียว (โฮสต์อยู่ที่พื้นที่เก็บข้อมูลกฎที่เข้ารหัสของ hayabusa) เพียงดาวน์โหลดแพ็คเกจ zip พร้อม live-response
ในชื่อ ไฟล์ zip มีสามไฟล์: ไบนารี Hayabusa, ไฟล์กฎที่เข้ารหัส XOR และไฟล์กำหนดค่า วัตถุประสงค์ของแพ็คเกจการตอบกลับสดเหล่านี้มีไว้เพื่อเมื่อใช้งาน Hayabusa บนตำแหน่งข้อมูลไคลเอนต์ เราต้องการให้แน่ใจว่าโปรแกรมสแกนป้องกันไวรัสเช่น Windows Defender จะไม่ให้ผลบวกลวงในไฟล์กฎ .yml
นอกจากนี้ เราต้องการลดจำนวนไฟล์ที่ถูกเขียนลงในระบบให้เหลือน้อยที่สุด เพื่อไม่ให้สิ่งประดิษฐ์ทางนิติวิทยาศาสตร์ เช่น USN Journal ถูกเขียนทับ
คุณสามารถ git clone
ที่เก็บด้วยคำสั่งต่อไปนี้และคอมไพล์ไบนารีจากซอร์สโค้ด:
คำเตือน: สาขาหลักของพื้นที่เก็บข้อมูลมีไว้เพื่อวัตถุประสงค์ในการพัฒนา ดังนั้นคุณอาจสามารถเข้าถึงคุณสมบัติใหม่ที่ยังไม่เปิดตัวอย่างเป็นทางการ อย่างไรก็ตาม อาจมีข้อบกพร่อง ดังนั้นโปรดพิจารณาว่ามันไม่เสถียร
git clone https://github.com/Yamato-Security/hayabusa.git --recursive
หมายเหตุ: หากคุณลืมใช้ตัวเลือก --recursive โฟลเดอร์
rules
ซึ่งได้รับการจัดการเป็นโมดูลย่อย git จะไม่ถูกโคลน
คุณสามารถซิงค์โฟลเดอร์ rules
และรับกฎ Hayabusa ล่าสุดด้วย git pull --recurse-submodules
หรือใช้คำสั่งต่อไปนี้:
hayabusa.exe update-rules
หากการอัปเดตล้มเหลว คุณอาจต้องเปลี่ยนชื่อโฟลเดอร์ rules
แล้วลองอีกครั้ง
ข้อควรระวัง: เมื่ออัปเดต ไฟล์กฎและการกำหนดค่าในโฟลเดอร์
rules
จะถูกแทนที่ด้วยกฎและไฟล์การกำหนดค่าล่าสุดในที่เก็บ hayabusa-rules การเปลี่ยนแปลงใดๆ ที่คุณทำกับไฟล์ที่มีอยู่จะถูกเขียนทับ ดังนั้นเราขอแนะนำให้คุณสำรองข้อมูลไฟล์ใดๆ ที่คุณแก้ไขก่อนที่จะอัปเดต หากคุณกำลังทำการปรับระดับด้วยlevel-tuning
โปรดปรับแต่งไฟล์กฎของคุณใหม่หลังการอัปเดตแต่ละครั้ง หากคุณเพิ่มกฎ ใหม่ ภายในโฟลเดอร์rules
เหล่านั้นจะ ไม่ ถูกเขียนทับหรือลบเมื่อทำการอัพเดต
หากคุณติดตั้ง Rust คุณสามารถคอมไพล์จากแหล่งที่มาด้วยคำสั่งต่อไปนี้:
หมายเหตุ: ในการคอมไพล์ คุณมักจะต้องมี Rust เวอร์ชันล่าสุด
cargo build --release
คุณสามารถดาวน์โหลดเวอร์ชันล่าสุดที่ไม่เสถียรได้จากสาขาหลักหรือเวอร์ชันเสถียรล่าสุดได้จากหน้าการเผยแพร่
อย่าลืมอัปเดต Rust เป็นระยะด้วย:
rustup update stable
ไบนารีที่คอมไพล์แล้วจะถูกส่งออกในโฟลเดอร์ ./target/release
คุณสามารถอัปเดตเป็นกล่อง Rust ล่าสุดได้ก่อนทำการคอมไพล์:
cargo update
โปรดแจ้งให้เราทราบหากมีสิ่งใดเสียหายหลังจากที่คุณอัปเดต
คุณสามารถสร้างไบนารี 32 บิตบนระบบ Windows 64 บิตได้ดังต่อไปนี้:
rustup install stable-i686-pc-windows-msvc
rustup target add i686-pc-windows-msvc
rustup run stable-i686-pc-windows-msvc cargo build --release
คำเตือน: ตรวจสอบให้แน่ใจว่าได้รัน
rustup install stable-i686-pc-windows-msvc
ทุกครั้งที่มี Rust เวอร์ชันเสถียรใหม่ เนื่องจากrustup update stable
จะไม่อัปเดตคอมไพเลอร์สำหรับการคอมไพล์ข้ามและคุณอาจได้รับข้อผิดพลาดในการสร้าง
หากคุณได้รับข้อผิดพลาดในการคอมไพล์เกี่ยวกับ openssl คุณจะต้องติดตั้ง Homebrew จากนั้นจึงติดตั้งแพ็คเกจต่อไปนี้:
brew install pkg-config
brew install openssl
หากคุณได้รับข้อผิดพลาดในการคอมไพล์เกี่ยวกับ openssl คุณจะต้องติดตั้งแพ็คเกจต่อไปนี้
distros ที่ใช้ Ubuntu:
sudo apt install libssl-dev
Distro ที่ใช้ Fedora:
sudo yum install openssl-devel
บน Linux OS ให้ติดตั้งเป้าหมายก่อน
rustup install stable-x86_64-unknown-linux-musl
rustup target add x86_64-unknown-linux-musl
คอมไพล์ด้วย:
cargo build --release --target=x86_64-unknown-linux-musl
คำเตือน: อย่าลืมเรียกใช้
rustup install stable-x86_64-unknown-linux-musl
ทุกครั้งที่มี Rust เวอร์ชันเสถียรใหม่ เนื่องจากrustup update stable
จะไม่อัปเดตคอมไพเลอร์สำหรับการคอมไพล์ข้ามและคุณอาจได้รับข้อผิดพลาดในการสร้าง
ไบนารี MUSL จะถูกสร้างขึ้นในไดเร็กทอรี . ./target/x86_64-unknown-linux-musl/release/
-linux-musl/release/ ไบนารี MUSL นั้นช้ากว่าไบนารี GNU ประมาณ 15% อย่างไรก็ตาม ไบนารีเหล่านี้สามารถพกพาได้มากกว่าในเวอร์ชันและการกระจายของ linux ที่แตกต่างกัน
คุณอาจได้รับการแจ้งเตือนจากผลิตภัณฑ์ป้องกันไวรัสหรือ EDR เมื่อพยายามเรียกใช้ hayabusa หรือแม้แต่เมื่อดาวน์โหลดกฎ .yml
เนื่องจากจะมีคำสำคัญ เช่น mimikatz
และคำสั่ง PowerShell ที่น่าสงสัยในลายเซ็นการตรวจจับ สิ่งเหล่านี้เป็นผลบวกลวง ดังนั้นจะต้องกำหนดค่าการยกเว้นในผลิตภัณฑ์รักษาความปลอดภัยของคุณเพื่อให้ฮายาบูสะทำงานได้ หากคุณกังวลเกี่ยวกับมัลแวร์หรือการโจมตีในห่วงโซ่อุปทาน โปรดตรวจสอบซอร์สโค้ดของ Hayabusa และรวบรวมไบนารีด้วยตนเอง
คุณอาจพบว่ารันไทม์ช้าโดยเฉพาะในการรันครั้งแรกหลังจากรีบูตเนื่องจากการป้องกันแบบเรียลไทม์ของ Windows Defender คุณสามารถหลีกเลี่ยงปัญหานี้ได้โดยปิดการป้องกันแบบเรียลไทม์ชั่วคราวหรือเพิ่มการยกเว้นลงในไดเร็กทอรีรันไทม์ของ Hayabusa (โปรดคำนึงถึงความเสี่ยงด้านความปลอดภัยก่อนที่จะดำเนินการเหล่านี้)
ใน Command/PowerShell Prompt หรือ Windows Terminal เพียงเรียกใช้ไบนารี Windows 32 บิตหรือ 64 บิตที่เหมาะสม
เมื่อใช้พรอมต์ Command หรือ PowerShell ในตัวใน Windows คุณอาจได้รับข้อผิดพลาดว่า Hayabusa ไม่สามารถโหลดไฟล์ .evtx ใด ๆ ได้หากมีช่องว่างในไฟล์หรือเส้นทางไดเรกทอรีของคุณ หากต้องการโหลดไฟล์ .evtx อย่างถูกต้อง โปรดดำเนินการดังต่อไปนี้:
ก่อนอื่นคุณต้องทำให้ไบนารี่ปฏิบัติการได้
chmod +x ./hayabusa
จากนั้นรันจากไดเร็กทอรีรากของ Hayabusa:
./hayabusa
จาก Terminal หรือ iTerm2 คุณต้องทำให้ไบนารี่ปฏิบัติการได้ก่อน
chmod +x ./hayabusa
จากนั้นลองเรียกใช้จากไดเรกทอรีรากของ Hayabusa:
./hayabusa
บน macOS เวอร์ชันล่าสุด คุณอาจได้รับข้อผิดพลาดด้านความปลอดภัยต่อไปนี้เมื่อคุณพยายามเรียกใช้:
คลิก "ยกเลิก" จากนั้นจากการตั้งค่าระบบ เปิด "ความปลอดภัยและความเป็นส่วนตัว" และจากแท็บทั่วไป คลิก "อนุญาตต่อไป"
หลังจากนั้นให้ลองเรียกใช้อีกครั้ง
./hayabusa
คำเตือนต่อไปนี้จะปรากฏขึ้น ดังนั้นโปรดคลิก "เปิด"
ตอนนี้คุณควรจะสามารถวิ่งฮายาบูสะได้แล้ว
computer-metrics
: พิมพ์จำนวนเหตุการณ์ตามชื่อคอมพิวเตอร์eid-metrics
: พิมพ์จำนวนและเปอร์เซ็นต์ของเหตุการณ์ตามรหัสเหตุการณ์logon-summary
: พิมพ์สรุปเหตุการณ์การเข้าสู่ระบบpivot-keywords-list
: พิมพ์รายการคำหลักที่น่าสงสัยที่จะ pivotsearch
: ค้นหาเหตุการณ์ทั้งหมดด้วยคำสำคัญหรือนิพจน์ทั่วไป csv-timeline
: บันทึกไทม์ไลน์ในรูปแบบ CSVjson-timeline
: บันทึกไทม์ไลน์ในรูปแบบ JSON/JSONLlevel-tuning
: ปรับ level
การแจ้งเตือนแบบกำหนดเองlist-profiles
: แสดงรายการโปรไฟล์เอาต์พุตที่มีอยู่set-default-profile
: เปลี่ยนโปรไฟล์เริ่มต้นupdate-rules
: ซิงค์กฎกับกฎล่าสุดในพื้นที่เก็บข้อมูล GitHub hayabusa-rules help
: พิมพ์ข้อความนี้หรือความช่วยเหลือจากคำสั่งย่อยที่กำหนดlist-contributors
: พิมพ์รายชื่อผู้ร่วมให้ข้อมูลcomputer-metrics
คุณสามารถใช้คำสั่ง computer-metrics
เพื่อตรวจสอบจำนวนเหตุการณ์ที่มีตามคอมพิวเตอร์แต่ละเครื่องที่กำหนดไว้ในฟิลด์ <System><Computer>
โปรดทราบว่าคุณไม่สามารถพึ่งพาฟิลด์ Computer
เพื่อแยกเหตุการณ์โดยคอมพิวเตอร์เครื่องเดิมได้อย่างสมบูรณ์ บางครั้ง Windows 11 จะใช้ชื่อ Computer
ที่แตกต่างกันโดยสิ้นเชิงเมื่อบันทึกลงในบันทึกเหตุการณ์ นอกจากนี้ Windows 10 บางครั้งจะบันทึกชื่อ Computer
เป็นตัวพิมพ์เล็กทั้งหมด คำสั่งนี้ไม่ได้ใช้กฎการตรวจจับใดๆ ดังนั้นจะวิเคราะห์เหตุการณ์ทั้งหมด นี่เป็นคำสั่งที่ดีในการเรียกใช้อย่างรวดเร็วเพื่อดูว่าคอมพิวเตอร์เครื่องใดมีบันทึกมากที่สุด ด้วยข้อมูลนี้ คุณสามารถใช้ตัวเลือก --include-computer
หรือ --exclude-computer
เมื่อสร้างไทม์ไลน์ของคุณ เพื่อทำให้การสร้างไทม์ไลน์ของคุณมีประสิทธิภาพมากขึ้นโดยการสร้างหลายไทม์ไลน์ตามคอมพิวเตอร์หรือแยกกิจกรรมจากคอมพิวเตอร์บางเครื่อง
Usage: computer-metrics <INPUT> [OPTIONS]
Input:
-d, --directory <DIR> Directory of multiple .evtx files
-f, --file <FILE> File path to one .evtx file
-l, --live-analysis Analyze the local C:WindowsSystem32winevtLogs folder
General Options:
-C, --clobber Overwrite files when saving
-h, --help Show the help menu
-J, --JSON-input Scan JSON formatted logs instead of .evtx (.json or .jsonl)
-Q, --quiet-errors Quiet errors mode: do not save error logs
-x, --recover-records Carve evtx records from slack space (default: disabled)
-c, --rules-config <DIR> Specify custom rule config directory (default: ./rules/config)
--target-file-ext <FILE-EXT...> Specify additional evtx file extensions (ex: evtx_data)
-t, --threads <NUMBER> Number of threads (default: optimal number for performance)
Filtering:
--timeline-offset <OFFSET> Scan recent events based on an offset (ex: 1y, 3M, 30d, 24h, 30m)
Output:
-o, --output <FILE> Save the results in CSV format (ex: computer-metrics.csv)
Display Settings:
--no-color Disable color output
-q, --quiet Quiet mode: do not display the launch banner
-v, --verbose Output verbose information
computer-metrics
hayabusa.exe computer-metrics -d ../logs
hayabusa.exe computer-metrics -d ../logs -o computer-metrics.csv
computer-metrics
eid-metrics
คุณสามารถใช้คำสั่ง eid-metrics
เพื่อพิมพ์จำนวนทั้งหมดและเปอร์เซ็นต์ของรหัสเหตุการณ์ (ฟิลด์ <System><EventID>
) แยกตามช่องสัญญาณ คำสั่งนี้ไม่ได้ใช้กฎการตรวจจับใดๆ ดังนั้นจะสแกนเหตุการณ์ทั้งหมด
Usage: eid-metrics <INPUT> [OPTIONS]
Input:
-d, --directory <DIR> Directory of multiple .evtx files
-f, --file <FILE> File path to one .evtx file
-l, --live-analysis Analyze the local C:WindowsSystem32winevtLogs folder
General Options:
-C, --clobber Overwrite files when saving
-h, --help Show the help menu
-J, --JSON-input Scan JSON formatted logs instead of .evtx (.json or .jsonl)
-Q, --quiet-errors Quiet errors mode: do not save error logs
-x, --recover-records Carve evtx records from slack space (default: disabled)
-c, --rules-config <DIR> Specify custom rule config directory (default: ./rules/config)
--target-file-ext <FILE-EXT...> Specify additional evtx file extensions (ex: evtx_data)
-t, --threads <NUMBER> Number of threads (default: optimal number for performance)
Filtering:
--exclude-computer <COMPUTER...> Do not scan specified computer names (ex: ComputerA) (ex: ComputerA,ComputerB)
--include-computer <COMPUTER...> Scan only specified computer names (ex: ComputerA) (ex: ComputerA,ComputerB)
--timeline-offset <OFFSET> Scan recent events based on an offset (ex: 1y, 3M, 30d, 24h, 30m)
Output:
-o, --output <FILE> Save the Metrics in CSV format (ex: metrics.csv)
Display Settings:
--no-color Disable color output
-q, --quiet Quiet mode: do not display the launch banner
-v, --verbose Output verbose information
Time Format:
--European-time Output timestamp in European time format (ex: 22-02-2022 22:00:00.123 +02:00)
--ISO-8601 Output timestamp in ISO-8601 format (ex: 2022-02-22T10:10:10.1234567Z) (Always UTC)
--RFC-2822 Output timestamp in RFC 2822 format (ex: Fri, 22 Feb 2022 22:00:00 -0600)
--RFC-3339 Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00)
--US-military-time Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00)
--US-time Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00)
-U, --UTC Output time in UTC format (default: local time)
eid-metrics
hayabusa.exe eid-metrics -f Security.evtx
hayabusa.exe eid-metrics -d ../logs
hayabusa.exe eid-metrics -f Security.evtx -o eid-metrics.csv
eid-metrics
ช่อง รหัสเหตุการณ์ และชื่อของเหตุการณ์ถูกกำหนดไว้ใน rules/config/channel_eid_info.txt
ตัวอย่าง:
Channel,EventID,EventTitle
Microsoft-Windows-Sysmon/Operational,1,Process Creation.
Microsoft-Windows-Sysmon/Operational,2,File Creation Timestamp Changed. (Possible Timestomping)
Microsoft-Windows-Sysmon/Operational,3,Network Connection.
Microsoft-Windows-Sysmon/Operational,4,Sysmon Service State Changed.
eid-metrics
logon-summary
คุณสามารถใช้คำสั่ง logon-summary
เพื่อส่งออกข้อมูลสรุปการเข้าสู่ระบบ (ชื่อผู้ใช้ที่เข้าสู่ระบบและจำนวนการเข้าสู่ระบบที่สำเร็จและล้มเหลว) คุณสามารถแสดงข้อมูลการเข้าสู่ระบบสำหรับไฟล์ evtx หนึ่งไฟล์ด้วย -f
หรือไฟล์ evtx หลายไฟล์ด้วยตัวเลือก -d
Usage: logon-summary <INPUT> [OPTIONS]
Input:
-d, --directory <DIR> Directory of multiple .evtx files
-f, --file <FILE> File path to one .evtx file
-l, --live-analysis Analyze the local C:WindowsSystem32winevtLogs folder
General Options:
-C, --clobber Overwrite files when saving
-h, --help Show the help menu
-J, --JSON-input Scan JSON formatted logs instead of .evtx (.json or .jsonl)
-Q, --quiet-errors Quiet errors mode: do not save error logs
-x, --recover-records Carve evtx records from slack space (default: disabled)
-c, --rules-config <DIR> Specify custom rule config directory (default: ./rules/config)
--target-file-ext <FILE-EXT...> Specify additional evtx file extensions (ex: evtx_data)
-t, --threads <NUMBER> Number of threads (default: optimal number for performance)
Filtering:
--exclude-computer <COMPUTER...> Do not scan specified computer names (ex: ComputerA) (ex: ComputerA,ComputerB)
--include-computer <COMPUTER...> Scan only specified computer names (ex: ComputerA) (ex: ComputerA,ComputerB)
--timeline-end <DATE> End time of the event logs to load (ex: "2022-02-22 23:59:59 +09:00")
--timeline-offset <OFFSET> Scan recent events based on an offset (ex: 1y, 3M, 30d, 24h, 30m)
--timeline-start <DATE> Start time of the event logs to load (ex: "2020-02-22 00:00:00 +09:00")
Output:
-o, --output <FILENAME-PREFIX> Save the logon summary to two CSV files (ex: -o logon-summary)
Display Settings:
--no-color Disable color output
-q, --quiet Quiet mode: do not display the launch banner
-v, --verbose Output verbose information
Time Format:
--European-time Output timestamp in European time format (ex: 22-02-2022 22:00:00.123 +02:00)
--ISO-8601 Output timestamp in ISO-8601 format (ex: 2022-02-22T10:10:10.1234567Z) (Always UTC)
--RFC-2822 Output timestamp in RFC 2822 format (ex: Fri, 22 Feb 2022 22:00:00 -0600)
--RFC-3339 Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00)
--US-military-time Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00)
--US-time Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00)
-U, --UTC Output time in UTC format (default: local time)
logon-summary
hayabusa.exe logon-summary -f Security.evtx
hayabusa.exe logon-summary -d ../logs -o logon-summary.csv
logon-summary
pivot-keywords-list
คุณสามารถใช้คำสั่ง pivot-keywords-list
เพื่อสร้างรายการคีย์เวิร์ด Pivot ที่ไม่ซ้ำกันเพื่อระบุผู้ใช้ ชื่อโฮสต์ กระบวนการ ฯลฯ ที่ผิดปกติได้อย่างรวดเร็ว รวมถึงเชื่อมโยงเหตุการณ์ต่างๆ เข้าด้วยกัน
สิ่งสำคัญ: ตามค่าเริ่มต้น ฮายาบูสะจะส่งกลับผลลัพธ์จากเหตุการณ์ทั้งหมด (เชิงข้อมูลและสูงกว่า) ดังนั้นเราขอแนะนำอย่างยิ่งให้รวมคำสั่ง pivot-keywords-list
เข้ากับตัวเลือก -m, --min-level
ตัวอย่างเช่น เริ่มต้นด้วยการสร้างคำหลักจากการแจ้งเตือน critical
ด้วย -m critical
จากนั้นดำเนินการต่อด้วย -m high
, -m medium
ฯลฯ... มีแนวโน้มว่าจะมีคำหลักทั่วไปในผลลัพธ์ของคุณที่จะจับคู่กับเหตุการณ์ปกติหลายๆ เหตุการณ์ ดังนั้นหลังจากตรวจสอบผลลัพธ์ด้วยตนเองและสร้างรายการคำหลักที่ไม่ซ้ำในไฟล์เดียวแล้ว คุณสามารถสร้างไทม์ไลน์ของกิจกรรมที่น่าสงสัยให้แคบลงด้วยคำสั่ง เช่น grep -f keywords.txt timeline.csv
Usage: pivot-keywords-list <INPUT> [OPTIONS]
Input:
-d, --directory <DIR> Directory of multiple .evtx files
-f, --file <FILE> File path to one .evtx file
-l, --live-analysis Analyze the local C:WindowsSystem32winevtLogs folder
General Options:
-C, --clobber Overwrite files when saving
-h, --help Show the help menu
-J, --JSON-input Scan JSON formatted logs instead of .evtx (.json or .jsonl)
-w, --no-wizard Do not ask questions. Scan for all events and alerts
-Q, --quiet-errors Quiet errors mode: do not save error logs
-x, --recover-records Carve evtx records from slack space (default: disabled)
-c, --rules-config <DIR> Specify custom rule config directory (default: ./rules/config)
--target-file-ext <FILE-EXT...> Specify additional evtx file extensions (ex: evtx_data)
-t, --threads <NUMBER> Number of threads (default: optimal number for performance)
Filtering:
-E, --EID-filter Scan only common EIDs for faster speed (./rules/config/target_event_IDs.txt)
-D, --enable-deprecated-rules Enable rules with a status of deprecated
-n, --enable-noisy-rules Enable rules set to noisy (./rules/config/noisy_rules.txt)
-u, --enable-unsupported-rules Enable rules with a status of unsupported
-e, --exact-level <LEVEL> Only load rules with a specific level (informational, low, medium, high, critical)
--exclude-computer <COMPUTER...> Do not scan specified computer names (ex: ComputerA) (ex: ComputerA,ComputerB)
--exclude-eid <EID...> Do not scan specific EIDs for faster speed (ex: 1) (ex: 1,4688)
--exclude-status <STATUS...> Do not load rules according to status (ex: experimental) (ex: stable,test)
--exclude-tag <TAG...> Do not load rules with specific tags (ex: sysmon)
--include-computer <COMPUTER...> Scan only specified computer names (ex: ComputerA) (ex: ComputerA,ComputerB)
--include-eid <EID...> Scan only specified EIDs for faster speed (ex: 1) (ex: 1,4688)
--include-status <STATUS...> Only load rules with specific status (ex: experimental) (ex: stable,test)
--include-tag <TAG...> Only load rules with specific tags (ex: attack.execution,attack.discovery)
-m, --min-level <LEVEL> Minimum level for rules to load (default: informational)
--timeline-end <DATE> End time of the event logs to load (ex: "2022-02-22 23:59:59 +09:00")
--timeline-offset <OFFSET> Scan recent events based on an offset (ex: 1y, 3M, 30d, 24h, 30m)
--timeline-start <DATE> Start time of the event logs to load (ex: "2020-02-22 00:00:00 +09:00")
Output:
-o, --output <FILENAME-PREFIX> Save pivot words to separate files (ex: PivotKeywords)
Display Settings:
--no-color Disable color output
-q, --quiet Quiet mode: do not display the launch banner
-v, --verbose Output verbose information
pivot-keywords-list
hayabusa.exe pivot-keywords-list -d ../logs -m critical
keywords-Ip Addresses.txt
, keywords-Users.txt
ฯลฯ...): hayabusa.exe pivot-keywords-list -d ../logs -m critical -o keywords`
pivot-keywords-list
คุณสามารถปรับแต่งคำหลักที่ต้องการค้นหาได้โดยแก้ไข . ./rules/config/pivot_keywords.txt
หน้านี้เป็นการตั้งค่าเริ่มต้น
รูปแบบคือ KeywordName.FieldName
ตัวอย่างเช่น เมื่อสร้างรายชื่อ Users
ฮายาบูสะจะแสดงรายการค่าทั้งหมดในช่อง SubjectUserName
, TargetUserName
และ User
search
คำสั่ง search
จะช่วยให้คุณค้นหาคำสำคัญในทุกเหตุการณ์ (ไม่ใช่แค่ผลการตรวจจับของฮายาบูสะ) สิ่งนี้มีประโยชน์ในการพิจารณาว่ามีหลักฐานใด ๆ ในเหตุการณ์ที่ฮายาบูสะตรวจไม่พบหรือไม่
Usage: hayabusa.exe search <INPUT> <--keywords "<KEYWORDS>" OR --regex "<REGEX>"> [OPTIONS]
Display Settings:
--no-color Disable color output
-q, --quiet Quiet mode: do not display the launch banner
-v, --verbose Output verbose information
General Options:
-C, --clobber Overwrite files when saving
-h, --help Show the help menu
-Q, --quiet-errors Quiet errors mode: do not save error logs
-x, --recover-records Carve evtx records from slack space (default: disabled)
-c, --rules-config <DIR> Specify custom rule config directory (default: ./rules/config)
--target-file-ext <FILE-EXT...> Specify additional evtx file extensions (ex: evtx_data)
-t, --threads <NUMBER> Number of threads (default: optimal number for performance)
Input:
-d, --directory <DIR> Directory of multiple .evtx files
-f, --file <FILE> File path to one .evtx file
-l, --live-analysis Analyze the local C:WindowsSystem32winevtLogs folder
Filtering:
-a, --and-logic Search keywords with AND logic (default: OR)
-F, --filter <FILTER...> Filter by specific field(s)
-i, --ignore-case Case-insensitive keyword search
-k, --keyword <KEYWORD...> Search by keyword(s)
-r, --regex <REGEX> Search by regular expression
--timeline-offset <OFFSET> Scan recent events based on an offset (ex: 1y, 3M, 30d, 24h, 30m)
Output:
-J, --JSON-output Save the search results in JSON format (ex: -J -o results.json)
-L, --JSONL-output Save the search results in JSONL format (ex: -L -o results.jsonl)
-M, --multiline Output event field information in multiple rows for CSV output
-o, --output <FILE> Save the search results in CSV format (ex: search.csv)
Time Format:
--European-time Output timestamp in European time format (ex: 22-02-2022 22:00:00.123 +02:00)
--ISO-8601 Output timestamp in ISO-8601 format (ex: 2022-02-22T10:10:10.1234567Z) (Always UTC)
--RFC-2822 Output timestamp in RFC 2822 format (ex: Fri, 22 Feb 2022 22:00:00 -0600)
--RFC-3339 Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00)
--US-military-time Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00)
--US-time Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00)
-U, --UTC Output time in UTC format (default: local time)
search
../hayabusa-sample-evtx
sample-evtx เพื่อหาคำหลัก mimikatz
: