Tag Archives: unix

IT Security Brothers (http://itsb.pro)

Hi guys, I would like to present you our new project IT Security Brothers http://itsb.pro
We provide pentest, consultations and IT outsourcing services.
Feel free to hire us for IT jobs.

dir-320 + dd-wrt + gcc (compiling under dir-320)

We go on dd-wrt.com. In section download firmware for dir-320 – dd-wrt.v24_usb_generic.bin (latest v24).

It is required console tftp, it is possible to establish through the manager of installation of standard applications in windows, as and in linux.

We keep in some folder under a name firmware.bin. We open the console №1, we pass in a folder where  firmware.bin, we make a command «tftp 192.168.0.1 ″, we prepare a command« put firmware.bin»

We open the second console, we write and it is started «ping-f 192.168.0.1 ″ (for linux)« ping 192.168.0.1-n 1000 ″ (for win). ICMP the answer shouldn't come back, if, of course, at a router ip not 192.168.0.1.

We switch off a router power, then turn on it. It is necessary to seize that moment when there will be answers from a router in the second console. During this moment it is necessary to start in advance prepared command in the first console.

If all has passed successfully there will be a message in the first console that the firmware is successfully loaded. Otherwise we repeat above written.

It is necessary to wait burning of a light-emitting diode «status», or occurrences of a wireless network «dd-wrt» that signals that the router is booting with new firmeware successfully!

As a result we receive a router with an firmeware dd-wrt.

For the next we will need in flash drive with ext2fs. It is possible to format in any way. An example for linux Ubuntu.

# mkfs.ext2/dev/sdb1

As a result it is received flash drive with section ext2fs.

We insert it in USB router port.

We correct router options through web. Under the standard now at router IP will be 192.168.1.1. In an address line of the browser we write 192.168.1.1.  Login/pass – admin/admin. Further Services-> USB. To include points on «Base support USB","Support USB 1.1 (OHCI)","Support of USB-disks","Support file.system ext2/ext3 ″,« Automatic Drive Mount », others to disconnect. Assembling point«/opt». Further button" Apply ". The router reboots.

Further a tab «servicing» (penultimate). It is necessary to include «Support JFFS2. As we press point to apply. The router reboots.

Now it is necessary to come a telnet on a router.

# telnet 192.168.1.1

login/pass – root/admin.

Whether now it is necessary to check up mounted a flash drive.

# mount

If there is a point/dev/discs/disc0/part1 on/opt type ext2 (rw), means mounted.

Further we mount a folder jffs.

# mkdir/opt/jffs/

# mount-o bind/opt/jffs//jffs/

All. The system is ready to installation!!

We put optware.

# wget-O/tmp/prep_optware http://wd.mirmana.com/prep_optware

# sh/tmp/prep_optware

Process long. We wait.

We load/is updated a tree of packages.
# ipkg-opt update

We put buildroot.
# ipkg install buildroot
Process as the long.

We export enviroments the necessary.
# export LD_LIBRARY_PATH =/opt/lib: $ LD_LIBRARY_PATH

All. Now it is possible to compile the programs on C.

#gcc <input file>-o <outputfile>