[MAD-METASPLOIT] 0x01 - MSF Architecture

Architecture of MSF

제가 구조를 그려봤지만.. 영 실력이 좋진 않네요. 그냥 구글링해서 좋은 이미지 보시길..

사용 관점에서의 구조부터 보면 user는 여러 interface(console, armigate 등)을 통해 MSF Library로 접근합니다. 해당 부분에서 moudules, pugins, tools로 나뉘어 연동된 기능들을 수행하도록 구성됩니다.

동작은 약간 반대 형태로 동작합니다. 가장 중점인 Rex library로 연결된 각각 MSF Core와 MSF Base가 동작하고 Base에는 Module, Interface, Plugins이 연결되어 실제 사용자가 동작하는 부분에 대해 개입되고 Core는 Base와 Tools와 연결되어 동작합니다.

File System

Metasploit framework의 파일시스템 구조는 아래와 같습니다. 8개의 Directory로 구성되어있고 커스텀하거나 msf와 연동되는 모듈, 플러그인 개발 시 알아두면 좋은 내용입니다.

data: Metasploit에 대한 정보 파일이 존재합니다. (config 이런거..) documentation: metasploit에 대한 문서가 저장된 디렉토리입니다. external: msf에 사용되는 외부 라이브러리입니다. lib: msf 구동에 중요한 라이브러리입니다. modules: Exploit, Auxiliary 등 스캔 모듈이 담겨있습니다. 커스텀한 모듈도 해당 디렉토리를 이용합니다. plugins: 플러그인이 담겨있습니다. 플러그인은 모듈과 비슷하지만 조금 더 큰 개념입니다. 대표적으로 wmap. scripts: Meterpreter와 여러가지 스크립트가 담겨있습니다. tools: msf에서 사용할 수 있는 tool이 있습니다.

Metasploit! ├── app │ ├── concerns │ └── validators ├── armitage │ └── armitage ├── config │ └── environments ├── data │ ├── SqlClrPayload │ ├── cpuinfo │ ├── exploits │ ├── flash_detector │ ├── ipwn │ ├── lab │ ├── logos │ ├── markdown_doc │ ├── meterpreter │ ├── msfcrawler │ ├── passivex │ ├── php │ ├── post │ ├── snmp │ ├── sounds │ ├── sql │ ├── templates │ ├── webcam │ ├── wmap │ ├── wordlists │ └── xssf ├── db │ └── migrate ├── docker │ └── bin ├── documentation │ └── modules ├── external │ ├── burp-proxy │ ├── serialport │ ├── source │ └── zsh ├── lib │ ├── anemone │ ├── metasm │ ├── metasploit │ ├── msf │ ├── net │ ├── postgres │ ├── rabal │ ├── rbmysql │ ├── rex │ ├── snmp │ ├── sqlmap │ ├── tasks │ └── telephony ├── modules │ ├── auxiliary │ ├── encoders │ ├── exploits │ ├── nops │ ├── payloads │ └── post ├── noonupdate ├── plugins ├── script ├── scripts │ ├── meterpreter │ ├── ps │ ├── resource │ └── shell ├── spec │ ├── factories │ ├── file_fixtures │ ├── lib │ ├── models │ ├── modules │ ├── support │ └── tools ├── test │ ├── functional │ ├── hooks │ ├── lib │ ├── modules │ ├── scripts │ └── tests ├── tools │ ├── context │ ├── dev │ ├── exploit │ ├── hardware │ ├── memdump │ ├── modules │ ├── password │ └── recon └── websploit └── websploit