Skip to content

Mixins and APIs

An index of mixins added to modules with include or prepend to provide shared functionality. See Base Classes and Mixins for how to choose them.

MixinMain APIsPage
HttpClientsend_request_cgiHttpClient / send_request_cgi
Tcpconnect / sockTcp
HttpServeron_request_uriHttpServer
SSHssh_client_defaultsSSH
SMB::Client familysmb_login and othersSMB
MixinMain APIsPage
Scannerrun_hostScanner
AuthBrutebuild_credential_collectionAuthBrute
CmdStagerexecute_cmdstagerCmdStager
AutoCheck (prepend)Automatic checkAutoCheck
FileDropperregister_file_for_cleanupFileDropper
MixinMain APIsPage
Reportreport_* / store_lootReport
Post::Common / File / OS-specificcmd_exec / read_filePost Mixins
GoalExample combination
HTTP RCE exploitAutoCheck + HttpClient + CmdStager + FileDropper
HTTP scanning across hostsHttpClient + Scanner + Report
SSH dictionary loginSSH::Options + AuthBrute + Scanner + Report
SMB share enumerationSMB::Client(+Authenticated) + Scanner + Report
Browser trapHttpServer(+HTML)
Linux post-exploitation collectionPost + File + Unix + Report

Mixins also exist for other protocols such as LDAP, MSSQL, DCERPC, and Postgres under lib/msf/core/exploit/remote/. Before adding new communication code, check which mixin existing modules for the same protocol include.