티스토리 뷰
ETW 는 Event Tracing For Windows로
커널 단위, 응용 단위에서 윈도우즈 시스템의 전반적인 I/O를 뽑아낼 수 있는
실시간/정적 모니터링 시스템 라이브러리이다.
파이썬에서 쓸 수 있게 불꽃 눈에서 github에 공개한 바 있다.
나는 이것을 잘 써볼 생각이다.
아마 win32 api를 ctypes로 포맷팅한 것 같은데 etw와 함께 아라보자.
[원래 ETW]
https://docs.microsoft.com/en-us/windows/win32/etw/about-event-tracing
About Event Tracing - Win32 apps
Event Tracing for Windows (ETW) is an efficient kernel-level tracing facility that lets you log kernel or application-defined events to a log file.
docs.microsoft.com
[불꽃눈의 파이썬 ETW 라이브러리 - pywintrace]
https://github.com/fireeye/pywintrace
GitHub - fireeye/pywintrace: ETW Python Library
ETW Python Library. Contribute to fireeye/pywintrace development by creating an account on GitHub.
github.com
아름다운 불꽃 눈의 pywintrace
pip install pywintrace |
pip install etw |
를 해줘야 한다.

레파지토리 구성은 위와 같은데
etw - 코어 라이브러리
docs - 필요 없음
examples - 음. 별로
tests - 이게 실제 test code 들임, 어차피 실행할 때
windows의 etw를 맞춰봐야 함
tests 코드로 윤곽을 보면서 etw를 파헤치면 되는데,
잘 동작은 하는 것 같은데 아무도 안쓰니까 내가 써본다.
잘 만든거 같은데 왜 안쓰지? 파이썬으로 래퍼 만들려면 엄청 귀찮은데
난 이미 etw에 대한 사전 지식이 있지만 그래도
열심히 다시 공부해보기로 한다.
https://docs.microsoft.com/en-us/windows/win32/etw/about-event-tracing
About Event Tracing - Win32 apps
Event Tracing for Windows (ETW) is an efficient kernel-level tracing facility that lets you log kernel or application-defined events to a log file.
docs.microsoft.com
[기본적인 코드]
https://github.com/fireeye/pywintrace/blob/master/examples/simple.py
이 코드인데, 나는 raw가 무서우므로 라이센스를 첨부한다
GitHub - fireeye/pywintrace: ETW Python Library
ETW Python Library. Contribute to fireeye/pywintrace development by creating an account on GitHub.
github.com
########################################################################
# Copyright 2017 FireEye Inc.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
########################################################################
import etw
def some_func():
# define capture provider info
providers = [etw.ProviderInfo('Some Provider', etw.GUID("{11111111-1111-1111-1111-111111111111}"))]
# create instance of ETW and start capture
with etw.ETW(providers=providers, event_callback=etw.on_event_callback):
# run capture
etw.run('etw')
if __name__ == '__main__':
some_func()
하지만 위의 코드는 내가 원하는 코드가 아니다.
너무 단순하고 딱히 쓰고 싶은 게 없다.
그럼 이제 여기에 추가해서 프로세스나 파일, 레지스트리, 네트워크를 한번
뽑아내보자.
'코딩 공부방 > 보안&해킹' 카테고리의 다른 글
악성코드 자동 분석 시스템 (0) | 2022.03.26 |
---|---|
ETW - 네트워크 추적방식에 대한 스터디 (0) | 2022.03.20 |
ETW - 기반지식(3) : 난해함 (0) | 2022.03.18 |
ETW - 기반 지식(2) : EVENT_TRACE_PROPERTIES (0) | 2022.03.17 |
ETW - 기반 지식 (1) (0) | 2022.03.17 |
- Total
- Today
- Yesterday
- procmoninjection
- 구조체 #클래스
- 필터링
- 주택청약
- 세대주분리
- 왜다운로드안되게해놨어
- 추첨제
- 청약
- 세대주
- Injection
- 가점제
- 와이어샤크
- 비주얼스튜디오코드C/C++
- 파이썬 #이벤트로그 #크롤링
- 이럴거야?
- procmon활용
- 미즈노남보쿠
- 무료라메
- 세대원
- 청약방법
- 망할비주얼스튜디오코드파이썬쓸때는좋더니만
- 절제의성공학
- procmon
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |