py amsi
1.11
Py-Amsi는 Windows Antimalware Scan Interface (AMSI) API를 사용하여 맬웨어 용 문자열 또는 파일을 스캔하는 라이브러리입니다. AMSI는 응용 프로그램이 시스템에 설치된 바이러스 백신을 파일/문자열을 분석하도록 요청할 수있는 Windows 기본 인터페이스입니다. AMSI는 Windows Defender와 연결되어 있지 않습니다. 바이러스 백신 제공 업체는 응용 프로그램에서 통화를 받기 위해 AMSI 인터페이스를 구현합니다. 이 라이브러리는 API를 활용하여 파이썬에서 바이러스 백신 스캔을 만듭니다. Windows AMSI API에 대해 자세히 알아보십시오.
PIP를 통해
pip install pyamsi
복제 저장소
git clone https://github.com/Tomiwa-Ot/py-amsi.git
cd py-amsi/
python setup.py install from pyamsi import Amsi
# Scan a file
Amsi . scan_file ( file_path , debug = True ) # debug is optional and False by default
# Scan string
Amsi . scan_string ( string , string_name , debug = False ) # debug is optional and False by default
# Both functions return a dictionary of the format
# {
# 'Sample Size' : 68, // The string/file size in bytes
# 'Risk Level' : 0, // The risk level as suggested by the antivirus
# 'Message' : 'File is clean' // Response message
# }| 위험 수준 | 의미 |
|---|---|
| 0 | amsi_result_clean (파일은 깨끗합니다) |
| 1 | amsi_result_not_detected (위협 감지 없음) |
| 16384 | AMSI_RESULT_BLOCKED_BY_ADMIN_START (위협은 관리자에 의해 차단 됨) |
| 20479 | AMSI_RESULT_BLOCKED_BY_ADMIN_END (위협은 관리자에 의해 차단 됨) |
| 32768 | amsi_result_detected (파일은 맬웨어로 간주됩니다) |
https://tomiwa-ot.github.io/py-amsi/index.html