Backtrack 5 MAC Changing

I have been playing with backtrack5 lately and there was one little issue I was starting to get irritated by. When spoofing your MAC address you were required to run all these commands to take the interface down. First is to stop airmon-ng then to take the interface down. The following script is going to do the following:

Note: Before running this script run ifconfig and find the device name for your wifi card. In my case is is wlan0. If your’s is different then change wlan0 to you device name.

  1. Shut down airmon-ng
  2. Shut down interface
  3. Change the MAC to 00:11:22:33:44:55
  4. Start interface
  5. Start airmon-ng
After the script is complete it will print the new MAC.
#!/bin/bash
echo "Shutting down wlan0..."
airmon-ng stop wlan0 > /dev/null
ifconfig wlan0 down > /dev/null
maccchanger --mac 00:11:22:33:44:55 wlan0 > /dev/null
echo "Starting wlan0"
airmon-ng start wlan0 > /dev/null
string=`macchanger -s wlan0`
echo "Changed MAC to: ${string:13}"

If you have any problem, drop me a line at info@blakemiller.ca

Synergy with Ubuntu & Windows

Synergy let you share a single mouse and keyboard across multiple computers. In the following example, thewall is going to have our server and laptopnew is going to be our second computer. thewall, is to the right of laptopnew. thewall is also our linux box running Linux Mint (gnome). laptopnew is running Windows 7 x64.

First thing we need to do is install Synergy on our two machines. On the linux box run:

sudo aptitude install synergy

Next we need to install Synergy on our second computer. The version of Synergy in the Ubuntu repos is version 1.3 so we need to install that version. Click here for the download list.

Once you have it installed on both machines we need to create our configuration file. The following is an example of my configuration file.

gedit ~/.synergy

Configuration file:

section: screens
thewall:
laptopnew:
end

section: aliases
laptopnew:
192.168.1.24
end

section: links
thewall:
left = laptopnew
laptopnew:
right = thewall
end

section: options
screenSaverSync = false

end

For this to work correctly you must use the hostnames of both machines. Now we can open a terminal and run:

synergys

This will start the server; next we want to hit the start button on the client. You should now be able to move your mouse between the two computers! Synergy also allows you to copy and paste (text only) between the machines.

To get the synergy server to run on startup we can just add it to the gnome startup. Menu -> Preferences -> Start Up Applications.

The next time you reboot Synergy should start automatically. That concludes this tutorial, if you have any questions or comments please leave them below.

Mounting Windows Share using smbfs in Kubuntu

On my new Kubuntu box, I wanted to mount my “My Documents” folder that resides on a Windows Server 2003 R2 box. I have always had problems mounting folders due to the nature of Active Directory.

In KDE you can easily mount a share using the built in wizard, but I wanted to mount it as folder so I could access it using command line. First thing to do is install smbfs.

sudo aptitude install smbfs

Next thing we want to do here is make a folder to mount this remote location. I’m going to make it in the /media folder.

sudo mkdir "/media/My Documents"

The quotes are there to allow spaces in the directory name.

After that is this interesting line. If the share your connecting to  has any spaces in the name, you will need to put that option in quotes. Here is my complete line.

sudo mount -t smbfs -o username=blake,password=PASSWORDHERE "//server/UserData/blake/My Documents" "/media/My Documents"

I have made this into a script so I can easily run it when I need to connect.

I hope this has helped you getting your Linux box talking to your Active Directory protected share.

New Laptop #2

Well for those of you I don’t talk to on a regular bases here is a little update:

I have graduated from Canadore College and received my “Computer System Technology – Networking Program”. So that’s it, I’m done. Not so much. I have deiced to go back for another 3 years for the “Computer Programmer Analyst”. So this now brings me to the reason for this post, I got a new laptop. 🙂

I knew my old Dell 640m just wasn’t going to cut it for the new program. So I order my self a Dell Studio XPS. Here are the specs:

  • Intel® CoreTM i5 540M (2.53GHz/3MB cache)
  • Genuine Windows® 7 Professional 64-Bit
  • 4GB Shared Dual Channel DDR3
  • ATI HD5730 Mobility RadeonTM
  • 15.6 inch display (1920×1080)
  • 500GB5 SATA hard drive (7200RPM)
  • 8X DVD+/-RW Slot-load Drive
  • 6 Cell Battery
  • 2.0MP Integrated Webcam
  • 802.11n

Doing the comparison to my old one, this is quite the beast.

The new one doesn’t excite me as much as the old one does. I plan on running Kubuntu on the old one, and get to enjoy having a real web test server again. Also want to play with some of the new KDE environment stuff as its been a few years since I have used it.
If you have ideas of things I should post please comment below!

OpenSUSE – You suck

This semester at school we have a class called “Second Operating System”. Just like you would expect, we are learning Linux. Unfortunately, the teachers have opted to go with OpenSUSE as the primary OS to teach. First day was to do the setup on either our laptops or the desktop machines the school provides. I opted to install OpenSUSE in Sun’s VirtualBox.

VirtualBox is a great desktop test environment mostly used by programmers to test programs in. It supports Linux and Windows as a gust operating system allowing you to install operating systems on a base Windows install. This means that I don’t have to dual boot 2 operating systems.

After installing openSUSE, first thing I wanted to do was install the Addition tools that come with VirtualBox. This will allows the mouse to flow between the virtual machine and the actual machines desktop freely. It also allows the display to run in “Seamless mode”. Seamless mode run the guest OS right on top of the desktop of the machine seamlessly.

The problem with this is you need to install the kernel source headers. Not a big deal with most OS’s but with OpenSUSE, she wasn’t going to go willing. In Ubuntu when you go to install the kernel source headers it asks you if you really want to do this then enables the correct repositories. OpenSUSE says it doesn’t exist then you have to go hunting for how to do it. So I did what ever n00b does and went to Google and tryed finding a site that shows how to install the files that were required.

Turns out that if you go in about 5 menus deep in the crap thing they call a control panel, there is a spot where you can add the repos. It gives you a nice list of about 20 repos that if you didn’t have any prior Linux knowledge you would have no idea what one to add. So I added all of them.

I ran a repo update using there crappy application manager. It took 30 minutes to check all the repos and 6 of them failed. Explain that to me. :S So after using the search feature found exactly what I was looking for. After that everything installed and ran fine, accept a few things:

  1. Seamless mode doesn’t work
  2. Internet is up and down (no other VM does this)
  3. Installing any application is the biggest pain in the but ever

To conclude, I hate OpenSUSE. I don’t recommend using it at all. They make doing anything twice as difficult as it should be. Why make it so hard?