親ページ:マルウェア解析に必要な素養
Eicar – EUROPEAN EXPERT GROUP FOR IT-SECURITY
マルウェア対策のための研究用データセット ~ MWS 2011 Datasets ~
http://www.iwsec.org/mws/2011/manuscript/1A1-1.pdf
FFRI Dataset 2014のご紹介
http://www.iwsec.org/mws/2014/files/FFRI_Dataset_2014.pdf
マルウェアは一種の文字列もしくは画像なので適用できる。
Microsoft Malware Classification Challenge (2015)
https://www.kaggle.com/c/malware-classification
ロジスティック回帰分析による未知ファイル分類の有効性
http://www.ffri.jp/assets/files/monthly_research/MR201402_Effectiveness of unknown malware classification by logistic regression analysis_JPN.pdf
動的情報に基づいたマルウェアのクラスタリング
http://www.ffri.jp/assets/files/monthly_research/MR201311_Behavioral-based_malware_clustering_JPN.pdf
機械学習のセキュリティ技術応用
http://www.ffri.jp/assets/files/monthly_research/MR201306_Machine_learning_for_computer_security_JPN.pdf
Fighting advanced malware using machine learning
http://www.ffri.jp/assets/files/research/research_papers/psj13-murakami_EN.pdf
TODO
https://github.com/JPCERTCC/impfuzzy/
今回は、新たな手法impfuzzyを提案し、impfuzzyをマルウエアに施して得られる値を用いることにより、類似したマルウエアを的確に見つけられることを、従来の手法との比較により示します。
TODO
機械学習を利用したクラスタリングによる仮想通貨発掘マルウェアの検出 | トレンドマイクロ セキュリティブログ (2018/4/6)
The pattern matching swiss knife for malware researchers
平たく言うとファイル中のバイト列の特徴を元に検出・分類するOSSツール
install on Arch Linux:
sudo pacman -S yara yara-python
usage:
% yara --help
YARA 3.5.0, the pattern matching swiss army knife.
Usage: yara [OPTION]... RULES_FILE FILE | DIR | PID
Mandatory arguments to long options are mandatory for short options too.
-t, --tag=TAG print only rules tagged as TAG
-i, --identifier=IDENTIFIER print only rules named IDENTIFIER
-n, --negate print only not satisfied rules (negate)
-D, --print-module-data print module data
-g, --print-tags print tags
-m, --print-meta print metadata
-s, --print-strings print matching strings
-e, --print-namespace print rules' namespace
-p, --threads=NUMBER use the specified NUMBER of threads to scan a directory
-l, --max-rules=NUMBER abort scanning after matching a NUMBER of rules
-d VAR=VALUE define external variable
-x MODULE=FILE pass FILE's content as extra data to MODULE
-a, --timeout=SECONDS abort scanning after the given number of SECONDS
-k, --stack-size=SLOTS set maximum stack size (default=16384)
-r, --recursive recursively search directories
-f, --fast-scan fast matching mode
-w, --no-warnings disable warnings
-v, --version show version information
-h, --help show this help and exit
Send bug reports and suggestions to: vmalvarez@virustotal.com.
実行例 *1:
[katc@K_atc originalfile]$ yara -v
yara 3.5.0
[katc@K_atc originalfile]$ yara -w ~/malware/rules/index.yar PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
maldoc_OLE_file_magic_number PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
RTF_Shellcode PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
Big_Numbers0 PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
Big_Numbers1 PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
Big_Numbers3 PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
Big_Numbers4 PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
contentis_base64 PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
with_urls PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
without_images PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
without_attachments PlugX_RTF_dropper_42fba80f105aa53dfbf50aeba2d73cae
この結果では RTF_Shellcode
が検出されたことが興味深い。筆者はRTFファイルにおけるシェルコードはあまり詳しくないが、アドレス調整のためのnop seld(\x90はIntel系CPUではnop命令に当たる。nop sledはそのnopの連なりのことで、エクスプロイトにおけるテクニックの一つ)による不自然な\x90の連続を根拠として検出したと思われる。以下に RTF_Shellcode
のルール定義を示す。
// This rule have beed improved by Javier Rascon
rule RTF_Shellcode : maldoc
{
meta:
author = "RSA-IR – Jared Greenhill"
date = "01/21/13"
description = "identifies RTF's with potential shellcode"
filetype = "RTF"
strings:
$rtfmagic={7B 5C 72 74 66}
/* $scregex=/[39 30]{2,20}/ */
$scregex=/(90){2,20}/
condition:
($rtfmagic at 0) and ($scregex)
}
(*1) 検体→ ac7d02465d0b1992809e16aaae2cd779470a99e0860c4d8a2785d97ce988667b (sha256), VirusTotal, hybrid-analysis, YaraRules Anlayzer
RULES_FILE
のファイルはここを利用できる:
https://github.com/Yara-Rules/rules/
オンライン版:
https://analysis.yararules.com
ごった煮(ライセンス関係不明):
https://github.com/mikesxrs/Open-Source-YARA-rules
TODO:同人誌に書いた内容軽く載せようかな…?
同人誌 TomoriNao Vol. 1 に書きました。
TODO:SOCや客先でも使われる技術も載せていきたいぞ…
パケットおよびフローをシグネチャとマッティングし、マッチしたフローをログに吐き出してくれる。
読み:すのーと。TODO
Ubuntuではaptで入るバージョンが古いので、gitでインストールするといいかもしれない。
シグネチャ:
読み:しーむ。ログをかき集めて、セキュリティの相関分析を行うエンジン。
マルウエアDatperをプロキシログから検知する(2017-08-17) (2017/8/17)
C2通信検出の話
マルウエアDatperの痕跡を調査する~ログ分析ツール(Splunk・ELKスタック)を活用した調査~ (2017-09-25) (2017/9/25)
今時なログ解析
セキュリティのためのログ分析入門 サイバー攻撃の痕跡を見つける技術 (Software Design plusシリーズ)
PacketTotal - A free, online PCAP analysis engine
pcapをアップロードすると検知結果を出してくれるオンラインサービス。
TODO
Global DNS Hijacking Campaign: DNS Record Manipulation at Scale | FireEye Inc (2019/1/9)
フォーカス・リサーチ(1)「ディープラーニングを用いたログ解析による悪性通信の検出」
ディープラーニングは、悪意ある通信を発見する手法としても活用可能です。ここでは、マルウェア感染及びExploit Kitの悪性通信を、一般的なファイアウォールやWebプロキシサーバの膨大なログから検出する手法を紹介します。
なお本稿は、国際的なセキュリティカンファレンス「Black Hat Europe 2018」のBriefingにて"Deep Impact: Recognizing Unknown Malicious Activities from Zero Knowledge"(※1)というタイトルで発表した内容を再構成したものです。
参考資料:
*
サイバーセキュリティに携わる者なら一度くらいはKDD Cup 99 Dataなるデータセットの名を耳にしたことがあるのではないだろうか.KDD Cupは国際会議SIGKDDによるデータマイニングのコンペで,KDD Cup 99 Dataはそのためのネットワーク侵入検知にまつわるデータ.正常通信と攻撃を分類するタスクが与えられた.
KDD Cup 99 Dataおぼえがき | 一生あとで読んでろ(by ntddk) より
通信プロトコルのヘッダの特徴に基づく不正通信の検知・分類手法
https://ipsj.ixsq.nii.ac.jp/ej/index.php?active_action=repository_view_main_item_detail&page_id=13&block_id=8&item_id=106530&item_no=1
特徴的なTCP/IPヘッダによるパケット検知ツールtkiwa
http://ipsr.ynu.ac.jp/tkiwa/
マルウェア通信検知手法におけるUser-Agentの有効性の一考察
マルウェアの不正ネットワークの分析によるルールファイル自動化の設計と実装
https://ipsj.ixsq.nii.ac.jp/ej/?action=pages_view_main&active_action=repository_view_main_item_detail&item_id=108925&item_no=1&page_id=13&block_id=8
特徴量の時間的な状態遷移を考慮したマルウェア感染検知手法に関する研究(修士論文)
https://dspace.wul.waseda.ac.jp/dspace/handle/2065/36065
《》に検討項目を示す。★が付いた観点は差別化要因になるので、各位知恵を絞ってくだされ。
(*1) VirusTotalに報告されているサイトで、悪性判定される検体を落とせるケースあり。
とりあえず、国内論文で「未知マルウェア」の論文を探してみるとか
https://scholar.google.co.jp/scholar?hl=ja&as_sdt=0%2C5&q=未知マルウェア&btnG=
特許の検索サイトで「未知マルウェア」と検索してみるとか
https://www.j-platpat.inpit.go.jp/web/all/top/BTmTopPage
高火力なコンピューティングリソースがある人はチャレンジしてみましょう! 前回は2015年。
Microsoft Malware Prediction | Kaggle
2019/5終了
The goal of this competition is to predict a Windows machine’s probability of getting infected by various families of malware, based on different properties of that machine. The telemetry data containing these properties and the machine infections was generated by combining heartbeat and threat reports collected by Microsoft's endpoint protection solution, Windows Defender.
ルールを一言でまとめると:
マシンについての状態(=テレメトリーデータ)がcsvとして与えられる。訓練用データではマシンが感染しているかどうかがHasDetections
カラムで与えられる。プレイヤーは各マシーンについてHasDetections
の値を予測する。
これ、できるんかいな…(まぁやってみろって話)。
Microsoft AI competition explores the next evolution of predictive technologies in security - Microsoft Secure (2018/12/13)