dimanche 13 mai 2012

[w3challs] RSA

Cet article décrit une méthode pour résoudre une cryptanalyse RSA. Il est basé sur le challenge RSA de w3challs
Il fait suite à mon premier article sur le sujet http://www.infond.fr/2010/10/quelques-outils-pour-rsa.html

mardi 8 mai 2012

[root me] cryptanalyse d'une image xorée

Voici la solution de l'épreuve de cryptanalyse "Clair connu - Image chiffrée" élaborée par Dimitri Leca (@ryscrow) sur root-me . Elle consiste à déchiffrer une image bitmap chiffrée par un xor avec un mot clé. Le bitmap chiffré est disponible ici: ch3.bmp.

samedi 24 mars 2012

script test header injectable dans une requete http


import urllib2

headers = ['Accept','Accept-Charset','Accept-Encoding','Accept-Language','Accept-Datetime','Authorization','Cache-Control','Connection','Cookie','Content-MD5','Content-Type','Date','Expect','From','Host','If-Match','If-Modified-Since','If-None-Match','If-Range','If-Unmodified-Since','Max-Forwards','Pragma','Proxy-Authorization','Range','Referer','TE','Upgrade','User-Agent','Via','Warning','X-Requested-With','X-Do-Not-Track','DNT','X-Forwarded-For','X-ATT-DeviceId','X-Wap-Profile']

#skipped: Content-Length

req = urllib2.Request('http://sci.nuitduhack.com/EgZ8sv12')
for h in headers:
req.add_header(h, "'")
r = urllib2.urlopen(req)
if r.read()[0:4] == '.NDH':    # inscrire ici la chaine de caractère qui apparait dans la réponse du serveur
print h + ': rate'
else:
print 'Yesssssssssssssssssssss'

mardi 19 avril 2011

tutoriel openvpn


Cet article décrit comment installer un serveur VPN sous ubuntu et comment configurer Ubuntu desktop pour se connecter à ce serveur.

samedi 22 janvier 2011

sécuriser un wiki



Cet article décrit un ensemble de techniques pour sécuriser un wiki. Ces techniques ont été implémentées pour le Wiki Infond. Bien sûr, nous ne dévoilons ici qu'une partie des techniques de sécurisation que nous avons déployées.

jeudi 20 janvier 2011

dimanche 5 décembre 2010

howto find a specific string in an unmounted hard disk


the following linux command helps howto find a specific string in an unmounted  hard disk. This can be useful to find email addresses or interesting informations, even on supposed erased files*

$ sudo hexdump -e '8/1 "%02X ""\t"" "' -e '8/1 "%c""\n"' /dev/sda1 | less
/mystring

*french translation: la ligne de commande précédente est utile pour trouver une chaine de caractère sur un disque non monté. Elle peut être utile pour trouver par exemple des adresses email ou des informations utiles, y compris dans des fichiers supposés effacés.

vendredi 22 octobre 2010

utiliser son iphone comme modem USB 3G sous ubuntu


Il est possible d'utiliser son iphone (testé avec l'iphone 4.1) comme modem 3G sous Ubuntu (testé avec la version 10.10). Deux méthodes sont présentées la première.

vendredi 15 octobre 2010

quelques outils pour RSA

Cet article, rédigé rapidement, rassemble quelques outils concernant les implémentations de RSA. Il est plutôt orienté Python. Avec tout ca, pas de souci pour réussir l'épreuve de Nico34 du site Zenk Security!

dimanche 3 octobre 2010

Linux mount /home in a ramdisk - a paranoid configuration of gnome for Ubuntu

This article is a quick howto which describes how to mount /home in a ramdisk . The aim is to leave a minimum of traces on the hard disk.

mardi 7 septembre 2010

légalité du scan de port

La prise d’empreintes de ports informatiques, appelée aussi scan de port, est une technique consistant à balayer automatiquement, à l’aide d’un programme approprié, une série d’adresses IP spécifiques afin de déterminer les ports ouverts ou fermés sur chaque ordinateur. Un ordinateur pourrait être décrit comme un bâtiment dans lequel chaque habitant (les programmes) peut ouvrir ou fermer des portes (les ports) pour communiquer avec l’extérieur (le réseau, Internet). Scanner les ports consiste donc à venir frapper à chacune de ces portes en espérant obtenir une réponse du programme derrière.

Le scan de port peut être une action légitime : un administrateur peut vouloir scanner ses machines pour repérer des logiciels indésirables sur son réseau (anciennes versions, malwares). Cependant, le scan de port permet aussi à une personne malintentionnée d’obtenir des informations sur les applications en service dans un réseau afin d’identifier des failles ou de contourner les mesures de sécurités (firewalls, détecteurs anti intrusion). Il peut ainsi s’inscrire dans une démarche de préparation à une attaque contre un système d’information et constituer une étape préliminaire avant une intrusion.

Pour autant, le scan de ports est-t il contraire à la loi ?
Cet article apporte des éléments de réponses à cette question.
(article co-écrit avec Jean Dujardin)

samedi 28 août 2010

jeudi 26 août 2010

escape from PDF

Cet article résume l'actualité sur la vulnérabilité" Escape from PDF" [1], publiée en juillet 2010 par M. Didier Stevens, concernant les fichiers PDF ouverts par Adobe Reader.
Le format PDF n'est pas passif comme le format .TXT par exemple. Un document PDF peut donc contenir du code actif [0]. L'une des actions possibles est /launch qui permet de lancer un exécutable avec les droits de l'utilisateur [5]. Cette vulnérabilité a été en partie patchée en juin 2010 [6], puis un moyen de contourner le patch a été publié en juillet [7]. Un nouveau patch a été émis en août par Adobe [9]. Foxit 1.1 release n'est plus vulnérable non plus.

lundi 9 août 2010

lvl8 wargame NDH2010 - format strings exploitation tutorial

this article is a resolution of the french "Nuit du hack 2010" wargame level 8 test. The vulnerability is a format string. Its resolution is a direct application of the method aborded in the article "tutorial exploitation format strings" available on infond.

french version available.

lvl7 wargame NDH2010 - buffer overflow tutorial weak canary

level7 wargame NDH2010 - tutoriel exploitation buffer overflow avec canary faible

level 7 wargame NDH2010 -  tutorial buffer-overflow exploitation protected by a weak canary

This article describes the resolution of the french "Nuit du hack 2010" wargame level 7 test. This is a buffer overflow. Here, a protection was added with the introduction of a canary. This is a "random" integer pushed on the stack before the return address of a function and controled before the exit of this function. If the read integer is different of the attended value, the program quit immediatly.
The interest of this article is in the exploitation by guessing the value of this canary. Added to that, we'll use two tips proposed by m_101_: The use of the tool pattern provided by Metasploit, and the obtention of the return address by reading dmesg.

lvl6 wargame NDH2010 - buffer overflow tutorial

level6 wargame Nuit du Hack 2010 - buffer-overflow tutorial: only one byte available to control the return address

This article describes the resolution of the the french "Nuit du hack 2010" wargame level6 test. This is a buffer-overflow. Here, the buffer size is controled using the function strlen(). So, only one byte is available to control the return address. But the exploitation remains possible.
The interest of this article is in the understanding of the return address management on the stack.

lvl5 wargame NDH2010 - buffer overflow tutorial

level 5 wargame NDH 2010 - tutorial exploitation buffer-overflow - injection in an environment variable

This article describes the resolution of the french "Nuit du hack 2010" wargame test n°5. This is a variation of an exploitation of buffer-overflow. New: we use the console version of Metasploit. We present the injection of code through an environment variable of the system.

lvl4 wargame NDH2010 - buffer overflow (english version)

level4 wargame NDH 2010 - tutorial exploitation of a buffer overflow

This article describes the resolution of the french "Nuit du Hack 2010" wargame level3 test. This is a classic exploitation of a buffer overflow.

lvl3 wargame NDH2010 - crypto bruteforce substitution of characters

level3 wargame NDH2010 - crypto characters substitution

This article describes the NDH2010 wargame level3 solution. The interest stands in the search of a password generated by a substitution of the user characters.

lvl2 wargame NDH2010 - system function exploitation (english version)

level2 wargame NDH2010 - system() function exploitation tutorial

This article describes the exploitation of a bad implementation of the system() function in a C program, through the resolution of the french "Nuit du Hack 2010" wargame level2 test.

lvl1 wargame NDH2010 - buffer overflow (english version)

This article describes the resolution of the french "Nuit du hack 2010" wargame level1 test. The interesting part of it is in the perl command used to inject an hex address in a shell prompt.