Keybase on Kali Linux

Linux Security

Kaybase.io is a great platform for sharing PGP keys and verifying your identity online. The Linux tools the platform works with, however, don't run with Kali Linux out of the box. The reason is simple: Root (UID: 0) isn't supported. So how do you over come this limitation? In my case, my laptop is only used by me, and no one else.



NB, you should be using a dedicated machine to store your private keys. If not, you do run the risk of administrators being able to try to break in to keys / steal your keystrokes / etc. 


Technically, you don't. If you want to remove the restriction, I'm sure you could patch the source and just run it. However, that does really by-pass the security restrictions that the developer deemed necessary. 



So, how do you run the program? First step is to install the code. From the keybase.io Linux install page:





curl -O https://prerelease.keybase.io/keybase_amd64.deb
# if you see an error about missing `libappindicator1`
# from the next command, you can ignore it, as the
# subsequent command corrects it
sudo dpkg -i keybase_amd64.deb
sudo apt-get install -f



Once these are complete, the application is installed, but on any normal Kali install, this isn't going to run as root. The first step is to create a user for the keybase application. I choose the username "keybase".





# adduser keybase
Adding user `keybase' ...
Adding new group `keybase' (1008) ...
Adding new user `keybase' (1006) with group `keybase' ...
Creating home directory `/home/keybase' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for keybase
Enter the new value, or press ENTER for the default
Full Name []: Keybase User
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y




Ok. So that's the first bit sorted. Now, when I want to use the commandline version of keybase, I can type





# su - keybase
keybase$ keybase login



But what about the graphical user interface? How can I get that to work? The easiest way is to do a minor modification. The first stage is create a wrapper script for the run_keybase command. 





# cat > /usr/local/bin/run_keybase.sh << EOF
xhost +SI:localuser:keybase
su - keybase -c "/usr/bin/run_keybase"
EOF

# chmod 0755 /usr/local/bin/run_keybase.sh



Next, test the script by running run_keybase.sh If all is good, you can now make the minor modification to the desktop link. 





# nano /usr/share/applications/keybase.desktop



Change the Exec line from:





Exec=run_keybase



To:





Exec=/usr/local/bin/run_keybase.sh



Now restarting your window manager or rebooting will update the short cut. Now, clicking on the icon will get it going.


Comments

Display comments as (Linear | Threaded)

    No comments


Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.

Submitted comments will be subject to moderation before being displayed.