Mon la'Blog'atoire

Aller au contenu | Aller au menu | Aller à la recherche

dimanche 3 mai 2009

Backtrack 4 beta on EeePC 701

On a previous article, i explain how to add a module to make Backtrack 3 working better on Asus EeePC 701 Asus EeePC 701.

Backtrack 4 beta Backtrack 4 beta is now out from some time now, and it is now based on Ubuntu (Slackware for BT3), and this module has to be adapted.

Once again, you can easily install BackTrack 4 beta on an USB stick or SSD card, and boot on it.

It's simply works !


Installation :

  • First, you need to locate your USB device. On my EeePC, it is /dev/sdb. My BT4 files are on /mnt/sdb1 and changes partition on /mnt/sdb2
  • Download the following files and install them on /mnt/sdb1/BT4/optional/

EeePC.lzm

  • Edit /mnt/sdb1/boot/syslinux/syslinux.cfg and add these lines (just after the PROMPT, TIMEOUT and DEFAULT lines)
LABEL BT4
MENU LABEL BT4 Beta - EeePC + Console with Persistent Changes
KERNEL /boot/vmlinuz
APPEND vga=0×317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw quiet changes=/dev/sdb2 load=EeePC

LABEL BT4
MENU LABEL BT4 Beta - EeePC + Console
KERNEL /boot/vmlinuz
APPEND vga=0×317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw quiet load=EeePC
  • Reboot, and make sure the right choice in BT4 syslinux menu is OK

What's inside EeePC module

Reduce write cycles on flash devices
tmpfs should be mount on some temporary directory. However, /etc/fstab in rebuild at boot stage, using liblinuxlive script (that is part of the linux live framework) So we can't easily patch this library to add our tmpfs entry.
I found that the best way to add tmpfs in fstab was to add a rc script (S34tmpfs) in rcS.d directory, that have to be run just before S35mountall.sh
/var/log is no longer mount on tmpfs in this lzm for BT4 as there are many already created directory on /var/log that have to be here

kismet.conf
provide madwifi source for onboard EeePC chipset

scripts monitor_start and monitor_stop
to easily start/stop monitor mode on internal wifi device (usefull for aircrack-ng)

dimanche 7 septembre 2008

Nessus 3.2.1 module on Backtrack 3 Final

Nessus is no longer installed inside backtrack distribution.

Here is a module to run Nessus 3.2.1 on BackTrack 3 Final.

Both server (nessusd) and GUI (NessusClient) are included

The module is build from following Tennable packages :

  • Nessus-3.2.1-es4.i386.rpm
  • NessusClient-3.2.1-es4.i386.rpm

The backtrack module start with an empty nessus package (no certificate, no user, and of course, no registration). See Nessus Install Documentation


Download

Download module from : http://www.licour.com/blogfiles/BT3/nessus-3.2.1.lzm


Installing on BackTrack 3 Final USB

In this mode, nessus is installed as a module, that is add to system during boot. Note that you should use a persistent changes file system to use this modiule. It let you record the plugin cache DB that nessus build during startup, and the registration code.

Note : You need some space (minimum 200 Mo) on change partition to store plugin database and update plugins.

Copy the module file into /bt3/modules directory of the USB, and then reboot. Nessus will be available as items in backtrack menu. The serveur is not started on boot


Installing on BackTrack 3 Final HDD

HDD installation does not support module (this is a SLAX feature !). Installation consist of copying files of modules to HDD. Then, you need to run an installation script

lzm2dir nessus-3.2.1.lzm /
/etc/rc.d/rc.nessus start

That's all

Backtrack 3 Final on EeePC

There are many articles about installing BackTrack on EeePC .

Here are some articles about this subject :

You can easily install BackTrack 3 Final (BT3F) on an USB stick or SSD card, and boot on it.

It's simply works !

However, there are some additional tweaks to bring for optimal use on this specific hardware. I created a BackTrack 3 Final module to compiled and install all these modifications.


Installation :

  • First, you need to locate your USB device. On my EeePC, it is /dev/sda. My BT3F files are on /mnt/sda1 and change partition on /mnt/sda2
  • Download the following files and install them on /mnt/sda1/bt3/optional/

EeePC.lzm
cubez_EeePC.lzm

  • Edit /mnt/sda1/boot/syslinux/syslinux.cfg and add these lines (just after the PROMPT, TIMEOUT and DEFAULT lines)
LABEL pchanges
MENU LABEL EeePC BT3 Graphics mode (KDE) with Persistent Changes
KERNEL /boot/vmlinuz
APPEND vga=0×317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/dev/sda2 load=EeePC autoexec=xconf;kdm

LABEL pchanges
MENU LABEL EeePC BT3 Graphics mode (Compiz) with Persistent Changes
KERNEL /boot/vmlinuz
APPEND vga=0×317 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw changes=/dev/sda2 load=cubez_EeePC,EeePC autoexec=xconf;cubez;kdm
  • Reboot, and make sure the right choice in BT3 syslinux menu is OK

What's inside EeePC module

Reduce write cycles on flash devices
tmpfs should be mount on some temporary directory and log path. However, /etc/fstab in rebuild at boot stage, using liblinuxlive.sh script, that is include inside initrd. So we can't easily patch this library to add our tmpfs entry. I found that the best way to mount tmpfs was to replace the PCMCIA boot script. It is load early, before daemon initialization (see /etc/rc.d/rc.M), and there is no PCMCIA port on our EeePC.

kismet.conf
provide madwifi source

/etc/rc.d/rc.6
fix shutdown hang

scripts monitor_start and monitor_stop
to easily start/stop monitor mode on internal wifi device


What's inside cubez_EeePC module

compiz has some bugs on EeePC. Compiz module provided with BT3 beta seems better. This module is cubez.lzm provides with this distribution.

dimanche 1 octobre 2006

Récupération Courier Confidentiel

Peu de fournisseurs d’accès offrent à leurs abonnés des accès mails sécurisés. J’entends par là la mise à disposition d’une passerelle de récupération des mails via un protocole permettant de chiffrer les communications (SSL). Plutôt que de fournir du POP3S (POP3 over SSL) ou IMAPS (IMAP over SSL), seuls les protocoles POP3 et IMAP sont disponibles.

Ceci n’est pas très gênant depuis la maison, mais peu poser problème depuis l’extérieur (entreprise, lieu public, hotspot…) où les informations (password, courriers…) vont transiter en clair, à la vue de tous.

L’utilisation d’un webmail en HTTPS dans ces situations est donc préférable, mais pas toujours pratique.

Il existe une solution intéressante qui consiste à mettre en place un proxy chez vous, accessible en POP3S et/ou IMAPS, qui relayera les communications vers votre provider en POP3 et/ou IMAP (le risque étant plus mesuré si celles-ci sont initiées depuis chez vous).

La mise en place d’un tel proxy nécessite :

  • une connexion internet permanente (ADSL)
  • une IP fixe ou à défaut une IP enregistrée dans un DNS dynamique
  • une machine sous linux toujours en fonctionnement
  • une configuration dans votre firewall permettant d’ouvrir les ports POP3S/IMAPS vers le linux
  • l’installation ou compilation du logiciel perdition et des librairies vanessa associées

Perdition est un proxy POP3/IMAP supportant les protocoles SSL et TLS.

L’idée de cette configuration est d’activer en entrée les protocoles POP3S (995/tcp) et le mode TLS du POP3 (110/tcp) (et uniquement ce mode). Une table de users sera prédéfinie sur la machine, évitant de transformer le logiciel en proxy ouvert à tous (mais dans ce cas, vous seriez en possessions de tous les users/passwords transitant sur votre machine ;-)

Il est préalablement nécessaire de créer et d’installer un certificat SSL et sa clé privée.

La configuration est ensuite la suivante (pour un proxy POP3S / POP3 TLS) : (Les fichiers dependent de la distribution Linux)

/etc/sysconfig/perdition

RUN_PERDITION=yes
POP3=yes
POP3_FLAGS="--ssl_mode tls_listen,tls_listen_force"
POP3S=yes
POP3S_FLAGS="--ssl_mode ssl_listen"
IMAP4=no
IMAP4_FLAGS=
IMAP4S=no
IMAP4S_FLAGS=

/etc/perdition/perdition.conf

connection_logging
map_library /usr/lib/libperditiondb_posix_regex.so
map_library_opt /etc/perdition/popmap.re
username_from_database
ssl_cert_file /etc/perdition/pop3s.crt
ssl_key_file /etc/perdition/pop3s.key

Cette configuration désactive le support de POP3 non sécurisé, obligeant l’utilisation de TLS. Attention toutefois : si un user/password est émis avant la négociation TLS (via le mot clé STLS en POP3 ou STARTTLS en IMAPS), celui-ci sera refusé, mais quand même transmis en clair ! A vous de forcer le mode TLS ou de le désactiver.

/etc/perdition/popmap.re

^email@laposte\.net$: login@pop.laposte.net:110
^email@free\.fr$: login@pop.free.fr:110

Ce dernier fichier contient la table de mapping (exhaustive) qui sera utilisée. Votre logiciel de mail (thunderbird, outlook…) devra être configuré avec votre machine comme serveur POP3 ou POP3S, l’adresse email figurant comme clé dans le fichier popmap.re, et votre password de compte. Le login du fichier est à remplacer par le login du compte mail

Et voilà. Il ne vous reste plus qu'à accepter le certificat SSL (où d'utiliser une autorité de certificat) au moment de la connexion, et vous voilà tranquille lors de vos déplacement...

dimanche 24 septembre 2006

Partages anonymes sous Samba

Il est possible de configurer Samba en mode anonyme, afin qu'aucune authentification ne soit necessaire.

Ceci est bien pratique dans le cadre d'une utilisation familiale, ou un serveur de fichier (une vieille machine sous Linux) sert à toute la famille.

La configuration de partages anonymes peut s'effectuer dans les modes suviants :

  • Mode de sécurité basé sur les utilisateurs

La ligne importante est le "map to guest"

[global]
...
security = user
guest account = nobody
map to guest = Bad User
...
[public]
comment = Dossier Public
path = /home/public
writable = yes
browseable = yes
public = yes
  • Mode de sécurité basé sur les partages

La ligne importante est le "map to guest"

[global]
...
security = shared
guest account = nobody
...
[public]
comment = Dossier Public
path = /home/public
writable = yes
browseable = yes
public = yes