コンテンツにスキップ

Mixin と API

モジュールに include / prepend して共通機能を足す mixin の目次です。選び方の考え方は 基底と mixin にあります。

Mixin主な APIページ
HttpClientsend_request_cgiHttpClient / send_request_cgi
Tcpconnect / sockTcp
HttpServeron_request_uriHttpServer
SSHssh_client_defaultsSSH
SMB::Client 系smb_login などSMB
Mixin主な APIページ
Scannerrun_hostScanner
AuthBrutebuild_credential_collectionAuthBrute
CmdStagerexecute_cmdstagerCmdStager
AutoCheck(prepend)自動 checkAutoCheck
FileDropperregister_file_for_cleanupFileDropper
Mixin主な APIページ
Reportreport_* / store_lootReport
Post::Common / File / OS 別cmd_exec / read_filePost 用 mixin
目的組み合わせ例
HTTP RCE exploitAutoCheck + HttpClient + CmdStager + FileDropper
HTTP 多ホスト版走査HttpClient + Scanner + Report
SSH 辞書ログインSSH::Options + AuthBrute + Scanner + Report
SMB 共有列挙SMB::Client(+Authenticated) + Scanner + Report
ブラウザ罠HttpServer(+HTML)
Linux post 収集Post + File + Unix + Report

他プロトコル(LDAP、MSSQL、DCERPC、Postgres など)も lib/msf/core/exploit/remote/ に mixin があります。新しい通信を足す前に、同名プロトコルの既存モジュールがどの mixin を include しているかを見るのが早いです。