Keyloggers

We got to experiment with a hardware and various software keyloggers.

From the tools provided to us I found the hardware keyloggers, which have a wireless function (so you don't have to pick them up again) most useful. http://www.keelog.com

As for the software loggers there are already some advanced tools (some commercial):

I read trough the hacking diaries of my class mates (I was absent) and Lukas wrote his own Keylogger on top of a Java library. I also executed the example, but Windows 10 is just too broken...and Java might not be the right tool for that.

https://github.com/kwhat/jnativehook

import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;

public class GlobalKeyListenerExample implements NativeKeyListener {

    public void nativeKeyPressed(NativeKeyEvent e) {
    }

    public void nativeKeyReleased(NativeKeyEvent e) {
    }

    public void nativeKeyTyped(NativeKeyEvent e) {
        System.out.println("Key Typed: " + e.getKeyText(e.getKeyCode()));
    }

    public static void main(String[] args) {

        try {
            GlobalScreen.registerNativeHook();
        }
        catch (NativeHookException ex) {
            System.err.println("There was a problem registering the native hook.");
            System.err.println(ex.getMessage());

            System.exit(1);
        }

        GlobalScreen.addNativeKeyListener(new GlobalKeyListenerExample());
    }
}

Then I tried a Python implementation, but again Python 2.7 broke Windows. https://github.com/ajinabraham/Xenotix-Python-Keylogger

The Linux keylogger worked, though:

https://github.com/kernc/logkeys

Github

michael@michael-ThinkPad /tmp/logkeys/build/src [master]
± % sudo ./logkeys -s
michael@michael-ThinkPad /tmp/logkeys/build/src [master]
± % cat /var/log/logkeys.log
cat: /var/log/logkeys.log: Permission denied

michael@michael-ThinkPad /tmp/logkeys/build/src [master]
± % sudo cat /var/log/logkeys.log
Logging started ...

2018-02-12 12:51:38+0100 > ̊github.com
2018-02-12 12:51:43+0100 > m1ckez<Tab>geheim
2018-02-12 12:52:13+0100 > ̊cat <Up>
2018-02-12 12:52:32+0100 > <Up><LCtrl>asudo %

results matching ""

    No results matching ""