Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[MOD][TOOL] Flashable Persistent SSH Server

$
0
0
Code:

echo "The usual... STOP! READ ALL OF THIS POST BEFORE CONTINUING TO INSTALL:
I WILL NOT BE HELD RESPONSIBLE FOR LOSS OF DATA, LOSS OF ROOT ACCESS, BRICKED DEVICES,
CRY BABIES, TEMPER TANTRUMS RESULTING IN SMASHED DEVICES OR ANY OF THAT NOISE."


PERSIST DROID SSHD - The persistent lil SSH server
Quote:

I've modified an SSH server/daemon to install to /system using a .zip, start on boot and even function after the phone has been wiped of it's user data. Because dropbear is executed with root UID some ROMs even allow for removal su binaries and app while maintaining root shell /filesystem access on device through SSH.

FEATURES
Quote:

- Automatic start on boot
- User data wipe survival
- Automatic reverse ssh tunnel
- Automatic http tunnel
- Runs as root even without SU

DOWNLOADS
Quote:

XDA
GOO.IM

Prerequisites & Installation Instructions :good:
Quote:

Prereqs
-Initial root access/write access to /system

-Android Terminal Emulator, ADB shell or an SSH server installed from app store.

-Ability to write to /system

-Busybox installed (comes with most roms)

-BASH in /system/xbin (comes with most roms that include busybox)

-init.d support (for auto start on boot, which is the point of this )

-Custom Recovery clockworkmod 5 based for .zip install

Instruct
1. Install .zip via recovery (CWM or TWRP)

2. Reboot phone

3. Run sshd_config via Terminal Emulator, ADB or SSH client.
Code:

root@Android# sshd_config

---CONFIGURE-SSH-DAEMON---

Enter password: (default is blank on first run)

Enter new password: (no spaces or funky characters)
password written

Enter new port: 22 (enter an unused port for your SSH server to listen on 22 is default)
port set

---CONFIGURE-REVERSE-SSH---

Enter reverse listen port: 10000 (port used to connect back to device when on mobile)
port set

Enter remote server: example.com (address of remote server ip or domain)
server set

Enter remote serv port: (enter port remote server is listening)
port set

Enter remote username: admin (enter username on remote machine)
username set

Enable reverse ssh? y/n
Reverse SSH enabled

---CONFIGURE-HTTP-PROXY---

Enter socks listen port: 8080
port set

Enable http tunnel? n/y
HTTP tunnel disabled

---REMOVE-OLD-KEYS---

Remove old key(s)? n/y (keep or remove keys generated on first run)
Keeping old key(s)

---GENERATING-RSA-KEY---
...

---GENERATING-DSS-KEY---
...

Enter path to private key: /sdcard/path/to/opensshkey (used for reverse ssh connection)

---CONVERTING-PRIVATE-KEY---
...

Restarting dropbear with new settings...

done

FAQ :confused:
Quote:

I'm going to get this out of the way first thing. Some of it may be painfully obvious but I wanna get as many questions out of the way for those who may be inexperienced, so please bare with me.

Q. What is SSH?
A. SSH is a protocol for establishing secure communications between two computers. You can use it to send remote commands to machines, transfer files, encrypt other forms of communication & tunnel traffic to or from a remote machine. IMHO SSH is probably one of the most versatile protocols out there. If you'd like to learn more just head on over to wikipedia.

Q. I already use an SSH app on my device, what makes your mod so special?
A. That's a good question, so let me break it down... I used to use the SSH apps from the market & they're are great, but all of them lack some important features for me.

F. None of them will run after phone has been wiped of it's user data.
F. A lot of them have some kind of notification or status bar icon.
F. I haven't seen one that allows you to connect to your device when using a mobile data connection.

Q. How does all of this work?
A. It's actually pretty simple. I wrote a bash script that ask the user a series of questions then saves those answers to a file. Another set of scripts starts the server using the answers you specified as parameters. I based it in part on this guide, but my scripts handle all of the dirty work for you.
XDA:DevDB Information
PersistDroidSSHD, Tool/Utility for all devices (see above for details)

Contributors
Geofferey

Version Information
Status: Beta
Current Beta Version: 1.4
Beta Release Date: 2014-07-24

Created 2014-07-24
Last Updated 2014-07-24

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>