Archive for December, 2007

Steganography and Linux: A short steghide howto

Here I will how to hide a file, encrypted and passwordprotected in anonther file, for example a picture.

First you have to install “steghide”, use synaptic or whatever you want…

Steghide can use *.bmp,*.jpg, *.wav und *.au-files to hide data. I would recommend *.jpg, because all the other formats are quite unusual today in most pc-enviremonts(you want send a friend a song in *.wav-format and you certainly do not store your holiday pictures as *.bmps…)

To hide a file you use this command in the terminal(there is no gui for steghide):

steghide embed -cf picture.jpg -ef secrettext.txt

Of course you have to give the path to both files, so an example would be:

steghide embed -cf /home/usr/pictures/picture.jpg -ef /home/usr/secrettext.txt

Now steghide will ask you for a password and then embed the file secrettext.txt in the file picture.jpg. And it will encrypt the file with AES, so if you do not know the password you just will not know that there is any file stored in the picture…

Then you just get the message(sry for german):

steghide: Mit diesem Passwort konnten keine Daten extrahiert werden!
(With this password no data could be extracted)

Of course the size of the file you can store in another file is limited, if you just want to know how big the file can be, enter:

steghide info picture.jpg

(of course yo have, as said above, to give the path, so for example steghide info /home/usr/pictures/picture.jpg)

and steghide will tell you the maximum filze size!

With the command

steghide extract -sf picture.jpg

you get all your data back, just enter your password and the hidden file will be stored in the same folder as the picture…

Update: If this howto is not working for you, you probably have to use sudo in front of all commands! Or sudo -i as the first command, so you get sudo(admin)-rights for everything you enter in this terminal…

Relakks unter Ubuntu(Gnome)

Allgemeine Anmerkungen zu VPN-Anbietern und der Vertrauensfrage gibt es hier.

Installation:

Folgende Pakete müssen installiert sein:Network Manager, vpnc, network-manager-vpnc, network-manager-pptp, pptp-linux

Dazu kann man Synaptic-Paketverwaltung benutzen:

Nun klickt man auf das Symbol des Netzworkmanagers (nm-applet, Network Manager, normale rechte obere Ecke, blaube Balken oder Kabelsymbol) und klickt auf “VPN- Verbindungen, dort dann auf “VPN konfigurieren”

“Hinzufügen”

“Vor”

Verbinden mit “PPTP-Tunnel”(nicht Compatible Cisco…!!!)

Dann:

Unter Verbindung:

Verbindungsname: “Relakks”

Typ: Windows VPN (PPTP)

Gateway: pptp.relakks.com

Dann wechselt man oben auf Authentifikation:

Dort setzt man nur einen Haken bei “EAP verweigern”, sonst nirgends!

Und wechselt dann auf Verschlüsselung und Komprimierung:

Hier nur den Haken bei “128-bit MPPE-Verschlüsselung verlangen” setzen

Und wechselt zu PPP-Optionen:

Haken bei “Peer-DNS verwenden” setzen und bei “Alleiniger Gerätezugriff (UUCP-ähnliche Sperre)”

MTU 1400 (üblicherweise als einziges abzuwandeln)
MRU 1416
lcp-echo-failure 10
lcp-echo-interval 10

Routing:

Haken bei “DNS durch Tunnel ermitteln” setzen…

Jetzt “Anwenden” und dann wieder im Network-Manager die VPN-Verbindungen auswählen, auf Relakks klicken, Benutzername und Passwort eingeben und Ubuntu stellt die Verbindung her. Von Fehlermedlungen nicht entmutigen lassen, liegt normalerweise an Relakss(”VP-Verbindung konnte nicht hergestellt werden”, sondern einfach nochmal probieren, eventuell etwas später…

Relakks and Ubuntu(Gnome):

Ubuntu 7.10 Gutsy Gibbon, using Network Manager:

You have to install the following packages(programms and libaries), you can use synaptic oder terminal:

-Network Manager (should already be installed)

-vpnc

-network-manager-vpnc

-network-manager-pptp

-pptp-linux

Normally, with Network Manager installed, you shuld see some health bar or a “plug”-symbol in the right upper corner auf your desktop.

If you left-click on it, you will see your normal connections,… and beneath that “VPN-connections”

I first wanted to provide screenshots, but i have the german Ubuntu-version and so I think it would be more confusing than useful…

So you go to “VPN-coonections” and then click on “Configure VPN” ,

choose under “connect with” pptp-tunnel not Compatible Cisco…, otherwise it won’t work!

Then a new window opens, where you can configure you’re vpn-connection:

Under connection you should choose:

Connection Name: Relakks
Type: Windows (VPN) PPTP
Gateway: pptp.relakks.com

Under authencication just check “Refuse EAP”, nothing else and under “Compression and encryption” just

“Require 128 bit MPPE encryption”

Under PPP-Options you should check “Use Peer DNS” and ” Exclusive Device Access (UUPC Style lock)” and

MTU 1400
MRU 1416
lcp-echo-failure 10
lcp-echo-interval 10

Under routing check check “Peer DNS through tunnel”

Normally you should not even have to restart, just go to “VPN-connections” and click on “Relakks”, type in username and password and there you go…

Wireless connections works fine for me, but i’ve heard of many people having problems, i’m sorry, but i won’t be able to help you there…

Sometimes you receive the error message:

“VPN Connection failed”, this has normally nothing to do with your configurations, but with Relakks itself, who is often overburdened(you cannot expect anything else for only 5 euros a month). Just try again and again, an hour later,…, this error never occured to me in the morning, but only in the evening, when many people are online!

Passwordmanager


Ich glaube jeder kennt das Problem, dass man immer mehr passwörter braucht, sie sich aber nicht alle merken kann…
Stduivz, ICQ, E-mail, andere Foren, youtube, Paypal, Skype, Zattoo,….
Also nimmt man entweder einfache Passwörter, die man sich gut merken kann, oder ein Passwort für verschiedene Accounts oder man schreibt sie sich auf…
Und davor bewahrt einen ein Passwortmanager,
dieser speichert(und generiert auf Wunsch neue) alle Passwörter verschlüsselt in einer Datei ab, diese ist dann mit einem Haupt/Masterpasswort geschützt..
Um sie zu benutzen muss man nur den Passwortmanager einmal, nachdem man den PC gestartet hat, öffnen, und das Masterpasswort eintippen,…

Das Masterpasswort sollte dann natürlich relativ stark sein,…!!!

Auf jeden fall erhöht so ein Passwortmanager die Sicherheit allgemein, jetzt habe ich halt 28 verschiedene Passwörter, alle 14-24 Zeichen lang, völlig zufallsbasiert, weil ich sie mir eben nicht mehr merken muss und das bedeutet eine extrem hohe Sicherheit!(solange das Masterpasswort stark genug ist,…) Das Passwort für meine e-mail-adresse,.. kann ich natürlich auswendig!
http://keepass.info/
Funktioniert perfekt!
Passwort:
Einfachste Methode:
Zufallssatz:
Und jetzt liefen die Kinder in der Pause um 9.30 Uhr schon im 3.Stock der Schule umher, es nervt! Das geht zu weit!!!
=>ANfangsbuchstaben, Zeichen,,, übernehmen:
UjldKidPu9.30Usi3.SdSu,en!Dgzw!!!
je nach Gedächtnisleistung sollte man das dann noch etwas modifizieren:
zB hinter jede Zahl ein Zeichen
UjldKidPu9″.3§0%Usi3&.SdSu,en!Dgzw!!!
Und soetwas kann man schon als relativ sicher betrachten!

Verschlüsselt Chatten mit Pidgin und OTR

Eine neuere, bebilderte Anleitung findet sich hier!

1.ICQ-Client(das bunte teil, dass man sich runterlädt,…) über Bord werfen und Pidgin runterladen:
http://pidgin.im/index.php
Download hier:
http://pidgin.im/download/windows/
Auf Datei doppelklicken, Installieren,…
2.Nach der Installation starten und dann:
“Neues Konto einrichten:
Den Zugang für ICQ einrichten:

1. Protokoll “ICQ” wählen.
2.Benutzername: ICQ-Nummer angeben
3. Passwort: ****
4.Lokaler Alias: Nickname angeben (optional)
5. Passwort speichern: an/abwählen
6. Buddyicon auswählen durch anwählen von “Dieses Buddy-Icon für
dieses Konto benutzen:”
7. Speichern.

jetzt müsste man sich schon bei ICQ ganz normal anmelden können, alles
müsste funktionieren

So und jetzt kommt die Verschlüsselung:

Wir benutzen “Off-the-record“:

Direktlink zum Windowsinstaller(öffnet Dateimanager/Downloadmechanismus
des Webbrowsers,…)
Direktlink:
http://www.cypherpunks.ca/otr/binaries/windows/pidgin-otr-3.1.0-1.exe
Doppelklicken, installieren,…
Danach wirds automatisch aktiviert,…(sollte es zumindest)
Eigentlich relativ selbsterkärend!
Unter Plugins dann auf “Otr”-Plugin konfigurieren, da gibt es dann eine
Option zur Schlüsselerstellung für ein bestimmtes Konto…
Ist dieser erstellt, kann man geschützt chatten
GENAUE ANLEITUNG hier:
http://www.cypherpunks.ca/otr/README-pidgin-otr-3.1.0.txt

Creating a Truecrypt-volume ( Linux )

Precondition: Truecrypt is installed

1.Open your terminal, then type in

truecrypt -c

or

truecrypt –create

2.Truecrypt will now ask you whether you want a normal or a hidden volume:

Volume type:
1) Normal
2) Hidden
Select [1]:

Normal is fine for a beginner so just press “Enter”.

3.Now the path for the voulme is asked:

Enter file or device path for new volume:

Just t ype in any path you want: For example: /home/usr/tcvolume

tcvolume then would be the name of the volume:

4.Now the filesystem:

Filesystem:
1) FAT
2) None
Select [1]:

Just press “Enter”, nowadays FAT is also works quite fine under a linux-os,…

5.Now the size of the volume:

Enter volume size (bytes - size/sizeK/sizeM/sizeG):

If you want a 30 megabyte-container you type in 30M, if you want one GB, just type in 1G,…,of course there should be enough space on the harddrive…

6.Hash algorithm:

Hash algorithm:
1) RIPEMD-160
2) SHA-1
3) Whirlpool
Select [1]:

Pressing “Enter” is all you have to do…

7. Encryption algorithm:

Encryption algorithm:
1) AES
2) Blowfish
3) CAST5
4) Serpent
5) Triple DES
6) Twofish
7) AES-Twofish 8) AES-Twofish-Serpent
9) Serpent-AES
10) Serpent-Twofish-AES
11) Twofish-Serpent
Select [1]:

AES is a very secure and very fast encryption algorithm, so just take,…, it should provide more than enough security!

8. The password:

Enter password for new volume ‘/home/usr/tcvolume:

Is should be long and secure, a nonsense-sense is usually the best idea:

For example:

375 Dwarfs walk on the beach all day, playing volleyball, swimming and drinking beer. That is all they want to do.

375Dwotbad,pv,sadb.Tiatwtd.

Just make a bit more difficult:

375!Dwotbad,*pv,%sadb./Tiatwtd.§

This is a very complex password, but still quite easy to remember!

After entering the password a second time you will be asked for keyfiles, just press “Enter”

9.Truecrypt now wants to collect random data to make the key:

TrueCrypt will now collect random data.

To enable mouse movements to be used as a source of random data,
please do one of the following:
- Run TrueCrypt under administrator (root) account.
- Add read permission for your user to device /dev/input/mice.

Please type at least 320 randomly chosen characters and then press Enter:

Type in the 320 character and press “Enter”

Important: You should type in random data, so do not enter something like “aaaaaaaaaaaaaaaaaaaaa”, but “b$&/hnZgcj=3hJHGgöohfe44GJK”, “good random data” => “good key”, otherwise your key is worthless!!!

10.

Volume created.

Congratulations! You made it!

How to mount a truecrypt-volume in linux/ubuntu

That’s quite easy:

truecrypt -M “rw,sync,utf8,uid=$UID,umask=0007″
This is the command to mount your truecrypt-container/volume giving you the right to read and to write data!

After that follows the path to your truecrypt-container, for example /home/usr/tcvolume

and then the place where you want the truecrypt-container to be mounted. In Linux this can be any ordinary folder, so for example, just create a folder “truecryptvolume”, no you type in the whole path (e.g. /home/usr/truecryptvolume ), so that the whole command looks like that:

truecrypt -M “rw,sync,utf8,uid=$UID,umask=0007 /home/usr/tcvolume

/home/usr/truecryptvolume

(one line!)

Now you will be aksed for your user-or administratorpassword(sudo) and then for the volume password, if both are given correctly truecrypt will now mount your container.

By opening the folder “truecryptvolume” you will now be able to store your data encrypted.