作成者: Alyssa Rahman @ramen0x3f
作成日: 2021-10-27
最終更新日: 2021-12-02
ブログ: https://www.mandiant.com/resources/hunting-deserialization-exploits
このツールとその背後にある研究プロセスの詳細については、弊社ブログをご覧ください。
デシリアライゼーションの悪用に対するハンティングルールを、複数の要素を組み合わせてプログラム的に作成します。
本ツールで生成されたルールは、ハンティング/リサーチ目的であり、高精度なブロック用途には設計されていません。
本番システムに導入する前に、十分にテストしてください。
Yaraルールは主にWebサーバーログのスキャンを目的としています。「オブジェクトプレフィックス」の中には2バイトしかないものもあり、大規模スキャンではやや遅くなる可能性があります。(言い換えれば、すべてをVT Retrohuntにドロップしないでください。)
ヘルプ:
python3 heyserial.py -h
例:
python3 heyserial.py -c 'ExampleChain::condition1+condition2' -t JavaObj
python3 heyserial.py -k cmd.exe whoami 'This file cannot be run in DOS mode'
python3 heyserial.py -k Process.Start -t NETViewState -e base64 "base64+utf16le"
さまざまなサンプルファイルに対してSnortおよびYaraルールの一括テストを自動化するツールです。
使い方:
python3 checkyoself.py [-y rules.yara] [-s rules.snort] [-o file_output_prefix] [--matches] [--misses] -d malware.exe malware.pcap
例:
python3 checkyoself.py -y rules/javaobj -s rules/javaobj -d payloads/javaobj pcaps --misses -o java_misses
YSoSerial.NET v1.34 ペイロード生成。Windows上で./utilsディレクトリから実行します。
YSoSerial ペイロード生成。Linux上で./utilsディレクトリから実行します。
DebianベースのシステムにSnortをインストールするのは少々厄介だったので、インストールメモをここにまとめました。
_自己責任で使用してください。VM内で、最近スナップショットを取った状態で*。*
127.0.0.1:12345 でHTTPサーバーを起動し、POSTリクエストを受け付けるシンプルなPythonスクリプトです。
テスト用PCAPの生成に便利です。
Copyright (C) 2021 Alyssa Rahman, Mandiant, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: [package root]/LICENSE.txt Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
HeySerial! の拡張に関する詳細は、開発者ガイド(DEVELOPERS.md)をご覧ください。
ツール
脆弱性
講演・記事