Friday 26 June 2009

Injection with Intel Wireless (WiMax/)WiFi Link 4965AGN/51x0AGN, Intel Ultimate-N (WiMax/)WiFi Link 53x0AGN

Intel Wireless (WiMax/)WiFi Link 4965AGN/51x0AGN, Intel Ultimate-N
(WiMax/)WiFi Link 53x0AGN

The first reported success and how to do it is in this thread message.

A more recent success story is in this thread including detailed steps.
This one summarizes the the steps for Ubuntu 8.04. Another one.
Detailed HowTo

This is how you can get the Intel WiFi Link 4965AGN/5xxxAGN card to
inject under Linux using the iwlwifi drivers. Please note that the
injection is still under development, but is possible at this point.
Fake auth doesn't work but there's a workaround: using wpa_supplicant.
Deauth seems to be buggy.

What you need :

*
a kernel of 2.6.25 or higher,
*
the kernel sources,
*
the compat-wireless-2.6 package (for 2.6.27 and up) or the
compat-wireless-old package (for 2.6.25/2.6.26),
*
aircrack-ng => RC1 (=> SVN rev. 1531 if you want to use fakeauth),
*
basic development tools (make, gcc, ...),
*
injection patches for mac80211 (all kernels) and the drivers (only
for 2.6.25/.2.6.26).

Please note that the instructions provided here are suited for generic
Linux. Your distribution, especially if it uses some kind of advanced
package managing (Debian, Ubuntu, etc.), may have the needed packages in
its repositories (so that you don't need to compile them manually from
source).
Preparing the kernel

You need to make sure that your kernel configuration includes these
options. Pay attention which are to be build as modules and which can be
built-in.

Networking -> Wireless :
[M] Improved wireless configuration API
[*] nl80211 new netlink interface support
[*] Wireless extensions
[M] Generic IEEE 802.11 Networking Stack (mac80211)

If they exist, these should be either unchecked or modularized:

[M] Generic IEEE 802.11 Networking Stack (DEPRECATED)
[M] IEEE 802.11 WEP encryption (802.1x)
[M] IEEE 802.11i CCMP support
[M] IEEE 802.11i TKIP encryption
[M] Software MAC add-on to the IEEE 802.11 networking stack

You must also enable "Automatic kernel module loading" under "Loadable
module support", otherwise you will have module dependency errors.

If you are running a distro-supplied kernel, and find that these options
are not configured as described here, then you will need to recompile
your kernel with these options corrected. It is not enough to just
change these options in the kernel configuration, as you need these
options to be true for the running kernel.

At this point, it is assumed that you've got your kernel properly
configured, up and running right now.
Compiling the drivers

The development versions of the drivers are a part of the
compat-wireless project. We will need the latest version of the package,
which can be obtained here:

http://wireless.kernel.org/en/users/Download

Select compat-wireless-2.6 if you are using 2.6.27 or newer, or
compat-wireless-old if you are using 2.6.25 or 2.6.26. Download the
tarball to your home directory. Having downloaded it, we need to
download the patches for the iwlwifi drivers (only for 2.6.25/.26) and
the frag+ack patch for mac80211. The frag+ack patch is available on
http://patches.aircrack-ng.org (get the 2.6.28-rc4-wl version for
2.6.27+ and the 2.6.26-wl version for 2.6.25/.26). The driver patch (not
needed for 2.6.27 and up) is available here :
http://pastebin.com/f7bc96631.

Then, execute these commands:

2.6.25/.26 (not sure if this is still correct):

cd ~
tar xjf compat-wireless-old.tar.bz2
cd compat-wireless-old-2009-*
wget http://pastebin.com/pastebin.php?dl=f7bc96631 -O
iwlagn-injection.patch
wget http://patches.aircrack-ng.org/mac80211_2.6.26-wl_frag.patch
patch -p1 < iwlagn-injection.patch
patch -p1 < mac80211_2.6.26-wl_frag.patch
make -j4
make unload; rmmod ssb mac80211 cfg80211 [as root!]
make install [as root!]
echo options iwlagn swcrypto=1 >> /etc/modprobe.d/options [as root!]
make load [as root!]

2.6.27 and up:

cd ~
tar xjf compat-wireless-2.6.tar.bz2
cd compat-wireless-2009-*
wget
http://patches.aircrack-ng.org/mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
patch -p1 < mac80211_2.6.28-rc4-wl_frag+ack_v3.patch
wget
http://patches.aircrack-ng.org/mac80211-2.6.29-fix-tx-ctl-no-ack-retry-c
ount.patch
patch -p1 < mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch
make -j4
make unload [as root!]
make install [as root!]
echo options iwlagn swcrypto=1 >> /etc/modprobe.d/options [as root!]
make load [as root!]

NOTE: mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch is not needed
in the bleeding-edge compat-wireless-2.6, only in
2.6.29/2.6.30/compat-wireless-2.6.30.

That should get you the patched driver module up and running, you should
also see "wlan0" and "wmaster0" as your interfaces, the first one should
also be available by using iwconfig.
Injecting

Due to the way how mac80211 works, you cannot inject on the card's
"stock" interface - wlan0. This is where the airmon-ng tool comes in
handy. It will create a mon0 interface suited for injecting after
running it this way :

airmon-ng start wlan0

It may complain about the "iw" program missing. If it does, the link is
provided, so just download and compile it. The "iw" program, however,
requires the "libnl" libraries, available here :
http://people.suug.ch/~tgr/libnl/. If you have it all, run the program
again, and it should give you output somewhat similar to this:

# airmon-ng start wlan0

Interface Chipset Driver

wlan0 Intel 4965/5xxx iwlagn - [phy0]
(monitor mode enabled on mon0)

If that's how it looks, you're good to go. The mon0 interface can be
used for both listening with airodump-ng and injecting with aireplay-ng.

Printing with CUPS (Slackware)

Q) How do I add my printer/ enabling printing/ etc?

By default, Slackware now uses CUPS (as of 10.1, though apsfilter and lrpng can be found in /pasture).

To start CUPS, as root:

cd /etc/rc.d
chmod +x rc.cups
./rc.cups start

Confirm CUPS is running, thus:

ps -ef | grep cups

If running, result will be like:

root 3657 1 0 09:24 ? 00:00:00 /usr/sbin/cupsd

Before using CUPS, check the information for your printer at www.linuxprinting.org - it will tell you which is the best driver for your printer, and where to get it (gimp-print drivers come with the gimp-print package in Slackware, Ghostscript (LP's "PPD") based drivers require you to download a PPD front end file and put this in /usr/share/cups/model)

To add your printer, you can either use the command line: CUPS Admin Manual - Managing Printers (www.cups.org)

Or you can use the web based configuration: http://localhost:631

Either of the methods above can also be used for managing printers, printer classes, etc.

Worked example using Firefox to browse to http://localhost:631/printers (Slackware 11, Netgear PS110 print server at IP address 192.168.0.20 and HP LaserJet 2200D on Port 1)
---------------------------------------------------------------
SOURCE:
http://wiki.linuxquestions.org/wiki/Slackware-FAQ#Q.29_How_do_I_add_my_printer.2F_enabling_printing.2F_etc.3F#ixzz0JyxOz4Dc&D

Slackware Bootsplash Howto

- SOURCE: http://n00bsys0p.wordpress.com/tag/slackware/
------------------------------------------------------------
Slackware Bootsplash Howto
3 02 2009
Hi all. I don't know about any of you, but the fact that the original
bootsplash patch is becoming obsolete and being superceded by sucky...
sorry, I mean splashy... really pisses me off. I love the simplicity and
speed of bootsplash, and splashy has failed to deliver on almost every
front. It's slow, ungraceful, difficult to make really pretty, and what
annoys me more than anything is that the verbose mode is utter crap.
Kernel panics will never be easy to diagnose again.
I don't install bootsplash often enough to know it off by heart, and I
find that every time I install Slackware on a new system I want to put a
bootsplash on I can never exactly remember how - cue many frustrating
wasted hours trying to get it sorted. I'd imagine it's a problem that
I'm not alone in encountering, so for your intellectual enjoyment (and
hopefully to help retain your hair's colour!), here's a full howto.
NB: If you are a newbie to compiling kernels, creating initramfs images
and reconfiguring LILO, then consider seriously practising/reading up on
them before attempting this, as you could render your system unbootable.
Step 1: Patch, configure and install the kernel.
You'll need a working patch for the kernel you're using. Sometimes a
patch from a previous kernel will work, but always patch with the
following tags first:
patch --dry-run -p1 < bootsplash-3.1.6-$(uname -r)
This will just test the patch. If you get any HUNK FAILED messages, then
DON'T USE IT! Also, if you are trying a patch from a different kernel,
then replace $(uname -r) with the patch's kernel version.
You will now need to configure the kernel using your favourite .config
editor. I'm a huge fan of xconfig (type make xconfig in your kernel's
unpacked directory). You will need to turn OFF the existing bootup logo
and turn on the bootup splash screen. It's probably a good idea to make
sure you have initrd/initramfs support in there too.
Now compile and install your kernel. If you don't know how to do this,
Eric Hameleers (Alien Bob) has written an excellent guide on his
Dokuwiki. Take heed of all of his warnings, as doing this wrong could
hose your computer. See you after the KERNEL PANIC.
Now boot up your new kernel.
Step 2: Download, compile and install the splash util.
There are countless copies of the splash utilities scattered around the
internet, and the places you'll find them change regularly, so I can't
give you a direct link, but version 3.0.7 seems to be a pretty good bet,
and easy to find.
Once you have downloaded the package, just typing make will result in a
huge b0rk-fest. The only binary you need is splash, so just type make
splash, and you should be ok. Now copy this into /sbin and that's step 2
complete.
Step 3: Make your initramfs format initrd.gz
I find this is where the guides all start to tell fibs. They all tell
you just to use the splash binary and redirect the output to a file.
THIS DOES NOT WORK. The reason being that Slackware now uses an
initramfs image for it's initial ramdisk, which is a compressed cpio
archive. Just using this file will not be recognised, and annoyingly
there will be no useful pointers to show you what's wrong.
First off, you'll want to download a bootsplash from somewhere. Kde-look
has some pretty nifty ones. Now create the directory
/etc/bootsplash/themes. Put the files you downloaded in here in the
format /etc/bootsplash/themes/theme-name/images and
themes/theme-name/config.
Now to actually create the initramfs. First of all, check for the
existence of a file called initrd.gz in your /boot folder. If there is
one there, then you should back it up before proceeding, as it will now
be blown away. Navigate to /boot and type:
mkinitrd -c -k $(uname -r) -f filesystem on root partition -r /dev/root
partition
There will now be a folder called initrd-tree in /boot. This will be the
contents of your initrd. Navigate to this folder and use the following
command:
splash -s -f
/etc/bootsplash/themes/theme-name/config/bootsplash-1024x768.cfg >
bootsplash
This has placed some information for the kernel on the location of the
bootsplash theme in the cpio archive. You now need to place the
bootsplash into the folder in exactly the same directory structure that
exists on your filesystem. Create the folder
/boot/initrd-tree/etc/bootsplash/themes and copy in the bootsplash theme
you downloaded and installed earlier.
To finish off our penultimate step, go to /boot again and type simply
mkinitrd to compress the contents of /boot/initrd-tree into the
initrd.gz file you will now see in the /boot folder.
Step 4: Reconfigure LILO and reboot.
Ok, we've got to the point of no return. You have a working bootsplash
enabled kernel and a brilliantly put together initramfs image. Now
you'll need to modify the /etc/lilo.conf section which points at your
new kernel as follows:
image = /boot/vmlinuz-custom-2.6.27.7-1 # Or whatever your kernel image
is called
root = /dev/hda7 # Or whatever your root partition is.
label = Slacksplash # Name it anything you like
initrd = /boot/initrd.gz
append = "splash=silent"
read-only
Now run lilo. I tend to use lilo -c -v as -c speeds up the initial
loading of the kernel, and -v gives you a whole bunch of useful
information.
Now reboot, select your kernel from the list and admire all the
beautiful colours swirling across your screen.
That's it... Done. Any questions just leave me a comment.
n00b





















Thursday 25 June 2009

vmlinuz vs bzImage - Slackware

vmlinuz - Nothing but bzImage file.
config - Config file used for kernel compliation
system.map - Used by kernel ,if it needs to recover from fatal errors.
initrd - Used to mount real root file system


initrd.img is completely different from System.map.

While System.map is used for debugging.
initrd.img stands for initial ram disk,provides initial temporary file system which
allows kernel to mount the real root file system,while booting.

If you have real file system (ext3) build inside your kernel ,rather than using it as an
loadable module,you won't need initrd.
__________________

Microsoft Information Store\First Storage Group Database was not found, or could not be accessed."

A Backup Exec 11d or 12.0 Exchange Information Store (IS) backup to a Backup-to-Disk Folder fails with the error: "Backup- \\Exchange\Microsoft Information Store\First Storage Group Database was not found, or could not be accessed."

http://seer.entsupport.symantec.com/docs/290493.htm

Resolution: exclude the backup folder from the local antivirus server

WPA wireless with Slackware 12.2

edit following files:
- /etc/rc.d/rc.inet1.conf (dhcp or static)
- /etc/wpa_supplicant.conf

note: use the following cmd to convert ur passphase to psk
#wpa_passphase YOURSSID passphase
Use the output for /etc/wpa_supplicant.conf

if not sure on your wap, run "#iwlist scan" to detect

Tuesday 23 June 2009

The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain

http://technet.microsoft.com/en-us/sysinternals/bb897418.aspx
http://www.experts-exchange.com/Operating_Systems/Windows_Server_2003/Q_21112381.html

How to find Hsync and Vsync of a monitor? (linux)

For those values, it is usually best to see what the manufacturer lists - check manual or website. I don't specify those values in the xorg.conf of my laptops and they work fine.

You can try this command to get some good screen info though:
Code:
xdpyinfo

On my box (Fedora) it is in the xorg-x11-utils package.

Also, you can try to let X determine your best settings. Try these steps:

1. (re-)boot into non-Graphical runlevel (init 3)
2. log in as root
3. run
Code:
X -configure

4. test it with
Code:
X -config /root/xorg.conf.new
(or whatever the generated xorg conf file is called)
5. press Ctrl+Alt+Backspace to get out of the X test window

and see if that works for you.

Sunday 21 June 2009

PPTP client with Slackware 12/13/13.1

This works with my remote router with vpn enabled.

Get necessary info for your connection:
* vpn server name or ip
* vpn account (username & password)
* name for the connection: myvpn (u can name it to whatever you like)

Modified the following files:
* /etc/ppp/chap-secrets

# cat /etc/ppp/chap-secrets
your_username server_name your_pwd *

* /etc/ppp/options.pptp
# cat /etc/ppp/options.pptp
lock
noauth
#refuse-eap
#refuse-chap
#refuse-mschap
nobsdcomp
nodeflate

Created the following file
* /etc/ppp/peers/myvpn
* /etc/ppp/ip-up (also chmod +x /etc/ppp/ip-up)
* create symbol link /bin/ip to /sbin/ip


# cat /etc/ppp/peers/myvpn (this depends on your remote vpn configs)
pty "pptp server_ip --nolaunchpppd"
name your_username
remotename server_name/ip_address
require-mschap
require-mschap-v2
file /etc/ppp/options.pptp
ipparam myvpn


#cat /etc/ppp/ip-up
#!/bin/sh
/sbin/route add -net REMOTE_NET_IP netmask REMOTE_NET_MASK gw DEFAULT_GATEWAY dev ppp0

execute the following command to connect
# pppd call myvpn dump debug logfd 2 nodetach

Friday 12 June 2009

Change to screen resolution 1280x800 on Slackware 12

-Calculate VESA GTF mode lines with gtf command
#gtf 1280 800 60

# 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync

-Copy the result to section Monitor in /etc/X11/xorg.conf


Section "Monitor"

Identifier "My Monitor"

HorizSync 28-64

VertRefresh 40-90

Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
EndSection

- Also add the following in the Screen section
Section "Screen"
Identifier "Screen 1"
Device "VESA Framebuffer"
Monitor "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

# DefaultDepth 8
# DefaultDepth 16
DefaultDepth 24
# DefaultDepth 32

# "1024x768" is also a conservative usable default resolution. If you
# have a better monitor, feel free to try resolutions such as
# "1152x864", "1280x1024", "1600x1200", and "1800x1400" (or whatever your
# card/monitor can produce)

Subsection "Display"
Depth 8
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 16
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 24
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection
Subsection "Display"
Depth 32
Modes "1280x800" "1024x768" "800x600" "640x480"
EndSubsection

EndSection

-Check the result with xrandr
$ xrandr
Screen 0: minimum 640 x 480, current 1280 x 800, maximum 1280 x 800
default connected 1280x800+0+0 0mm x 0mm
1280x800 75.0*
1024x768 76.0
800x600 86.0
640x480 86.0

you might require to reboot

Install TrueCrypt 6.1a in Slackware 12

1. Download truecrypt source from www.truecrypt.org and expand it in a temporary folder. (opt/truecrypt)

2. Ftp the files below from ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20 and copy them into the truecrypt source directory.
/opt/truecrypt/truecrypt-6.1a-source in my case.

cryptoki.h
ct-kip.h
opt-pkcs11.h
pkcs-11v2-20a3.h
pkcs-11v2-20a3d3.h
pkcs11.h
pkcs11f.h
pkcs11t-consolidated-d1.h
pkcs11t.h
pkcs11t.h.org

3. Download wxWidgets from: http://www.wxwidgets.org/downloads/ wxAll is what you want.

4. unpack wxWidgets in the truecrypt source directory.

5. run the following command from the truecrypt source directory /opt/truecrypt/truecrypt-6.1a-source# make NOGUI=1 WX_ROOT=/opt/truecrypt/truecrypt-6.1a-source/wxWidgets-2.8.10 wxbuild

Note: change directories to match your installation

6. run the following command: make NOGUI=1 WXSTATIC=1
7. after the compiling is completed, copy the truecrypt file in the Main folder to /usr/bin
8.

Tuesday 9 June 2009

install vmware server 2 on slackware 12

SOURCE: http://www.basicconfig.com/install_vmware_server_slackware
NOTE: this can apply when install vmware server on BT3 Final

if your kenel is 2.6.30 then u need to download patch from http://communities.vmware.com/thread/215985 ( vmware-server.2.0.1_x64-modules-2.6.30-fix.sh (3.5 K)
* vmware-server.2.0.1_x64-modules-2.6.30-fix.patch (8.4 K))

When the installer ask you to run vmware-config.pl, choose no then run the fix. After that, run vmware-config.pl to complete your installation.

------------------------
VMware installation procedures

Installing vmware in Slackware Linux is quite difficult in the past. Many pre-installation requirements and some tweaks need to be done before proceed the installation. However this time, both vmware 2.0 and Slackware 12.2 have made our job easier. The things left for us are:

1. Download vmware server 2 from official vmware website. If you not already done it, here is the link to get vmware.
2. Install Linux PAM software. You can get Linux PAM package for Slackware from LinuxPakages website.

Finished the tasks above before you continue vmware server 2.0 installation.

Untar vmware server 2.0 source in your installation directory. Normally slackers use /usr/local/src directory, which is in it's own partition created during Slackware installation. It's up to you where to extract vmware server source, but put every added software in one directory location is a good practice to make your system in order and tidy.

root@hitam:~# cd /usr/local/src/
root@hitam:/usr/local/src# tar zxvf /home/slackware/source/VMware-server-2.0.0-122956.i386.tar.gz

Compile vmware server 2:

root@hitam:/usr/local/src# cd vmware-server-distrib/
root@hitam:/usr/local/src/vmware-server-distrib# ls
FILES doc/ installer/ man/ vmware-install.pl@
bin/ etc/ lib/ sbin/ vmware-vix/
root@hitam:/usr/local/src/vmware-server-distrib# ./vmware-install.pl

Everything after those steps above, you just enter and accept default value. It should work and finish without error. But that's not the way to learn Linux, is it? What you can do is read and take notes of each step. That way you know what happen. Here are some things that you should know:

To uninstall vmware server from Slackware, issue the command below (Only if you choose the default directory during vmware server installation):

root@hitam:~# /usr/bin/vmware-uninstall.pl

If you choose to enable vmware server networking, you need to configure host dhcp (which is Slackware) not to interfere with vmware server's dhcp server. You can add the following line in Slackware /etc/dhcpd.conf:

Subnet 172.16.121.0 netmask 255.255.255.0 {
# Note: No range is given, vmnet_dhcpd will deal with this subnet.
# Change the ip address to your vmnet ip address, nat and hostonly.
}

Seriously, that's all you need to do to install vmware server 2.0 in Slackware 12.2. If vmware server compiled without any error, then we can start vmware server to install guest operating system. If you did take notes during vmware server configuration steps, you should notice that vmware server 2.0 uses web base for administration, setup, etc. The default ports are 902 for remote, 8222 for http and 8333 for https.

So, start kde now if you installed vmware server in terminal. Open firefox and enter localhost:8222 in url:

vmware server open in firefox image

Enter login name and password. The default login name is root if you do not change it during vmware installation.
VMware installation troubleshooting

Although I said earlier that vmware server 2.0 installation in Slackware 12.2 has been easier but that doesn't mean it will go smoothly. If you are lucky to have an error during vmware installation, check log file in /var/log/secure directory. You must have root privilege to run this command.

root@hitam:~# tail -f /var/log/secure

There is only one problem I encountered during vmware server 2.0 installation, which is Login failed due to a bad username or password . The Login failed due to a bad username or password happened when I tried to login vmware control panel with firefox. That problem solved when I installed Linux PAM package.

Monday 8 June 2009

C header files location asked when installing BT3 - vmware-tools with vmware server 2

just download the kernel from: http://www.offensive-security.com/kernel.lzm

and install it with the command: "lzm2dir kernel.lzm /" and re-run "/usr/bin/vmware-config-tools.pl"

vmware-tools on slackware 12.1

Okay, here is a list of steps that install vmware-tools on Slackware 12.1
You need to install PAM before proceding the instruction, get PAM from LinuxPackages.net & install it
(http://www.linuxpackages.net/search_view.php?by=name&name=pam&ver=12.1)

After that, do:

1.cd /etc/rc.d

2.for V in {0,1,2,3,4,5,6}; do ln -s /etc/rc.d /etc/rc.d/rc${V}.d; done

3.mkdir /etc/pam.d

4.cp /etc/rc.d/rc.inet1 /etc/init.d/network

5.cp /etc/rc.d/rc.inet1 /etc/init.d/networking

6.In VMWARE, select Settings => Install Vmware Tools

7.$mount /dev/cdrom /mnt/cdrom

8.cp /mnt/cdrom/vmware*.tar.gz /tmp

9.cd /tmp

10.tar zxf vmware*.tar.gz

11.goto the extracted folder and $./vmware-install.pl

Saturday 6 June 2009

SOURCE: http://forums.remote-exploit.org/backtrack3-howtos/18470-howto-compile-truecrypt-6-1-bt3-final.html
-----------------------------
Howto: Compile TrueCrypt 6.1 on BT3-Final
/offtopic:

First of all, as this is my first post on the forum, I want to thank all the people involved in this community and of course all the guys from remote-exploit for putting together this great distro!
Thanks to you people I've been learning a great deal in the past few weeks and I have a feeling there is lots more to come! Once again, thanks.

And now to the topic.


/ontopic:

Since I am using quite a lot of external hard drives which are all crypted using TrueCrypt 6.1, I wanted to be able to use them on BT3 too. unfortunately, BT3-Final still comes with an outdated version of TrueCrypt. So I sat down and learned how to compile the current TrueCrypt 6.1.

It wasn't really that hard, basically some reading of and thinking about the right information that comes along with the downloads.

First of all, we will need the sourcefiles of Truecrypt, which can be downloaded here:


Code:

hxxp://www(dot)truecrypt(dot)org/downloads2.php


See that you the Linux/Mac OS tar.gz file AND the corresponding PGP signature file, just so we can make sure we got the "real deal" here... This we will do by taking a look at "gpg" to verify the source code we just got is valid and not tempered with.

Now if you don't know what gpg is, feel free to search google, because to explain all the features and their usage of gpg would be far beyond my little tutorial here. Just so much: Me just found out that messing with it might be a Pretty-Good-Precaution for future communication... On the other hand, if you are the trustworthy and "I-don't-think-the-world-is-bad-cause-everyone-is-full-of-good-intentions" kind of person, feel free to skip this part (and maybe consider doing a reboot into the M$-world)

Otherwise, you will need to fire up a terminal and do a:


Code:

wgex hxxp://truecrypt(dot)sourceforge(dot)net/TrueCrypt-Foundation-Public-Key.asc


to get the public key, which we will than import into gpg:


Code:

gpg --import TrueCrypt-Foundation-Public-Key.asc


Now we can finally verify that we got the correct source files by typing:


Code:

gpg --verify TrueCrypt\ 6.1\ Source.tar.gz.sig TrueCrypt\ 6.1\ Source.tar.gz


After that we should get a good signature message in return from gpg, telling us that our downloaded file is the original, unmodified source code given out by the authors.

Next would be to untar the source and change the pwd to the new directory:


Code:

tar -zxvf TrueCrypt\ 6.1\ Source.tar.gz
cd truecrypt-6.1-source


To actually compile the binaries of TrueCrypt 6.1, a


Code:

less Readme.txt


tells us we will need the RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20 header files and where we can get them. So we will do a


Code:

wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/cryptoki.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/ct-kip.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/opt-pkcs11.h
wgex fxp://ftp(fot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20a3.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs-11v2-20a3d3.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11t-consolidated-d1.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h
wgex fxp://ftp(dot)rsasecurity(dot)com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h.org

which should provide us with the needed files now being stored in the source code directory. After that we should be ready to create a working binary from the source by including the PKCS header files by typing:


Code:

make PKCS11_INC=/root/truecrypt-6.1-source


Of course you would have to adjust the code of the PKCS11_INC variable to your needs, if you happen to work in a different directory structure. Just make sure it points to the PKCS files we got earlier.

If everything goes well, we should end up with a nice working binary of TrueCrypt 6.1 in the "/root/truecrypt-6.1-source/Main" directory. We can now change into this directory, copy the compiled file to "/usr/bin" and thus overwriting the old binary of TrueCrypt 4.3a (I think it was). To keep things clean, we can also delete the directory with the source code as we don't need it anymore.


Code:

cd /root/truecrypt-6.1-source/Main
cp truecrypt /usr/bin/
cd /root
rm -rf truecrypt-6.1-source


That's it folks. For the looks and feels one might want to right-click on the K --> Menu-Editor, navigate to Backtrack --> Miscellaneous --> Truecrypt and uncheck the "Run in terminal" box. Also, in the "Command" text field, make sure truecrypt doesn't get any arguments passed on startup through the menu. Save the KDE Menu Editor, hit the X and off you go...

I hope this tutorial is of any use for someone. Shouldn't be to hard to walk through, as a rather beginning user as myself could figure this out and get it to compile.

Any comments, suggestions and critics are wellcome. Thanks again guys and have fun playing around with this info as I did.

Cheers
FreqVer

CODE: http://repository.slacky.eu/slackware-12.1/security/truecrypt/6.1a/src/