View Single Post
Staro 03.06.2011., 16:22   #649
bcsaba
Registered User
 
Datum registracije: Jun 2011
Lokacija: Balmazújváros
Postovi: 11
Replacing configfile resets whole config though.

Eighter way iam semi-ready and hopefully someone will find this useful too
If i did everything right this post should have an enablessh.txt attached to it, it is a php script as iam a lazy programmer (and as such need php to run).

Usage: php enablessh.txt (ipaddr) (web username) (web password) [new admin password]

Example: php enablessh.txt 192.168.1.1 operator operator (enables SSH)
php enablessh.txt 192.168.1.1 operator operator pwned (enables SSH and set administrator password to pwned)

What it does it connects to the router via webinterface, logs in and tell the router to enable ssh without any dirty hack, plus if 4th parameter given it changes administrator password too (even when logged in via subscriber account, Siemens did a really crappy work when it came to priviledge checking). As administrator login is needed to get a shell from SCM management console via sx762os or sx763os commands).

It might be done cleaner still though, any feedback appreciated as i only could try it on my SX763 as danube one already have wrt on.

PS:
For the ones do not trust the php script, it can be done via tamperdata method by tampering at Advanced Settings->Remote Management and adding the following elements (first enables ssh second change admin password):

X_set_IGD.V_SSH.Enable=1
Y_set_IGD.V_PasswordService.Administrator.Password=password

Where X is the next element of the last page post (mine is 4_set_IGD.V_WebServer.RemoteManagement.Interface so X would be 5 for me) and Y is X+1 and password is the urlencoded password you would like to administrator have.




Attached Files
File Type: txt enablessh.txt‎ (2.8 kB, 323 views)

Zadnje izmijenjeno od: bcsaba. 03.06.2011. u 17:20.
bcsaba je offline   Reply With Quote