{"id":12636,"date":"2019-03-28T05:06:20","date_gmt":"2019-03-28T05:06:20","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12636"},"modified":"2019-03-28T05:06:20","modified_gmt":"2019-03-28T05:06:20","slug":"how-to-monitor-keyboard-keystrokes-using-logkeys-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/how-to-monitor-keyboard-keystrokes-using-logkeys-in-linux\/","title":{"rendered":"How to Monitor Keyboard Keystrokes Using \u2018LogKeys\u2019 in Linux"},"content":{"rendered":"<p><strong>Key Logging<\/strong>\u00a0is the process of storing keystrokes with\/without the knowledge of user. Keylogging can be hardware based as well as software based. As clear from the name, a hardware based keylogger does not depends upon any software and keystroke logging is done at hardware level itself. Whereas a software based keylogger depends upon a special software for keylogging.<\/p>\n<p>There are number of keylogger software applications for almost all the platforms be it\u00a0<strong>Windows<\/strong>,\u00a0<strong>Mac<\/strong>,\u00a0<strong>Linux<\/strong>. Here we are throwing light on an application package called\u00a0<strong>Logkeys<\/strong>.<\/p>\n<h3>What is Logkeys?<\/h3>\n<p><strong>Logkey<\/strong>s is a Linux keylogger. It is more updated than any other available keylogger, Moreover logkeys don\u2019t crash the\u00a0<strong>X server,<\/strong>\u00a0and appears to work in all the situations. Logkeys creates a log of all characters and function keys. Moreover logkeys are aware of\u00a0<strong>Alt<\/strong>\u00a0and\u00a0<strong>Shift<\/strong>\u00a0and works well with serial as well as\u00a0<strong>USB<\/strong>\u00a0keyboards.<\/p>\n<p>There are a lot of keyloggers available for\u00a0<strong>Windows<\/strong>\u00a0but this is not the case with\u00a0<strong>Linux<\/strong>. Logkeys is not better than any other keylogger application for Linux but certainly it is more updated than other.<\/p>\n<h3>Installation of Logkeys in Linux<\/h3>\n<p>If you\u2019ve ever installed a Linux tarball packages from source, then you can easily install logkeys package. If you haven\u2019t ever installed a package in Linux from source yet, then you need to install some missing packages like\u00a0<strong>C++<\/strong>\u00a0compilers and\u00a0<strong>gcc<\/strong>\u00a0libraries before proceeding for installation from source.<\/p>\n<pre>$ sudo apt-get install build-essential\t\t[on <strong>Debian<\/strong> based systems]<\/pre>\n<pre># yum install gcc make gcc-c++\t\t\t[on <strong>RedHat<\/strong> based systems]<\/pre>\n<p>Let\u2019s proceed for the installation, first grab the latest logkeys source package using\u00a0<a href=\"https:\/\/www.tecmint.com\/10-wget-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">wget command<\/a>\u00a0or use git to clone it as shown:<\/p>\n<pre><strong>-------------------- Download Source Package --------------------<\/strong> \r\n$ wget https:\/\/github.com\/kernc\/logkeys\/archive\/master.zip\r\n$ unzip master.zip  \r\n$ cd logkeys-master\/   \r\n\r\nOR\r\n\r\n<strong>-------------------- Use Git to Clone --------------------<\/strong> \r\n$ git clone https:\/\/github.com\/kernc\/logkeys.git\r\n$ cd logkeys\r\n<\/pre>\n<p>Now build and install logkeys.<\/p>\n<pre>$ .\/autogen.sh\r\n$ cd build         \r\n$ ..\/configure\r\n$ make\r\n$ sudo make install \r\n<\/pre>\n<p>Now run the<strong>\u00a0locale-gen<\/strong>.<\/p>\n<pre>$ sudo locale-\u00adgen<\/pre>\n<h5>Sample Output<\/h5>\n<pre>Generating locales (this might take a while)...\r\n  en_AG.UTF-8... done\r\n  en_AU.UTF-8... done\r\n  en_BW.UTF-8... done\r\n  en_CA.UTF-8... done\r\n  en_DK.UTF-8... done\r\n  en_GB.UTF-8... done\r\n  en_HK.UTF-8... done\r\n  en_IE.UTF-8... done\r\n  en_IN.UTF-8... done\r\n  en_NG.UTF-8... done\r\n  en_NZ.UTF-8... done\r\n  en_PH.UTF-8... done\r\n  en_SG.UTF-8... done\r\n  en_US.UTF-8... done\r\n  en_ZA.UTF-8... done\r\n  en_ZM.UTF-8... done\r\n  en_ZW.UTF-8... done\r\nGeneration complete.\r\n<\/pre>\n<h4>Usages of logkeys<\/h4>\n<ol>\n<li><strong>logkeys \u00ads<\/strong>\u00a0: Start logging keypress.<\/li>\n<li><strong>logkeys \u00adk<\/strong>\u00a0: Kill logkeys process.<\/li>\n<\/ol>\n<p>For detailed information of logkeys usages option, you can always refer to.<\/p>\n<pre># logkeys \u2013help\r\n\r\nor\r\n\r\n# man logkeys<\/pre>\n<p>Starting the application logkeys using the following command.<\/p>\n<pre>$ sudo logkeys \u00ad-s<\/pre>\n<p>Now running a lot of commands.<\/p>\n<pre># ls\r\n# pwd\r\n# ss\r\n# ifconfig<\/pre>\n<p>Terminate the process logkeys.<\/p>\n<pre># logkeys -k<\/pre>\n<p>Check the log file which by default is \u2018<strong>\/var\/log\/logkeys.log<\/strong>\u2018.<\/p>\n<pre># nano \/var\/log\/logkeys.log<\/pre>\n<div id=\"attachment_5400\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/01\/22.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-5400\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/01\/22-620x350.jpeg\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/01\/22-620x350.jpeg 620w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/01\/22-1024x578.jpeg 1024w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2014\/01\/22.jpeg 1360w\" alt=\"Keyboard Track in Linux\" width=\"620\" height=\"350\" aria-describedby=\"caption-attachment-5400\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-5400\" class=\"wp-caption-text\">LogKey Logs<\/p>\n<\/div>\n<p>To uninstall logkeys, remove all scripts and manuals:<\/p>\n<pre>$ sudo make uninstall # in the same build dir\r\n<\/pre>\n<h4>Future Developments Planned<\/h4>\n<ol>\n<li>To add support for sending logs via email<\/li>\n<li>To add support for logging clipboard content<\/li>\n<li>To add support for mouse event\/mouse click event<\/li>\n<\/ol>\n<h3>References<\/h3>\n<p><a href=\"https:\/\/github.com\/kernc\/logkeys\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/kernc\/logkeys<\/a><\/p>\n<p>All the information provided is strictly for educational purpose, Tweaking this article by any means or using the above information to log others users machine is against law and punishable. That\u2019s all for now.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/how-to-monitor-keyboard-keystrokes-using-logkeys-in-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Key Logging\u00a0is the process of storing keystrokes with\/without the knowledge of user. Keylogging can be hardware based as well as software based. As clear from the name, a hardware based keylogger does not depends upon any software and keystroke logging is done at hardware level itself. Whereas a software based keylogger depends upon a special &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/how-to-monitor-keyboard-keystrokes-using-logkeys-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Monitor Keyboard Keystrokes Using \u2018LogKeys\u2019 in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12636","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12636"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12636\/revisions"}],"predecessor-version":[{"id":12637,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12636\/revisions\/12637"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}