Howto

From Offensive-security.com

Jump to: navigation, search

Contents

Howto Page

A list of Howto articles created by the community. Please feel free to add yours. -muts


In the meantime whilst this section is getting updated please view:

[BackTrack 3 HOWTOs] and [wiki entries *under construction*]

[Backtrack 2 Tutorials & Guides]

-hatake_kakashi

Customization

Create a module from directory structure

How to create a module from a directory structure. -muts

Create a module from source code

How to create a module from source code. -muts

Adding modules

A simple way to add your own modules and scripts.

ati.lzm module

Copy the ati.lzm module to your directory root ("cd /") then "tar -zxvf ati.lzm" - then run the .sh file that is placed in the newly created /install directory by typing "sh install/doinst.sh". After that you should be able to load up X by using the ati command which will configure /etc/X11/xorg.conf to work properly so you can then after use your preferred method to run X.

Or, just copy it to /bt/modules/ on the cd

msfgui

Steps to add deps for running msfgui. This is based on docs from the msfdev list. -jabra

Change the "Welcome" screen

To change the welcome screen ("Welcome to Backtrack v2.0 Final"), edit the /etc/issue file. See also here.

Create a custom LILO splash

  • Requirements: Bitmap image 640x480 pixels,MAX 16 colors, Mode -> Indexed
  • Process: save image to /boot/ directory,chroot & edit lilo.conf,execute lilo, reboot.
  • Note: The numbers refer to index numbers that can be found in the color table of the image. "p" designates pixels
bmp-colors=<foreground>,<background>,<shadow>,<highlightedfg>,<highlightedbg>,<highlightedsh>
bmp-table=<x>,<y>,<#columns>,<#lines>
bmp-timer=<x>,<y>,<fg>,<bg>,<sh>

Append lilo.conf:

...
vga=0x317
bitmap=/boot/splash.bmp
bmp-color=1,15,,,,
bmp-table=150p,300p,1,2
bmp-timer=450p,300p,1,,
....

Install Microsoft True Type fonts

To install Microsoft True Type fonts that are not installed in Linux, see the forum thread here.

         wget -c http://easylinux.info/uploads/msttcorefonts-1.3-4.noarch.rpm
         rpm2tgz msttcorefonts-1.3-4.noarch.rpm
         tgz2lzm msttcorefonts-1.3-4.noarch.tgz msttcorefonts-1.3-4.noarch.lzm
         lzm2dir msttcorefonts-1.3-4.noarch.lzm /

Reboot! Your fonts are now installed. Firefox/Edit/Preferences/Content/Fonts & Colors to change the default.

Update sqlite to 3.4.0 to allow use of Aircrack-ng 1.0 r540 and above

There is a problem with the makefile that will not allow you to update to sqlite 3.4.0 Have a look here for my solution and module. -balding_parrot

Install VMware Server

How to install VMware Server so as you can install other operating systems as Virtual Machines. Have a look here for my very detailed instructions on how to do this for FREE. -balding_parrot

Getting Airsnarf working

Here is an entire tutorial on getting Airsnarf working, tested on BT V2. -ReL1K

Update Aircrack-ng & install Aircrack PTW

Update Aircrack-ng & install Aircrack PTW here.

Installation

Most of these HowTos are for PC installation. Only attempt Mac installations from the HowTo specifically written for Mac. Attempting a PC HowTo on a Mac will hose your machine, and we assume no responsibility for your failure to heed this warning.

Using the GUI installer

Probably the easiest way to install BackTrack. -muts

To hard disk

Follow the guideline1 [1]However, if you are using BackTrack2 Final, you should additionally copy /boot from the LiveCD to your /boot partition. After that, try the GUI installer again. Christian Moldes.

  • Note: To keep the splashscreen in BT3, Enter the following commands after chroot during installation:
splash -s -f /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg >> /boot/splash.initrd
#In addition you need to append your lilo.conf file to:
initrd=/boot/splash.initrd

To hard disk using the command line

Follow this guide on the remote exploit forums http://forums.remote-exploit.org/showpost.php?p=87694&postcount=1

by Pureh@te

OS X 10.5 and VMWare Fusion

This should actually work in any vmware, but I've only done it in VMWare Fusion (OS X 10.4) Tremaine Lea

Admin Note: The link is down but I'm leaving the post here in case the link goes live again.

Another guide to install BackTrack in VMWare Fusion (works on 10.4 and 10.5) Garrett Reid Or, for BackTrack 3 Beta Garrett Reid

Dual boot configuration (movie)

A short movie describing a dual boot installation of BackTrack here -muts

Transcript of movie provided by -Gordon 02:43, 14 May 2007 (CDT)

  • Note: In the video there's an instruction to cp /boot/boot/vmlinuz /mnt/backtrack/boot

This is for previous releases of BackTrack, BT2 final command should be cp /boot/vmlinuz /mnt/backtrack/boot also note it's vmlinuz, not vmlinux -ziplock

  • Note: If you change the default root password after your LiveCD boot and then do this install, the HD installed version will have the new password, not the LiveCD default password. -ziplock
  • Note: If Qt parted refuses to commit your resize to the ntfs partion try mounting the partition with fuse then unmounting it. No idea why this works but it does. Check wiki on how to do that. -TheX1le
  • Update: mounting the partition with fuse makes the partition writable until the next mount. The partition must be writable during the partitioning, also for editing lilo.conf and running the lilo command which activates the changes made in lilo.conf. -ziplock
  • Note: If you get this message:

WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.

That means the LiveCD have automatically mounted one or more partitions in your system. That could be your windows partition (/mnt/hda1 for example) or any other partition you have in your system. To get rid of this just un-mount the mounted device/s. Lets say its hda1 thats mounted then you do this command: umount /dev/hda1 -denied

  • Note: For BT3 you should add "srv" to the list of folders to copy when you get to this line: "cp --preserve". -Dark Ragnarok

Triple boot Vista, Unbuntu and BackTrack

The procedure below shows how to configure a triple boot laptop. This was tested on a Lenovo R61 and should work on most modern laptops/desktops.

The partition sizes are ones I have used, if you want to use different sizes feel free.

  • Install Vista

Install Vista into a 30GB primary partition. Using the Vista disk management tools create an create NTFS data partition (approx 110GB)

  • Install Unbuntu

Boot the Unbuntu 7.10 CD into the live environment (ie just boot it) Open a terminal window sudo parted This will open the partition editor mkpart create a primary partition of 4GB in size formatted as ext3 This will be /dev/sda3 and is where backtrack will end up Quit out of parted NB if you prefer you can use qtparted by running sudo apt-get install qtparted and follow the bouncing ball Double click on the install icon Select language as appropriate Set the time zone as appropriate Set the keyboard as appropriate When the partitioner starts select manual

Click on free space and select new partition Set the partition type to logical Set the size to 2048 Set the filesystem type to swap

Click on free space and select new partition Set the partition type to logical Set the size to 4096 Set the filesystem type to ext3 Set the mount point to /

The layout should look like this;

Device Type Mount Point Size

/dev/sda1 ntfs /media/sda1 32212 MB

/dev/sda2 ntfs /media/sda2 116991 MB

/dev/sda3 ext3 /media/sda3 4293 MB

/dev/sda5 swap 2048MB

/dev/sda6 ext3 / 4490

Click forward Click forward at the migrate documents and settings page Set username and password as appropriate Allow the system to install

When complete reboot into backtrack (I did this from a USB stick, CD should work the same)

  • Install Backtrack

Select backtrack\install backtrack Set the install path to /mnt/sda3 Select real install Select restore original MBR Click install Click close when complete

  • Modify the grub configuration

Open a terminal

vi /mnt/sda6/boot/grub/menu.lst

go to the bottom of the file and add the following lines

title Backtrack 3 KDE

rootnoverify (hd0,2)

kernel /boot/vmlinuz vga=791 root=/dev/sda3 ro autoexec=xconf;kdm

boot


title Backtrack 3

rootnoverify (hd0,2)

kernel /boot/vmlinuz vga=791 root=/dev/sda3 ro

boot


These will allow you to boot and autorun kde or a basic startup to shell You may want to also change the default to 4 (for Vista) or one of the other partitions

There are different partition combinations that I tried to get this to work without different partitioners crashing or breaking something. The above does work, other combinations may not. Installing Backtrack into a logical partition appears (based on minimal testing) to prevent a clean shutdown which causes an fsck on each reboot, there is probably a way to fix this however I just changed the install order

Hope this helps -Hughmann

Make a USB stick

Copy the files to a 1G USB stick and make it bootable in three easy steps. -ziplock

Save configuration to USB stick

After having produced the personalization, open the console and digit dir2lzm /mnt/live/memory/changes changes.lzm (changes.lzm or pippo.lzm ...) changes.lzm you have in root folder, paste in USB modules folder (BT/modules). Reboot you have saved setting up. -bzImage

There is an issue after you save to changes.lzm and boot from the module then make new changes and try to save them because you only get the new changes and not the previous. Then create new changes and have to save them. Seems you have to copy /mnt/live/memory/changes to a tmp dir then merge /mnt/live/memory/images/changes.lzm/ onto the tmp dir. Then turn that into a new module to load. -Kinchyle

If you make a subsequent change, you can just save the new change.lzm file in the /BT/modules folder using a different name: ie change1.lzm and change2.lzm and then a subsequent file called change3.lzm all without merging them. -Milon

OS X 10.5 and Parallels Desktop 3

Here -Budh & LeeRock

Dual boot BackTrack and Ubuntu

Walk through on how to get BackTrack and Ubuntu on your machine here. -Hasssa

Automated download and installation on USB stick using Windows

Title say allz here. -shamanvirtuel

Live install with changes, swap and data partitions

Complete tutorial on installing BackTrack to a USB HD or USB stick, with the option of including changes, swap and data partitions. Here

Live install, dual boot from grub

This is another method to create a live install of BackTrack 3 on your HD. The need for this was that an install of BT was required for a machine with only 4gb of disk space and that it also needed to be dual booted with another linux distro from grub. This is a very simple live install with no persistancy. it has been done on an eeepc.

1. Create partition for backtrack (750mb) 2. Copy CONTENTS of iso to said partition 3. Edit your grub bootloader 4. Boot

So here goes...

1. create a partition for the BT iso (750mb will do). 2. grab a copy of the iso from download section. 2. mount the iso somewhere i.e.

     mount -t iso9660 -o loop,ro /path/to/theiso.iso /mnt/iso

3. mount the partition you want BT upon. i.e.

     mount /dev/hdX /mnt/bt

replacing /dev/hdX with the name of the disk and partition you are installing to (i.e. hda2 (first hdd, second partition)

4. copy the contents of the iso to the new partition. i.e.

     cp -r /mnt/iso /mnt/bt

5. edit grub /boot/grub/menu.lst

Add this:

     title BackTrack
     root (hd0,1)
     kernel /boot/vmlinuz max_loop=255 initrd=initrd.gz init=linuxrc load_ramdisk=1 
         prompt_ramdisk=0 ramdisk_size=6666 root=/dev/ram0 rw
     initrd /boot/initrd.gz
     boot

Obviously replacing root hd(0,1) with the partition number the kernel is on and changing the path of 'boot/vmlinuz' to point to the kernel.

6. If you want a directory that will save your changes and merge them with the live install to create the illusion of a 'real' install (the best way if you ask me) then:

  a) Create another partition formated to ext2/3
  b) create a directory on this partition called 'changes'
  c) add to grub conf (above) at the end of the kernel line:changes=/dev/sdx rw

Where sdx is the name of the disk/partition you wish to use.

Features

Setup FreeRadius-WPE

  • How to setup and use a patched version FreeRadius-server to obtain usernames and password hashes with ease. FreeRadius-WPE -PrairieFire


Spoofed MAC address

  • How to connect to the internet with a spoofed MAC using an ath0 device here.

Originally posted by Xploitz on the remote exploit forums. -eristic


Configure Bluetooth devices

Here.


Configure an EVDO modem

Here -Coolamber

Personal tools