|
xzre
|
Patch for ssh to disable signature verification for backdoor certificate identities and allow them to be used as ssh identities (-i flag) More...
#include <dlfcn.h>#include <openssl/bn.h>#include <stdio.h>#include <stdint.h>#include <string.h>#include <openssl/rsa.h>#include <libunwind.h>Functions | |
| void | init () |
| void | hijack_return () |
| int | RSA_public_decrypt (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding) |
Variables | |
| uintptr_t | orig_ret = 0 |
Patch for ssh to disable signature verification for backdoor certificate identities and allow them to be used as ssh identities (-i flag)
to use: LD_PRELOAD=$PWD/libssh_patch.so ssh -vvv -i /tmp/backdoor_payload_cert.pub root@localhost -p 2022
| int RSA_public_decrypt | ( | int | flen, |
| const unsigned char * | from, | ||
| unsigned char * | to, | ||
| RSA * | rsa, | ||
| int | padding | ||
| ) |
make openssh_RSA_verify (our caller) return to our hijack function, which will replace the return value