1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-20 20:37:27 +01:00
metasploit-payloads/c/meterpreter/source/metsrv/remote_dispatch.h
OJ 3f574e3521
Implement extendion IDs and refactor command enum
Enumeration of commands was a bit of a hack, and still resultsed in
strings (like "stdapi") to appear in binaries, and also meant that
extensions needed to identify themselves.

This code changes the way this works. Extensions no longer have a name.
Instead they have an internal ID tha maps to the command sets they
support. To enumerate extension commands, MSF will ask for a range of
commands, and if any command IDs fit within that range, they'll be
returned.

This moves us towards a nicer way of handling things across all the
meterpreters.
2020-05-01 15:36:07 +10:00

16 lines
548 B
C

#ifndef _METERPRETER_METSRV_REMOTE_DISPATCHER_H
#define _METERPRETER_METSRV_REMOTE_DISPATCHER_H
#include "common.h"
DWORD request_core_enumextcmd(Remote* pRemote, Packet* pPacket);
DWORD request_core_loadlib(Remote *pRemote, Packet *pPacket);
DWORD load_extension(HMODULE hLibrary, BOOL bLibLoadedReflectivly, Remote* pRemote, Packet* pResponse, Command* pFirstCommand);
DWORD stagelessinit_extension(UINT extensionId, LPBYTE data, DWORD dataSize);
VOID register_dispatch_routines();
VOID deregister_dispatch_routines(Remote * remote);
#endif