DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#26 2011-01-25 06:00:00

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Size limitations on initrd and kernel when using reloaded module

K. though I still have some future improvements planned and I have written/re-written the bash scripts to give a lot more reloading flexibility (I have posted an early version of that elsewhere so that you can do reloading without *any* reliance on installing ffp or any other funplugs -- i.e. it is a standalone fun-plug consisting of bare-bones ash scripts using the original firmware plus the kernel reloading module plus 2 small statically compiled functions nohup and killall5 that don't exist in the standard firmware and that can't (easily at least) be coded in ash).

It seems like I can't attach a file here so I will add it to a new thread http://dns323.kood.org/forum/viewtopic. … 743#p40743

Good luck!

Offline

 

#27 2011-03-07 20:50:20

dhub
Member
Registered: 2011-01-01
Posts: 112

Re: Size limitations on initrd and kernel when using reloaded module

I finally got debian squeeze to reload last night, instead of using a serial console I built a static netcat binary and added it to the intrd image.  I then used it to dump useful data back to my desktop during the boot process.  I also used netcat to insert a backdoor shell at the point in the initrd prior to where it was blowing up, so I could look at the boxes state and manually run the next command (which generally worked well as long as the command didn't take down the network connection).

Offline

 

#28 2011-03-08 01:41:17

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Size limitations on initrd and kernel when using reloaded module

Can you give some more detail on how you did that?
It sounds very interesting.

Offline

 

#29 2011-03-08 18:23:28

dhub
Member
Registered: 2011-01-01
Posts: 112

Re: Size limitations on initrd and kernel when using reloaded module

I built a static arm binary of gnu netcat and put it in the /bin directory of the initrd.

I then run "netcat -k -u -l 6666" on my desktop to act as a netcat listener (I'm using udp because it should be compatible with netconsole if I could ever get it running).

In the initrd script I add lines like:
echo "mounting filesystems"|/bin/netcat -w2 -u mydesktopip 6666

I also will add a reverse shell listener if I want to have the shell stop and let me debug it interactively, with a command like:
/bin/netcat -k -l -p 8888 -e /bin/sh"

I can then connect to the netcat shell from another box with a "netcat nasip 8888"

The listener shell is really useful when used in the panic function...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB