getting to the busybox shell on Siemens Gigaset 762sx

fragtion

Expert Member
Joined
Dec 26, 2004
Messages
2,901
Reaction score
196
Location
Cape Town
If you're like me, and you own a Siemens Gigaset 762sx, you've probably done a port scan on your 762sx's IP to find that its running an SSH server... maybe then you tried to log in, but 'root' didnt work with your router's configured password. Well I fiddled around a bit, and finally managed to log in using username 'administrator' and the router's configured password. But it wasnt linux! It was the router's own front-end IGD configuration terminal and theres not much fun you can have with that...

But I knew the thing was running Linux, because of the format of the logs on the status page... and because Linux is open source, Siemens is supposed to make the source code for the firmware available online. Well, they did... but the customized, locked Telkom firmware gave some headaches - the source wasn't available, and the root password is different... Well I wanted access: So I contacted hCOM (SA's/Telkom's distributor for the router) and while they tried to get the password for me, they couldn't.

Eventually after lots of examination of Siemen's original firmware, I found out about a hidden command: 'sx762os', which opens a 'normal' busybox shell (sh). Yeahh!! =)

I then saw that the /config directory is a jffs partition with about 512k free space, and whatever is in there will last if the modem's power is lost. It's great that the device has a USB port, because you can then also access a USB drive once it mounts, from the shell, opening up the possibilities

Just thought I'd share this with anybody who owns this great router, because I've always wanted to get into the linux portion of it and haven't been able to... finally it's time to tinker. Would be great if someone could port the WRT54G route-splitting script to work on this router - I would, but I don't really need it considering I have a separate Linux server to do that :)
 
Last edited:
Had the router for about 5 months and initially tried to ssh but couldnt so I gave up. Google gave me nothing at the time so thanks for the tip. Hated not being able to get in. Will probably have to brush up my bash-fu but I look forward to tinkering with it. :)
 
Some good tinkering there! Did you have any luck to get the print server going? I tried with a HP LaserJet 1020, following the instructions in the manual but no luck. Contacted Siemens support but they were less than useless, just told me to try a different printer.
 
fragtion_: good job

what firmware versions are you running (secondary bootcode, and firmware) ?
 
Hi fragtion_, I've just stumbled across your post after looking for a way to upgrade the firmware. Would you mind giving me some specific pointers on how to get rid of the Telkom firmware?

I manage to SSH to the router but for some reason I can't enter the command sx762os or sx76xos (which I found on another forum). Strange thing I've noticed is that the hardware label on the router says sx762 but the HTTP management page reads sx763?
 
Fragtion, how can I add a permanent static route. After powering off the route is lost. permission wont allow me to create a script nor edit one. Is there something I could put in the config folder you mention?
 
You can possibly write a startup script and save it in the persistent storage, because that's what I did with my Nanostation :)
IIRC, there was a folder /etc/persistent and I had to use the command 'save' to save the changes. Please be VERY careful if you're going to fiddle with the persistent storage!

You might be able to find more information with Google on the persistent storage with Busybox.
 
put a +x permissioned #!/bin/sh shell script in /config/scripts with the route in it, that should run auto. you might need to mkdir /config/scripts first
 
Thanks for the advice.

I created the script and tested it. The commands are good and work. I am unable to get it to execute at boot time though. Would this be the part of working with the persistant storage Pada is talking about? Because Im pretty sure if I managed to add the route to the rcS script then it would work.

Could be wrong. Your opinion?
 
All executable scripts in the /config/scripts directory are executed on boot, so one to add routes would look something like this
#!/bin/sh
/sbin/ip route add x.x.x.x dev eth1
/sbin/ip route add y.y.y.y/y via 192.168.0.5
etc

It might be that your route isn't adding because you're trying to add it to a pppoe interface which hasn't come up yet? Then you need to place a script in /etc/ppp/ip-up.d/ by using cp (copy) to copy it from /config to /etc/ppp/ip-up.d/ on startup by means of another script in /config/scripts/
 
Last edited:
I manually executed scripts on both formats. The routing then works and remote network are reachable. Its just wont execute the script auto at boot. No matter what permissions the script has. +x or full. The router log file shows nothing related to the script either. Ive tried having the script in just the config folder as well.

Something is not letting the script run on boot fellas. Im too tired and irritated to fiddle with it a 2 in the morning......


edit: could the script not need to conform to a certain naming convention, ive currently got it as route.sh but maybe I need to name it something else to get run.
 
I think what fragtion said would be the cause as to why your routes aren't added: the interface isn't started yet.

I had the same issue with my Nanostation, so I eventually wrote a script (which was called in the background by my startup script) that was a while loop, which slept most of the time and then checked if the ppp0 interface was available and only then it added the routes.

You can check if the script executed by letting the script create a file with something like 'echo "test" > /tmp/test.txt"'
 
Last edited:
Hi fellas

I got it working. Pada you were correct. I also wrote a ppp0 script to check status and then added routes after it was active. If a google copy and paste job but it works

#!/bin/sh

while true
do
if ip link show | grep ppp0
then
/sbin/ip route add 192.168.88.0/28 via 192.168.0.4
fi
sleep 10
done
exit​

192.168.0.4 is my interface/router connecting to the remote networks.

a Big, BIG, thank you Fragtion and Pada. Would not have been possible without the advice given.
 
Last edited:
...
I got it working. Pada you were correct. I also wrote a ppp0 script to check status and then added routes after it was active. If a google copy and paste job but it works
...
Great work, happy you got it working! The sleep function and method you used is perfect. If for whatever reason that grep ppp0 thing doesn't do it for you, you could also try this:
if [ `ifconfig ppp0 | grep 'addr' | awk '{$1=$1;print}' | cut -d ':' -f3 | cut -d ' ' -f1 | sed 's/^[ \t]*//;s/[ \t]*$//'` ]; then
/sbin/ip route add 192.168.88.0/28 via 192.168.0.4
fi
Works well for my ip-up scripts on my ubuntu box, so assuming the router has awk, sed, cut, etc, it should work there too
 
Hi fragtion_, I've just stumbled across your post after looking for a way to upgrade the firmware. Would you mind giving me some specific pointers on how to get rid of the Telkom firmware?

I manage to SSH to the router but for some reason I can't enter the command sx762os or sx76xos (which I found on another forum). Strange thing I've noticed is that the hardware label on the router says sx762 but the HTTP management page reads sx763?

Hi there, did you ever manage to get rid of the Telkom firmware ?
 
Top
Sign up to the MyBroadband newsletter
X