0
My modem has a telnet port and when I login to that port I get a root shell in device. The commands are very limited but there is empty space in device. Can I install something like nmap to this device? There is no package manager and I guess this system is running at init 1.
# cat /proc/partitions
major minor #blocks name
31 0 128 mtdblock0
31 1 64 mtdblock1
31 2 64 mtdblock2
31 3 1152 mtdblock3
31 4 6784 mtdblock4
31 5 8192 mtdblock5
# uname -a
Linux Air5453 2.6.30 #1 Wed Dec 3 18:43:00 EET 2014 mips GNU/Linux
# free
total used free shared buffers
Mem: 59456 35008 24448 0 4048
Swap: 0 0 0
Total: 59456 35008 24448
# busybox
BusyBox v1.14.1 (2014-12-03 18:47:37 EET) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, arp, ash, basename, blkid, cat, chmod, cp, cut, date, depmod,
dhcprelay, dmesg, dumpleases, echo, egrep, eject, false, fgrep,
findfs, free, ftpd, fuser, getty, grep, halt, hostname, httpd,
ifconfig, init, inotifyd, insmod, kill, killall, klogd, ln, login,
ls, lsmod, lzmacat, makedevs, mdev, mkdir, mkdosfs, mkfs.vfat,
modprobe, mount, mv, pidof, ping, poweroff, ps, pwd, reboot, rm,
rmmod, route, sh, sleep, tar, telnetd, test, tftp, top, touch,
traceroute, true, udhcpc, udhcpd, umount, uname, unlzma, uptime,
vconfig, wget, which
Can I also install dropbear to this device?
# clear
-sh: clear: not found
# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /var type ramfs (rw,relatime)
ramfs on /dev type ramfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
none on /proc/bus/usb type usbfs (rw,relatime)
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / squashfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
ramfs /var ramfs rw,relatime 0 0
ramfs /dev ramfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /proc/bus/usb usbfs rw,relatime 0 0
You mention that there is free space on your device, yet you only provide the output of
free
and the contents of/proc/partitions
to demonstrate this. Note that the former gives information on RAM usage, not disk usage, and the latter gives information on partition sizes. Usemount
(orcat /proc/mounts
) andstat -f
to find out how much disk space there's left. – bertm – 2016-02-01T10:14:10.630stat command does not exist on the system. Output of other commands have been added but they does not give any info about the disk size. – Halox – 2016-02-01T10:18:59.187
You need to use the
dmesg
command to review the boot log, which could reveal much more about this embedded system (e.g. processor). The squashfs mentioned in the mounts indicates that "installing" anything to the rootfs will take a lot of work. "I guess this system is running at init 1" -- Embedded systems often use the simplified Busybox sysinit, which doesn't use runlevels. – sawdust – 2016-02-01T19:51:59.417