Securely Delete files from Journaling Filesystems in Ubuntu and Linux Operating Systems

Previously I posted a tutorial on setting up wipe with Nautilus, It has come to my attention that since ext3 is a journaling file system that wipe isn't enough to securely delete files from people that have the tools/hardware to recover files, today I will show you how to delete a file that is unrecoverable to the best of my knowledge.. Read on if you like :)

Issue these commands carefully
dd if=/dev/zero of="file you want shreded"
shred -u -v -n 5 "file you want shreded"

Breaking it down, the commands say this:

* dd: "move data around"
* if=: "the input file is..."
* /dev/zero: "not a file at all, but a device that outputs an unending stream of zeros"
* of=: "and the output file is..."

* sync writes any data buffered in memory out to disk. This can include (but is not limited to) modified super blocks, modified inodes, and delayed reads and writes. This must be implemented by the kernel; The sync program does nothing but exercise the sync(2) system call.

* shred Overwrites the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.

If you have any other suggestions please share your knowledge, security & privacy should be common knowledge in todays world


Expand full post here...


Howto: Install new Slickness theme in Ubuntu Feisty Gutsy, and Heron

I ran across another slick theme, its called SlickNess, It is actually pretty slick, reminds me of the Ubuntu Studio theme with a few nice improvements, let me know what you think.
This baby is easy to install, here are the directions:

To install:
1.Download the file to your desktop from here
2.Right click the file and select extract here a terminal and run these commands:

sudo cp -r $HOME/Desktop/SlicknesS /usr/share/themes

sudo chmod 777 /usr/share/themes/SlicknesS/Slickness.jpg

Third (this one fixes firefox, This fix is made by user twrock, so if he wants me to delete it i will)
cp /usr/share/themes/SlicknesS/userChrome.css $HOME/.mozilla/firefox/*.default/chrome

Open the theme manager, you can now see the Slickness theme as a theme when you click on it , it suggests a wallpaper, click apply to apply the wallpaper!

the icon theme it suggests is this one:
black-white 2 Style big
Save the file in ~/.icons and extract the archive and go into System->Prefs->Appearance and Customize the Slickness theme and select icons and then black-white_style big and your done :)

Expand full post here...


Howto: Setup the 2WIRE 802.11g Wireless USB Adapter for Ubuntu Feisty, Gutsy, and Heron!

The 2WIRE USB Adapter comes with 2Wire home portals, it has long plagued Ubuntu and Linux users alike, I have had one for quite a while(got it with my 2WIRE Home Portal) and it has been collecting dust, to get this running on Ubuntu I had tried everything, I searched the web and didnt find a thing, just complaints that it doesnt work and people having problems. If you have the same card as me and use TKIP encryption, this will definately work for you, enjoy!

Ok first lets see if you have the same card as me:
open up a terminal and type:


If you see 1630:0005 you have the same exact card, and if yours looks like the picture above like mine does this should help you :)

Now what we must do is grab The drivers that are located in the root directory of the 2WIRE installation cdrom or wget them from my hosting:

Then what we must do is load the driver:
sudo ndiswrapper -i WlanUIG.inf

Lets see if it loaded properly shall we?
$ ndiswrapper -l
wlanuig : driver installed
device (1630:0005) present

Sweet! Its loaded now we are half way finished!

Then lets write module alias configuration for all devices:
sudo ndiswrapper -ma

Now lets write module install configuration for all devices so its starts on boot!
sudo ndiswraper -mi

Ok then finally lets load up ndiswrapper kernel module to see if it works!
sudo modprobe ndiswrapper
Now lets type:
sudo iwconfig

Now you should see a new wireless adaptor listed "wlan0, if not your fuqd and you need to ask for help!

Now that the driver is loaded we can move to the next step, installing wpa_supplicant:
sudo apt-get install wpasupplicant

Now lets configure Wpa Supplicant!

Now that wpa supplicant is installed we need to grab some basic information:
Wireless SSID
Wireless psk passphrase

Once you have these we need to issue this command:
usage: wpa_passphrase [passphrase]

Ok you see whats above? Great now Lets follow the usage instructions above

wpa_passphrase 2WIRE31337 mysecurepassword

Here is the output:

Ok now lets open up wpa supplicants config file
sudo gedit /etc/wpa_supplicant.conf

Now you need to edit your config file like so


ssid="2WIRE31337" <-- your ssid of course
psk=1a2043835852349c1c8288323f8899324259ce3845c1ee44fab7f3ee4ee8eb20 <-- generated psk above

Ok Save the file with ctrl-s and exit gedit.

Now we have to make wpa_supplicant load when system boots, so go back to the terminal window and type:

sudo gedit /etc/network/interfaces

Here is the static network configuration, make sure it is setup properly according to your router/network settings:
auto wlan0
iface wlan0 inet static
wireless-essid 2WIRE31337
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

Alternately Here is the Dynamic Configuration, uncomment to use:
#auto wlan0
#iface wlan0 inet dhcp
#pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
#post-down killall -q wpa_supplicant

Now once /etc/network/interfaces is properly configured lets ctrl-s to save then exit.

Now if all goes well you should be connected, lets find out!
sudo /etc/network/interfaces restart
ping :)

Lost your 2wire USB Install CD? I got you covered, here is the full CD that came with my 2WIRE USB Dongle, drivers, docs and all!

Expand full post here...


Howto: Watch P2P Tv with SopCast with Ubuntu Gutsy

Here is a little information about SopCast, below is the guide to get it set up.

SopCast is a simple, free way to broadcast video and audio or watch the video and listen to radio on the Internet. Adopting P2P(Peer-to-Peer) technology, It is very efficient and easy to use. Let anyone become a broadcaster without the costs of a powerful server and vast bandwidth. You can build your own TV stations comparable with large commercial sites with minimal resources. Using SopCast, you can serve 10,000 online users with a personal computer and a home broadband connection.

SoP is the abbreviation for Streaming over P2P. Sopcast is a Streaming Direct Broadcasting System based on P2P. The core is the communication protocol produced by Sopcast Team, which is named sop://, or Sop technology.


  • State-of-the-art P2P technology. Share the data among all viewers, make the channel more available and stable.
  • Minimal delay in the P2P streaming market.
  • Fast buffering. 10-30seconds.
  • Firewall and NAT traversal technology to pass 90% P2P barriers.
  • Build your own channels and broadcast it over the Internet.
  • Streaming real time streams. Support for many streaming transport protocol. mms, http, etc.
  • Streaming media files. Many file types: asf, wmv, rm, rmvb, mp3, etc.
  • Support for loop file playing.
  • Extremely low memory footprint and CPU load
  • Standard channel URL: click on any sop:// URL to play.
  • Real time monitor of broadcasting source quality and network quality to help viewers to select a appropriate channel.
  • Record the clips when you are watching it.
  • Can play the stream with your favorite player, such as Windows Media Player, RealPlayer, VLC, etc.
  • Memory buffering, no harm to the hard disk.
  • Support for authentication for both the broadcasters and the viewers. The broadcaster has full control on his channels.
  • End-to-End security, encrypted messages, hi level P2P security, no hijack.
  • Support multiple channels broadcast on the same server. Normally, you can run 5-10 channels on one PC.
  • The Sop Player can be embedded into a webpage or any software applications. It works just like Windows Media Player.
  • The Sop Server and Sop Player can be run both on Windows and Linux. The whole system can be ported to embedded Linux.
  • Freeware, not ad/spy ware

This guide will help you install sopcast on Ubuntu 7.10 Gutsy. It will also help you get a special modified version of the GUI running and setup firefox to send sop:// links to the program.

Installing packages

Make sure you have all universe and multiverse repositories switched on. Then, in terminal:

sudo apt-get install qt3-apps-dev vlc build-essential

Downloading the latest SopCast binary

Link: Sopcast ix86 binary

Unzip it and cd into that directory using terminal. Then run:

sudo cp sp-sc-auth /usr/bin/sp-sc

Downloading and building the latest GUI

Download this specially modified source package. I have added URL handling.

Link: RKMOD version of QSopCast

Aga*in, unzip it and cd into that (src) directory using terminal. Then run

sudo qmake
sudo make
sudo make install

This should compile the source and install the binary into the correct location.

Creating a menu shortcut

Go to System / Preferences / Main Menu... then 'Internet' and 'Add New Item'. Give it the name "QSopCast" and command "qsopcast". You should now be able to launch from the main menu.

Setting up the GUI

Once the gui is open, goto config then config again. Make sure that the player settings are all set to "vlc" and that the channel URL is set to ""

You should now be able to watch sop casts by selecting a channel, launching it and then hitting player when the stream is at 100%

Firefox sop:// URLS

Go into firefox and enter URL: "about:config". Right click, select new and string. The string name is "" and the value is "qsopcast". It should now send sops to the modified version of QSopCast ready to be launched.

Expand full post here...


List of Ubuntu Keyboard Shortcuts

I am a big fan of Hotkeys/shortcuts, here is a few I have collected, I will be adding more as I find them.

Several of the most popular keyboard shortcuts in Windows work in Ubuntu as well, such as Ctrl-C to copy, Ctrl-V to paste, and Ctrl-S to save a file. Here are a few others for working faster in Ubuntu and its apps:

Alt-Ctrl-L Locks the screen.
Alt-F1 opens the Applications menu, then use the arrow keys to navigate the submenus.
Alt-F2 opens the Run Application dialog box.
Alt-F3 opens the Deskbar Applet (F3 opens the search bar at the bottom of the window).
Alt-F4 closes the current window.
Alt-F5 unmaximizes the current window (if it's maximized, of course).
Alt-F7, followed by arrow keys or mouse movement, adjusts the current window's position.
Alt-F8 resizes the current window.
Alt-F9 minimizes the current window.
Alt-F10 maximizes the current window.
Alt-spacebar opens the window menu.
Alt-Tab moves between open windows.
Ctrl-Alt-Tab moves between open panels on the desktop.
Ctrl-W closes the current window.
Ctrl-Q closes the current application.
Here are some keyboard shortcuts for working in the Terminal window:
Ctrl-C kills the current process.
Ctrl-Z sends the current process to the background.
Ctrl-D logs you out.
Ctrl-R finds the last command matching the entered letters.
Tab followed by entered letters lists the available commands beginning with those letters.
Ctrl-U deletes the current line.
Ctrl-K deletes from the cursor right.
Ctrl-W deletes the word before the cursor.
Ctrl-L clears the terminal output.
Shift-Insert pastes the contents of the clipboard.
Alt-F moves forward one word.
Alt-B moves backward one word.

If you know of any other Shortcuts, please feel free to post them in the comments!

Adjust your keyboard shortcuts: Ubuntu makes it easy to customize your shortcuts. Click System > Preferences > Keyboard Shortcuts, select one of the shortcuts in the list, and enter your preferred keystroke combination. You can also alter your keyboard accessibility options by clicking System > Preferences > Universal Access > Keyboard Accessibility. Here you can enable and adjust the timing for sticky keys, repeat keys, slow keys, bounce keys, toggle keys, and mouse keys (these convert your numeric keypad into mouse controls).

Expand full post here...


Howto: Sniff or Hack someone’s username and password over an SSL encrypted connection with Ubuntu Linux

Do you think you're safe if you type https :// before or I hope you'll think twice before you login from a computer connected to a wireless network after reading this guide. Let's start at the beginning. Let's say you have an evil neighbour who wants your paypal credentials. He buys himself a nice laptop with a wireless card and, if you are using a wep encryption, he cracks your wep code (click here to see how). After cracking the key he logs into your network. Maybe you always allowed him to use your network because you thought it can't do any harm to your computer. You aren't sharing any folders so what's the problem? Well, in the next few steps I'm going to describe the problem.


1. Let's assume your neighbour uses linux to crack your wep key. After cracking it, he installs ettercap ( on his linux system. If you want to do this at home, I would recommend you to download BackTrack because it already has everything installed. If you want to install it on your own linux distribution, download the source and install it with the following commands:

$ tar -xzvf ettercap-version.tar.gz

$ make

$ make install

To install in Ubuntu simply click here within firefox or:
sudo apt-get install ettercap-gtk

2. After installing, you need to uncomment some code to enable SSL dissection. Open up a terminal window and type “nano /usr/local/etc/etter.conf”, without the quotes. Scroll down using your arrow keys until you find this piece of code:

if you use iptables:

# redir_command_on = “iptables -t nat -A PREROUTING -i %iface -p tcp -dport %port -j REDIRECT -to-port %rport”

# redir_command_off = “iptables -t nat -D PREROUTING -i %iface -p tcp -dport %port -j REDIRECT -to-port %rport”

You need to uncomment the last two lines.

redir_command_on = “iptables -t nat -A PREROUTING -i %iface -p tcp -dport %port -j REDIRECT -to-port %rport”

redir_command_off = “iptables -t nat -D PREROUTING -i %iface -p tcp -dport %port -j REDIRECT -to-port %rport”

3. Press CTRL+O, press enter to safe the file and then press CTRL+X.

4. Start Ettercap and click on Sniff > Unified Sniffing > type in your wireless interface and press ok.

5. Press CTRL+S to scan for hosts

6. Go to MITM > ARP poisoning, select sniff remote connections and press ok.

7. Now you (and your neighbour!) can start sniffing! Press start > start sniffing. Walk to another computer on your network and open up paypal or any other site where you need to type in an username/password (gmail, hotmail,, etc.). All credentials will appear on the computer running Ettercap!

8. When you're done, don't just close Ettercap, but go to Start > Stop Sniffing, and then go to MITM > Stop mitm attack(s).

But how does all this stuff work?

Look at the following scheme:

Normally when you type in a password, host 1 (your computer) directly connects to host 2 (your modem or router). But if someone launced Ettercap on your network, host 1 isn't sending it's passwords to host 2, but to the Attacking host, the host that's running Ettercap! The attacking host sends everything to Host 2. This means that host 1 isn't noticing anything! Exactly the same happens with everything that host 2 is sending. Host 2 doesn't send packets directly to host 1, but forst to the attacking host.

Expand full post here...


Beginners Guide for GnuPG in Ubuntu


I am going to give a basic run down of how to use GnuPG to encrypt files, sign your messages, read encrypted messages from your friends and whatnot, along with some of useful commands and applications you can use in aiding you along the way :)

First off, incase you don't understand completely (which is absolutely fine, as we are not expected to know everything), GPG is a key-based encryption method. You will be given a public key and a private key. The private key, as indicated, should remain private as to keep the entire idea of encryption secure.

A person who holds your public key and wishes to send you an encrypted message, would encrypt the message with your public key. They can not decrypt their own message after they encrypt it. Only you, who holds the private key can decrypt the message.


There are two different GUI based applications which can assist you in setting up a GPG key. These two are GPA, which is a very simple application that does everything you need, as far as key managing, deleteing, adding, signing and adding a level of trust to another person's public key.

The second one is seahorse. It is built for Gnome, and uses the gnome-keyring (if I am not mistaken) so it is a little bit more heavy than GPA, which is my favorite. (Note to the reader, I am not a KDE user, but I am sure there is a KDE GnuPG application suited for them. I am in no way discriminating them from this guide for any reason).

Let's begin by installing GPA and seahorse (or you can choose one of the two if you wish).
From the Terminal (Applications > Accessories > Terminal), run the following command:


sudo apt-get install gpa seahorse
To launch GPA, from run dialog (ALT + F2) or the terminal:

To launch seahorse, from the run dialog (ALT + F2) or the terminal:

Both of this GUI applications give you the opportunity to create a GPG key from their menus, and if you wish to do it that way, you may do so. It should be very simple and informational, so I will not explain how to do it from those applications (as it could also be subject to change over time).

Another application worth mentioning would be FireGPG for Firefox. It can encrypt / decrypt / sign / verify / import and export with GPG. To install it for Firefox, please visit their website:

Key Generating

As an alternative, you could create a GPG key from the command line of the terminal.
To do so, launch your terminal (Applications > Accessories > Terminal) and run the following command, to get started:

gpg --gen-key
You will then be prompted back with the following:

Please select what kind of key you want:
(1) DSA and Elgamal (default)
(2) DSA (sign only)
(5) RSA (sign only)
Your selection?

You will want to select number 1, as it can be used for encryption and decryption, whereas the second and third choices are only allowed to sign messages. To do so, press the number 1, and then press enter.

You then will be prompted with the following:

DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)

You will want to enter "2048" here, as recommended by gnupg.
If you don't want your key to expire (for the next prompt, select 0).

Answer yes if the information is correct, when prompted, and then enter your Real Name, Email address, and a comment (which is optional). If everything is correct, press "o" (for Ok) and then enter.

You will then be asked to enter a passphrase. This process will be repeated. As always, make a strong password which would be difficult to crack. Do not enter a name / address / birthdate or word from a dictionary as your password. Take the usual precautions, and make it random and difficult to crack.

After entering your passphrase, follow the instructions in the terminal:

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

When you have successfully finished generating your key, you will see a message similar to the following:

gpg: key 069C39A4 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 2 signed: 1 trust: 0-, 0q, 0n, 0m, 0f, 2u
gpg: depth: 1 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 1f, 0u
pub 1024D/069C39A4 2008-01-28
Key fingerprint = 516E E759 94BA 0DC1 37BE 1074 E46C B27D 069C 39A4
uid samplekey
sub 2048g/BC9EC4CB 2008-01-28
Your KEY-ID would be the two keys (both identical) above which are in bold.
The Key fingerprint is also listed there.

Key Servers

Key servers are used to distribute your public key to other key servers and so other users can easily look your name (or email up) in the database and find your public key to send encrypted messages to you. This eliminates the process of physically or unsecurely giving your friend your public key, and allows others to be able to find you on an online database.

To upload your public key to the Ubuntu keyserver, there are 2 ways to do this.
  1. By pasting your ASCII Armored Public Key into the submission box at the Ubuntu Keyserver
  2. By using the terminal and gnupg to send your public key to the Ubuntu Keyserver.

To accomplish method 1, you will need to open seahorse, select your key under "My Personal Keys" and click the "Export Public Key" in the toolbar. You can optionally choose the name and location of which it will be saved to. Proceed to open up:
while opening your newly exported public key with a text editor (gedit).

Select and copy the entire contents of your public key file, and paste it into the "Submit a Key" text area on the Ubuntu Keyserver (link provided above). Submit it, and it should then proceed to submit the key to the keyserver.

You should then be able to search for your email or name in the search string box on the Ubuntu Keyserver page, to find your public key on the internet. This is undoubtedly the Graphical way of doing it, but it can be somewhat longer.

To do it by the means of method 2, you would first need to open up a terminal (Applications > Accessories > Terminal) and paste the following into it:

gpg --send-keys --keyserver
Naturally, you would replace with your public key id, as stated before. It also helps to memorize it, like I have done ;)
If you forget what your keyid is, just run:

gpg --list-keys
That will list the keys registered with your email (and since there should only be one, it will only list your key.) Then you can obtain your KEY-ID and run the command above, to submit it to the keyservers.

Importing Keys

There are four different methods to importing a key, as stated below:
  1. FireGPG
  2. GPA
  3. Seahorse
  4. Terminal

All are quite simple to do, but FireGPG is the easiest of all if you are importing a public key from a keyserver with Firefox. I will briefly explain all four.

If you have somebody's public key on a webpage while in Firefox and have installed FireGPG (as mentioned above under Applications), then simply highlight the Public key from beginning PGP comment to ending PGP comment, right click on it, select FireGPG and click the Import button. It's that simple!

For your information, to solve confusion, the beginning and ending PGP comment tags look like the following:


If someone has given you their public key as a file, simply launch GPA and select "Import" from the toolbar.

If someone has given you their public key as a file, you can do one of two things. First, you can open up Nautilus and double click this file, and it should automatically import the public key into your GnuPG, or open Seahorse and select "Key" from the menu and click "Import".

Open up the terminal (Applications > Accessories > Terminal) and type:

gpg --import KEYFILE
KEYFILE would be the filename of the public key in your home folder.
(If it is not in your home folder, please cd to the proper directory first, and then run the above command.)

Tips and Tricks

Here is some more valuable information that can be useful when encrypting / decrypting files with GPG from the terminal.

List Keys
If you wish to see all of the keys you have imported into GnuPG, you can issue the following command:

gpg --list-keys

Encrypt a File
If you wish to encrypt a file for your friend with his Public Key, run the command in the following format:

gpg -o encrypted_file.gpg --encrypt -r original.file
-o encrypted_file.gpg = Output to the following filename.
--encrypt = Duh, that's the encrypting part :D
-r = Recipient. KEY-ID would be your friends KEY-ID here.
original.file = The original file that you will be encrypting.

Decrypt a File
If someone has sent you a file that has been encrypted with your public key, you can decrypt it by the following:

gpg --decrypt filename.gpg

Clearsign a Document
Clearsigning is very similar to adding your signature to the bottom of a letter or important paper. It signifies that it actually came from you. By clearsigning, it generates a SHA1 hash of the entire file's contents and add's the SHA1 sum to the bottom of the signature. If the file has been tampered with, the signature verification will fail, which can be used to spot forgery.

If the user has edited the file after it has been signed, the verification of the signature will also fail, because the SHA1 sum will not match that of the actual content.

To clearsign a document / file, run the following:

gpg --clearsign filename.txt

Exporting your Public Key
To export your public key in ASCII Armored fashion, run the following command:

gpg --export -a > publickey.asc
Replace with your Public Key ID, and it will create a file called "publickey.asc" which you can distribute to your friends and they can import.

Symmetric Encryption
GPG can also do a symmetric encrytion where you can encrypt a file with a passphrase (this is not keybased encryption). To encrypt a file with a passphrase, use this:

gpg -c filename.txt
To decrypt this type of file, just use:

gpg filename.txt
And you will be prompted for the passphrase and it will decrypt the file.

Credits from original thread Here

Expand full post here...


Clicky Web Analytics