@inproceedings{oai:ipsj.ixsq.nii.ac.jp:00223200, author = {碓井, 利宣 and 大月, 勇人 and 川古谷, 裕平 and 岩村, 誠 and 松浦, 幹太 and Toshinori, Usui and Yuto, Otsuki and Yuhei, Kawakoya and Makoto, Iwamura and Kanta, Matsuura}, book = {コンピュータセキュリティシンポジウム2022論文集}, month = {Oct}, note = {悪性スクリプトの動的解析を妨害する手法に,解析環境が特定の条件を満たさない場合に実行を停止するものがある.こうした妨害を迂回する入力を与えるためには,どういった条件式を満たすべきかを解明する必要がある.これを実現する技術に,実行時に解析用の処理をバイトコードの命令列に挿入する動的バイトコード計装がある.しかし,スクリプトのバイトコードを構成する命令の仕様は一般に公開されておらず,手動解析で解明する必要があるため,計装の実現は困難である.この問題を解決するため,本研究では,スクリプトエンジンに動的バイトコード計装機能を自動付与する手法を提案する.提案手法では,命令の仕様を解明するために,テストスクリプトを用いてスクリプトエンジンの仮想機械を動的解析し,主要な命令の操作と入出力を明らかにする.そして,その結果に基づいて,バイトコードの各命令の実行をイベントとして監視し,その命令の入出力を引数に伴って解析用の関数にコールバックすることで,計装の機能を実現する.この手法を Python,Ruby,VBScript のエンジンに適用し,計装を実現して,実際の攻撃の解析妨害を迂回できることを確認した., Recent malicious scripts widely use evasion that terminates them unless the execution environment fulfills certain conditions. To circumvent it, we need to analyze bytecode instructions to reveal and satisfy the conditional expressions. Dynamic bytecode instrumentation (DBI), which injects analysis code into bytecode during execution, can achieve such instruction-level analysis. However, implementing it for script engines imposes the burdens of manually analyzing them because their specifications are usually closed. To address this problem, we propose a technique that automatically builds DBI engines with vanilla script engines. Our technique dynamically analyzes script engines with test scripts to identify the semantics of instructions and the tap points for their inputs and outputs (I/Os). It then adds the DBI capability by observing each instruction execution and calling back to the corresponding analysis function with the I/Os. Our experiments with Python, Ruby, and VBScript showed that it could achieve DBI and prevent evasion.}, pages = {1055--1062}, publisher = {情報処理学会}, title = {スクリプト実行環境に対する動的バイトコード計装機能の自動付与手法}, year = {2022} }