Showing posts with label Backtrack. Show all posts
Showing posts with label Backtrack. Show all posts

Arrow Keys Not Working in Ubuntu VMWare / Backtrack

Found this post from projektd at http://bias9.blogspot.com/2008/10/keys-not-working-in-vmware.html.

Either modify or create the file in your Home directory:

cd ~/.vmware
nano config


Add this line to your config file:

xkeymap.nokeycodeMap = true


Then restart VMware with:

sudo /etc/init.d/vmware restart

Should work after that.

Install BT3 with Compiz and Conky to Hard Drive

Ok...yes...there are a lot of guides out there for this...but this is what worked for me.

This guide assumes your HDD is clean (no partitions) and is /dev/hda...use fdisk -l if you're not sure.

Partition your hard drive with the following format:
hda1=/boot (ext2)
hda2=swap
hda3=/ (ext2)

I used one of the partitioners found on Hirens BootCD to partition my drives...but you can use whatever you want just as long as it's in that format.

Next make a USB BT3 drive and boot from it selecting BT3 with compiz.

Now follow these steps:

mkdir /mnt/backtrack
mount /dev/hda3 /mnt/backtrack/
mkdir /mnt/backtrack/boot/
mount /dev/hda1 /mnt/backtrack/boot/
cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,var} /mnt/backtrack/
mkdir /mnt/backtrack/{mnt,proc,sys,tmp}
mount --bind /dev/ /mnt/backtrack/dev/
mount -t proc proc /mnt/backtrack/proc/
cp /boot/vmlinuz /mnt/backtrack/boot/
chroot /mnt/backtrack /bin/bash
nano /etc/lilo.conf (make changes to the boot section to /dev/hda root section to point to /dev/hda3)
lilo
exit
reboot


Now remove your USB drive and hope you boot.
If successful, you should boot and compiz should be working...
Now for conky...
Download the latest release from the website then:
tar xzf conky*
cd conky*
./configure --with-rss
make
make install
I'm using a configuration found here.
Download it and extract it. I took the weather section out of mine and added an rss feed...to do that just:
nano conkyrc
Then delete the weather section at the bottom and add:
${color white}RSS ${hr 1}${color}
${rss http://www.feedurl.com/feed.xml 0 item_titles 10}
Save as whatever you want...I saved mine as conky.conf
Now to get conky to have a transparent background and still have compiz running...you need to follow these steps:
Download giblib and feh.
tar xzf giblib*
cd giblib*
./configure
make
make install
cd ..
tar xzf feh*
cd feh*
./configure
make
make install
/sbin/ldconfig -v | greb gib
feh --bg-scale 'dcop kdesktop KBackgroundIface currentWallpaper 1'
Now run conky with your conf location with
conky -c /root/conky.conf
Now conky's looking good with compiz. Let me know if this doesn't work for you or theres an easier way to do things...

References:
Based the BT3 install on one found on Remote-Exploit Forums (http://forums.remote-exploit.org/showthread.php?t=14751)
Conky Transparency (http://briancarper.net/blog/transparent-conky-in-kde-part-2)
ldconfig Fix (http://www.netadmintools.com/art410.html)


Installing BT3 on SD Card for Asus EEE PC

After recently buying a EEE PC online, the first thing I wanted to do was load backtrack on it. I didn't want to load it on the hard drive as the Ubuntu netbook remix looked pretty cool and I thought I would have that as a backup. I went out and bought a 4Gb SDHC card and loaded BT3 on it with changes. It acts as a USB device, but its not as pesky as a USB dongle. I read around and found you can't natively boot to backtrack. So I had to modify my bootable flash drive to include a module special to the EEE PC. This will fix the resolution and allow you to start the x server. Here's what I did to get it working.

1. Inserted the SD card and made a bootable USB BT drive (follow my tutorial if you don't have one already). However, i added the 901_net_gfx (my EEE is the 901) module to the /BT3/optional folder, and it can be downloaded here. Once that was added, you much modify the syslinux.cfg (/boot/syslinux/syslinux.cfg) file to include this under the APPEND section: load=901_net_gfx. That's it, now boot your USB drive and select the option you added the 901_net_gfx tag to.
2. Once booted, issue a fdisk -l and find your SD card.
3. You can either use fdisk to format it or use gparted. For gparted, open up a terminal and type in gparted. Modify your SD card to have one 1024Mb partition formated in FAT32 and the rest of the card to be formatted in ext2.
4. Commit the changes and then copy the boot and BT3 folders from your flash drives FAT32 partition to your SD card's partition: cp -R /mnt/sda1/{boot,BT3} /mnt/sdb1/ (this can be done through the gui using Konqueror)
5. Now make the changes directory in the ext2 partition: mkdir /mnt/sdb2/changes
6. Once that is complete, reboot the machine and remove your USB drive. Then press ESC during the poweron to get a boot menu and select your SD card.

Hope this helps. Let me know if you run in to any problems.

Make Bootable BT3 USB Drive With Changes and Storage Folder

Ok, so lately I have really been wanting to keep my portable drive that I take from computer to computer and also have a bootable BT3 drive with changes. Here are the steps I took to make it happen.

You are going to need:
1. A USB drive of at least 2Gb
2. A copy of the USB BT3 iso, found here.
3. A machine (virtual or real) running Windows.
4. A BT Live CD or BT VM.

Ok here we go...
1. Boot into windows and have your flash drive recognized.
2. I used Acronis Disk Director to partition the drive and made a minimum of 1.5Gb FAT32 partition labeled "BT3", however you can label it whatever you want. If you do not have Acronis Disk Director, then see the steps below...if you do, then move to step 3.
**EDIT** If you do not have a copy of Acronis Disk Director...then boot from the Live CD and use fdisk to partition. Use the following commands:
fdisk -l (find your USB drive)
fdisk /dev/sda
d (delete the partitions until the drive is blank)
1
n (create a new paritition)
p
1
(enter)
+1.3G (the size you want for your install)
n
p
2
(enter)
(enter) (the size you want for your changes...this assumes the rest of the drive)
w
mkfs.vfat -F 32 /dev/sda1
mkfs.ext2 /dev/sda2
umount /dev/sda1
umount /dev/sda2

Now move to step 4
3. Then I partitioned the rest of the drive in ext2 format and labeled it changes.
4. Restart the computer for the changes to be applied (you may not have to do this depending on your partitioner) and boot back into Windows.
5. Extract all files found in the bt3final_usb.iso with WinRAR.
6. Take the extracted files and copy them to your USB drive (the only partition recognized in Windows)
7. Open up a command prompt and enter the following commands:
e: (or the drive letter of your USB drive)
cd boot
bootinst.bat
8. Once it completes, hit enter and restart into your BT Live CD or simply switch to your BT vm.
9. Navigate to your flash drive: cd /mnt/sda1 (replacing sda1 with your flash drive).
10. Enter the following commands:
mkdir X (you can name this what you want, this is for your personal data)
cd /boot/syslinux
chmod +Xx lilo
chmod +Xx syslinux
nano syslinux.cfg
And find the label pchanges and by APPEND, change the changes=/changes/changes.dat to changes=/dev/sda2
mkdir /mnt/sdb2/changes
11. Now restart and boot to your flash drive and select the Persistent Changes option.

Let me know if you found a different way or if this doesn't work for you. I'm hoping to get a video up of this soon.

Eee Tutorials coming soon!

Installing VMWare tools in Backtrack 3 (BT3) *UPDATED*

Finally! I just finished an install of VMware tools on my BT3 VM. This includes seamless mouse and keyboard integration without having to manually capture and release input. I am still unable to drag and drop files from my OS and VM (I still plan on finding a solution). But here is what I did to get it working. If you encounter any errors, just post the errors as a comment and I’ll look into it.

1. Download the BT3 VM from remote-exploit and unzip.
2. Power on the VM and verify everything is working correctly. If it asks you if you moved it or copied it, select "copied it".
3. Open up terminal and make a directory under /mnt called cdrom

  • mkdir /mnt/cdrom
4. Now go to the tool bar VM > Install VMware Tools.
5. Click Install and a window should appear saying that media has been detected. Select Open in New Window. If it doesn't auto open, then you will have to issue these commands:
  • mount /dev/cdrom /mnt/cdrom
  • cp /mnt/cdrom/VM* /root/Desktop/
  • Skip to step 7.
6. Drag and drop the VMwareTools-1.0.6-91891.i386.tar.gz file to your desktop or desired folder.
7. CD into the proper folder (in my case its Desktop).
8. Then untar the file.
  • tar xvzf VMwareTools-1.0.6-91891.i386.tar.gz
9. CD into the newly created vmware-tools-distrib folder.
10. Execute vmware-install.pl
11. Leave all the defaults, pressing enter at every prompt.
12. When completed, configure vmtools by executing vmware-config-tools.pl. Leave all the defaults. Then add the following start up script to the ~/.kde/Autostart directory (it will be hidden).
  • echo "/usr/bin/vmware-toolbox --minimize"> ~/.kde/Autostart/vmware-toolbox.sh
13. Press enter then make it executable
  • chmod +x ~/.kde/Autostart/vmware-toolbox.sh
14. Now restart your VM and the next time you boot you should be able to drag your mouse seamlessly within the BT VM and your native OS.

*NOTE: This process will not allow you to drag and drop files between the two OS's. I am currently working on a solution for that.

An accompanying video showing the steps is coming soon!

If you run into any errors, just post them as a comment and I will investigate the problem. Hope this helps.

Technorati Tags: , , , ,

New commands that I have used frequently the past month...

On my never ending Linux/Unix/Windows knowledge quest, I have learned a few basic commands that have just been really helpful and that I have used very often in the past month while troubleshooting random problems.

Linux
smbmount - mount smb shares
Been in a few tight squeezes with some data I needed off a machine, but my only available storage option is a NAS.
  • smbmount //ip/share /mnt/mountpoint -o username=domain\\user,password=pass
For me this would look like:
  • smbmount //192.168.1.10/Backup /mnt/nas -o username=user,password=password
df - shows disk info (usage, mount point, free space)
The
-a switch displays all filesystems, the -T switch displays the FS type, and the -h switch displys the results in "human readable" formats (such as MB and GB)
  • df -a -h -T
du - shows size of files and folders
The -c switch gives a total of the size of all files in the directory, the -h switch lists size in a human readable format, and the -s switch outputs only the size of the directory, not the files within (it is pointless to use the -c switch with the -s switch unless you really enjoy doing so. Also without the -s switch, the output will be of every file and folder in a directory, which could be very verbose)
  • du -c -h /mnt/Backup
  • du -h -s /mnt/Backup
Unix/Mac
Here is how to make a release renew script to make quicken things up a bit:
In a terminal window, type:
  • nano /usr/bin/rr
Which will open a blank page called rr. Now add:
  • #!/bin/bash
  • echo "Now releasing your IP"
  • sudo ipconfig set int BOOTP
  • sleep 5
  • echo "Renewing your IP"
  • sudo ipconfig set int DHCP
  • echo "Done!"
Where int is the specified interface. CTRL+O to write the file then CTRL-X to exit.
Now to make the file executable enter:
  • sudo chmod 775 /usr/bin/rr
That is it...now just enter rr to release and renew your ip.

Windows
I have also been using Windows to mount network shares through command prompt.
  • net use
  • net use a-z: \\ip\share /USER:domain\user
  • net use /DELETE a-z:
  • net use /DELETE *
The first command will display all mapped network shares.
The second command will map a share and use the logon credentials of domain\user, and might prompt you for your password (a-z is the drive letter for the share to be mapped to, you must use a drive letter not currently used).
The third command will delete a specified mapped drive (again, you must specify a drive letter for a-z).
The fourth command will delete all mapped drives.


These are all simple commands, but very useful for me day to day.


Installing BT3 in VMware *UPDATED*

There are a couple of ways to run BT3 in VMware, but when it comes to down to speed and function ability, you should really just install it. *NOTE: Now you can just download a preconfigured VM with an early version of VMWare tools installed. Just download it and when first booting up the VM, select the option "I copied it". Here is a link for the download. The installation process is rather easy. Just make a new virtual machine, select all your settings, and then just format your virtual HDD to ext2 and install.

Here are the steps:
  • Create a new virtual machine.
    • File > New > Virtual Machine
    • Click Next > Typical > Linux (select "Other Linux 2.6 x kernel")
    • Name it what you want and select the storage location of the VM
    • Choose "Use bridged networking" if you want the VM to look like an actual device on your LAN
    • Then select the size of your virtual HDD, and uncheck "allocate disk space now"
    • Click finish
  • Add a USB device to your VM
    • This is real simple to do, and very useful to have done. Select your VM and select "Edit this virtual machine".
    • Under the Hardware tab select "Add".
    • Then select USB controller.
  • Boot into the VM with the BT3 CD in the cd drive.
  • Select Boot into KDE (default selection)
  • Then once BT has booted, open Konsole
  • Prepare the disk for formatting
    • Type fdisk -l
    • See your HD, it should be /dev/sda
    • Assuming it is /dev/sda, enter fdisk /dev/sda
    • Enter n to create a new partition
    • Then p to make it the primary partition
    • Then 1 to assign it as the first partition
    • Then press enter to accept the default first cylinder
    • Then enter again to accept the default last cylinder
    • Finally enter w to write the changes
  • Now format the disk in ext2 format
    • mke2fs /dev/sda1
  • Once the disk is properly formatted, make a mount directory for the hard drive.
    • mkdir /mnt/sda1
    • mount /dev/sda1 /mnt/sda1
    • mount
  • Now you should see that device sda1 is mounted at /mnt/sda1 and is formatted in ext2
  • Install Backtrack
    • K > Backtrack > Backtrack Installer
    • Keep all defaults except change "Installation method" to "Real" and uncheck "Restore Original MBR After LILO".
    • Click install
  • After the installation is finished, reboot the VM without the CD inserted.
After the installation of Backtrack, it might be a good idea to install VMware tools. I am currently writing and figuring out the steps to do so. It will hopefully be up in a few days.