Tuesday, April 22, 2014

Kali Linux on a Chromebook via Crouton

In an effort clear up some confusion I added some documentation to the Crouton Wiki about installing Kali via Crouton, and how to get the tools.

https://github.com/dnschneid/crouton/wiki/Kali

For more info, also see my previous blog post.

http://puttingthingswheretheydontbelong.blogspot.com/2014/01/install-kali-on-chromebook-using-crouton.html

Monday, March 10, 2014

Ubuntu 14.04 on a Chromebook Pixel (Now with Suspend!)

I gave up on chromeos....  for a bit.  I loved running it with crouton and a Kali & Ubuntu chroot, but I really missed linux running natively on the hardware.

I am running Ubuntu 14.04 now, and enjoying it.

The biggest issue I had to overcome was the suspend issue related to the tpm chip.  It is fairly well documented, and patches and workarounds can be found.  More info on that here:

https://code.google.com/p/chromium/issues/detail?id=221905

I tried applying the fix:  modprobe tpm_tis force=1 interuppts=0

For some reason that didn't work for me.  I googled & tried many things.  I thought "modprobe tpm_tis" might have been an invalid command, because after running it, "lsmod | grep tpm" didn't show anything.

After a bunch of screwing around and needlessly playing with the "tpm_infineon" module, I realized tpm_tis was valid, I just needed the following config.

The fix (disclaimer: I am not responsible for anything you do or try, this may break your system):

Edit the GRUB_CMDLINE_LINUX_DEFAULT value in /etc/default/grub and add in "tpm_tis.force=1,tpm_tis.interuppts=0"

Mine looks like this (please note, I removed the default 'quiet splash', because I like the text):

GRUB_CMDLINE_LINUX_DEFAULT="tpm_tis.force=1,tpm_tis.interuppts=0"

That might do it on its own, but I also added the following entries to my /etc/modules file:

tpm
tpm_tis
chromeos_laptop

I think the 'tpm' entry may have been removed and put back, but I can't remember, and of course I didn't back it up.  I'd recommend adding them if they aren't there.

Anyways, hope this helps someone else and saves them a couple of hours.

Update 1:
In order to 'drag to scroll' using the touchscreen, I had to install the 'grab and drag' extension for firefox.

Update 2:

I've edited my /usr/share/X11/xorg.conf.d/50-synaptics.conf to look like this.  It greatly improved the touchpad.

# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
MatchIsTouchpad "on"
Option "PalmDetect" "1"
Option "PalmMinWidth" "8"
  Option "PalmMinZ" "80"
EndSection

#        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
#EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection













Sunday, January 26, 2014

Turning a Kindle Fire 2 into a Hacking Tablet

Tablets are getting cheaper, and I just bought a Kindle Fire 2 for $67 refurbished.  I really bought it to mess around with, and will probably end up using it in my car for a tablet/radio.

In the meantime, I wanted to see if I could root it, run a real version of android (instead of amazon's version) and load it up with hacking tools.

Here is what I did:

Step 1.

Get Root - This was a bit tricky.  You need the adb tool for the android SDK, but it is included in some of the scripts and downloads.  The XDA forums got me pointed in the right direction, but what eventually 'got root' was a directory traversal vulnerability.

This post helped a lot. http://forum.xda-developers.com/showthread.php?t=2075959

But this is how I finally got root.  http://seclists.org/fulldisclosure/2013/Jun/115

After getting root, the tablet was very unstable.  I had to run some commands based on the scripts from the XDA thread linked above, and it eventually was stable.

Step 2

Brick the Device - Not on purpose, but I did.  I tried to take a shortcut.  My version of the Kindle Fire requires a second bootloader, and I tried to install it using an apk file.  I had to buy a fastboot cable and write a new (actually older) boot image to get the tablet running again.  I also wrote the second bootloader to the kindle at that time.  http://forum.xda-developers.com/showthread.php?t=2304584

Step 3

From that point on it was pretty easy.  The second bootloader adds some options, so I just had to flash the correct image.  I used cyanogenmod.  http://wiki.cyanogenmod.org/w/Install_CM_for_otter

Step 4

After that, it is just a matter of using the Linux Deploy app to install Kali to a chroot.  http://www.kali.org/how-to/kali-linux-android-linux-deploy/

Thanks to all the folks in the above links for helping make my cheap tablet something pretty cool.


Tuesday, January 7, 2014

Install Kali Linux on a Chromebook using crouton (now with Sana & Kali-Rolling)!

Please read update 4 for Kali-Rolling Instructions!!

I recently purchased a Chromebook Pixel.  I was looking at different methods of installing Kali Linux, and realized the best way would be to fork David Schneider's project Crouton, and add Kali as a distro option.

The fork has been merged, and here is how you can install Kali in a chroot on a Chromebook using crouton.

1.  Download or compile the crouton executable to your chromebook.

Download crouton here.

2. Open a shell (CTL/ALT/T and type shell) and run the executable specifying Kali as the release.

sudo sh -e ~/Downloads/kalicrouton -r kali-rolling -t xfce

3. Enter some info at the prompts.

4. Type the following in a shell to enter Kali.

sudo enter-chroot startxfce4

Many other options are available, and it is well documented on the github page.

https://github.com/dnschneid/crouton


Update:  I've noticed some comments crouton's version of Kali not having tools installed.  This is by design, because most chromebooks only have 16GB hard drives.  To install any tools, just use apt-get install.

Example (to install metasploit):

sudo apt-get install metasploit-framework

Update 2: Wiki available now:  https://github.com/dnschneid/crouton/wiki/Kali


BitCoin Donations:  
13X2aQrRLJ4pxfK64bVgY1qv3sjoQ93h4s


Update 3:  I have a merge request in for Kali Sana.  A compiled version of my fork is available here:

Download crouton here.

Update 4: I've added a fix for the kali-rolling issue, but it will remain in my fork.  I don't think the crouton branch will ever merge it.  They want to keep netsurf as part of the package.

https://github.com/nromsdahl/crouton

Download here

To install, the command is:  sudo sh -e ~/Downloads/kalicrouton -r kali-rolling -t xfce

Install Kali Linux on a Chromebook using crouton (now with Sana & Kali-Rolling)!

Please read update 4 for Kali-Rolling Instructions!!

I recently purchased a Chromebook Pixel.  I was looking at different methods of installing Kali Linux, and realized the best way would be to fork David Schneider's project Crouton, and add Kali as a distro option.

The fork has been merged, and here is how you can install Kali in a chroot on a Chromebook using crouton.

1.  Download or compile the crouton executable to your chromebook.

Download crouton here.

2. Open a shell (CTL/ALT/T and type shell) and run the executable specifying Kali as the release.

sudo sh -e ~/Downloads/kalicrouton -r kali-rolling -t xfce

3. Enter some info at the prompts.

4. Type the following in a shell to enter Kali.

sudo enter-chroot startxfce4

Many other options are available, and it is well documented on the github page.

https://github.com/dnschneid/crouton


Update:  I've noticed some comments crouton's version of Kali not having tools installed.  This is by design, because most chromebooks only have 16GB hard drives.  To install any tools, just use apt-get install.

Example (to install metasploit):

sudo apt-get install metasploit-framework

Update 2: Wiki available now:  https://github.com/dnschneid/crouton/wiki/Kali


BitCoin Donations:  
13X2aQrRLJ4pxfK64bVgY1qv3sjoQ93h4s


Update 3:  I have a merge request in for Kali Sana.  A compiled version of my fork is available here:

Download crouton here.

Update 4: I've added a fix for the kali-rolling issue, but it will remain in my fork.  I don't think the crouton branch will ever merge it.  They want to keep netsurf as part of the package.

https://github.com/nromsdahl/crouton

Download here

To install, the command is:  sudo sh -e ~/Downloads/kalicrouton -r kali-rolling -t xfce