SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 239 | Next

Shon Harris, Allen Harper, Chris Eagle, and Jonathan Ness

"Gray Hat Hacking, Second Edition"

inet1 already
includes the dhcpcd step and has a convenient spot after setting up the loopback device
to paste in these commands. So nowwewant to create a module that places this updated
rc.inet1 file into the /etc/rc.d directory before it is used by the normal Linux boot process.
We??™ll set up the directory structure and then use dir2lzm to do exactly that.
bt ~ # cd /tmp
bt tmp # mkdir -p MODULE/etc/rc.d
bt tmp # cp ~/rc.inet1 MODULE/etc/rc.d/
bt tmp # dir2lzm MODULE/ startwireless.lzm
[==================================================] 1/1 100
%bt tmp # ls -l startwireless.lzm
-r-------- 1 root root 4096 Jun 20 08:28 startwireless.lzm
bt tmp # cp startwireless.lzm /mnt/sdb1_removable/bt/modules/
Notice that we used dir2lzm to create a .lzm package of a directory structure that has
the entire directory tree from the root of the file system down to the file we want to overwrite.
This test system boots from a 1GB USB memory stick mounted on /mnt/sdb1_
removable with a module directory in bt/modules. On the next boot, this startwireless
.lzm module replaces the rc.inet1 file during the LiveCD preboot setup and connects the
system to the test wireless network during boot.
Creating a Module from a SLAX Prebuilt
Module with mo2lzm
BackTrack is based on the SLAX LiveCD project started in 2002.


Pages:
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251