PROJET AUTOBLOG


Shaarli - Les discussions de Shaarli

Archivé

Site original : Shaarli - Les discussions de Shaarli du 23/07/2013

⇐ retour index

Et maintenant… | stopmonop

dimanche 25 octobre 2015 à 23:52
@jeekajoo links
"""
contre les politiques de la Mairie de Paris qui laissent détruire la vie de quartier au profit de la transformation de la ville en un grand parc touristique/centre commercial régi par de prétendus impératifs économiques. Le commun dénominateur de tous : une dégradation du cadre de vie, liée au manque de concertation en amont des décisions et à la déconnection croissante des décideurs en matière de rénovation urbaine.
"""
Une lutte s'organise contre la « gentrification » croissante de la ville de Paris. Avec par exemple ces 12+ collectifs (cités dans l'article) dans le Nord Est qui commencent à construire une intelligence collective autour de ces sujets.

Un exemple de politique dénoncé par stopmonop: les logiques d'autofinancement des logements sociaux détaillées ici https://www.change.org/p/stop-monop-contre-les-logiques-d-autofinancement-dans-le-logement-social
(Permalink) (Profil)

Blog Stéphane Bortzmeyer: Enrichir la communication ou les publicitaires ?

dimanche 25 octobre 2015 à 23:33
GuiGui's Show - Liens
« Les FAI ne manquent pas d'imagination lorsqu'il s'agit de violer la neutralité du réseau. Un exemple récent [...] consiste à modifier les flux HTTP automatiquement pour ajouter, à l'insu de l'utilisateur, des informations personnelles qui seront utiles aux publicitaires qui gèrent les sites Web. Et cela se nomme cyniquement l'« enrichissement des en-têtes ».

Un exemple de fournisseur de matériel et logiciel qui propose cette technique est Juniper mais il y en a plein d'autres qui fournissent aux FAI sans scrupules des moyens de modifier les flux HTTP (HTTPS, pour l'instant, protège contre ces manipulations).

Est-ce que cette pratique est répandue ? On sait que, dans le monde de l'accès Internet par mobile, la neutralité du réseau est violée bien plus souvent (ce qui explique les campagnes marketing répétant en boucle que bientôt, X % des accès Internet seront par un mobile : il est important de convaincre les utilisateurs de passer à des technologies où la triche est plus fréquente). Sur les 300 opérateurs mobile identifiés, 5 ajoutent des en-têtes qui compromettent la vie privée de l'utilisateur, 6 ajoutent des en-têtes qui permettent de suivre un utilisateur à la trace (remplaçant les cookies désormais trop bien connus des utilisateurs), 24 mettent des informations techniques dans ces en-têtes, informations qui peuvent mener également à des problèmes de vie privée (cf. RFC 7239).

Inutile de dire que la majorité des opérateurs en question sont situés dans les pays du Sud, où la vigilance des citoyens et leurs connaissances techniques sont plus faibles : nettement moins de chances de se faire prendre en Jordanie qu'en Californie ! Orange Jordanie fait partie des « enrichisseurs d'en-têtes » et ajoute le numéro de téléphone du client aux en-têtes HTTP qui seront récupérables par les publicitaires sur le site Web visité ! [...]

Le record appartient apparemment à Vodafone Afrique du Sud pour publier dans les en-têtes ajoutés le numéro de téléphone et l'IMEI (depuis la parution de l'article, ils semblent avoir arrêté).

Enfin, il y a les en-têtes techniques, indiquant les logiciels utilisés pour cette opération. En France, SFR ajoute ainsi des x-bluecoat-via: (cf. la page Wikipédia sur cette sympathique entreprise), et des x-nokia-gateway-id:. Très souvent, l'opérateur (par exemple Bouygues et SFR en France) ajoute un x-forwarded-for: (en-tête depuis remplacé par un en-tête standard, cf. RFC 7239) qui indique l'adresse IP privée et peut aider au traçage d'un utilisateur. Sans compter les en-têtes mystérieux comme le x-vfstatus: chez SFR.

Bref, cet excellent travail de recherche montre que la neutralité de l'Internet n'est pas un problème abstrait : elle est violée tous les jours, et il est donc crucial qu'elle doit défendue. »

C'est justement en cours au Parlement UE, bougeons-nous. ;)
(Permalink)

Nación Rotonda on Twitter: « Estos cuatro autobuses transportan el triple de personas que el resto de vehículos de la foto »

dimanche 25 octobre 2015 à 22:47
@jeekajoo links
"""
Ces 4 bus transportent 3 fois plus de personnes que celles présentes dans l'ensemble des autres véhicules.
"""
Il part du postula que les bus sont pleins. Mais l'idée est là.
(Permalink) (Profil)

jQuery to vanilla JS

dimanche 25 octobre 2015 à 22:31
Les liens de Knah Tsaeb

Comment faire du jQuery en javascript pure (vanilla).

Origin => lehollandaisvolant.net
(Permalink) (Profil)
Kalvn's links
Un site qui regroupe l'équivalent de fonctions jQuery en JS Vanilla (JS sans framework). J'utilise toujours jQuery pour le côté compatibilité avec les vieux navigateurs mais ce site devrait me servir le jour où je décide de laisser tomber les ancêtres.
(Permalink) (Profil)

LANDEYves sur Twitter : ""A 3h, reculez votre montre d’une heure"Si vous ne voulez pas rester bloqué dans une faille spatio-temporelle, faites-le QUE la 1ère fois."

dimanche 25 octobre 2015 à 21:52
Fou à lier
« "A 3h, reculez votre montre d’une heure" Si vous ne voulez pas rester bloqué dans une faille spatio-temporelle, faites-le QUE la 1ère fois. »
Drôle :)
(Permalink)

Digital Agenda sur Twitter : "Is your city or region connected to fast #broadband? Here is some new data & map https://t.co/eNh5sjjUM6 https://t.co/1YCNyjq773"

dimanche 25 octobre 2015 à 21:39
Fou à lier
Une image pour décrire l'état du haut débit en France. Un pays banc au milieu d'une Europe bleue.
(Permalink)

Les voitures diesel polluent plus que les bus ou les camions | carfree.fr

dimanche 25 octobre 2015 à 21:30
@jeekajoo links
"""
Les voitures diesel testées en Norvège produisent ainsi quatre fois plus d’émissions d’oxydes d’azote (NOx) que des grands bus et des camions dans des conditions de conduite en ville, selon un rapport du Centre norvégien pour la recherche en Transport. Une étude distincte pour Transport for London a montré qu’une petite voiture dans la classe « supermini » émettait plus de NOx que la plupart des poids lourds et la même quantité qu’un véhicule de 40 tonnes.

James Tate, de l’Université de Leeds, un expert dans le domaine de la pollution, a réalisé ses propres recherches en utilisant des capteurs en bordure de route pour mesurer le trafic de passage. Ses résultats montrent également que les dernières voitures de modèle diesel produisent au moins autant de NOx que des autobus et des poids-lourds.
"""
Les 2 études:
https://www.toi.no/environment-and-climate/diesel-cars-have-high-emissions-in-real-traffic-article33388-1314.html
https://www.london.gov.uk/priorities/environment/clearing-londons-air/euro-6-emissions
(Permalink) (Profil)

FinalAmendments — La Quadrature du Net

dimanche 25 octobre 2015 à 20:23
GuiGui's Show - Liens
« After several months of negotiations, between the Council of the European Union, the European Commission and the European Parliament, the European Parliament will vote on the compromise text in plenary session on 27 and 28 October!

Here is the list of amendments to be supported by MEPs to save Net Neutrality and fight against discrimination on the Internet.  »

https://twitter.com/UnGarage :
« TSM's draft does not ensure clearly #NetNeutrality. MEPs need to support Amds 2,8,9,19,20 [...] TSM's draft does not ensure clearly #NetNeutrality. MEPs need to support Amds 2,8,9,19,20

[...]

#ZeroRating definition should be clarified in the TSM regulation draft. Ams 3 and 10; 14 and 21 must be supported.

[...]

On specialised services, AMs 6, 7 and 13; 17, 18 and 24 must be supported

[...]

Traffic management current provisions negatively impact #privacy and #innovation. AMs 4&11 or 15&22 must be voted

[...]

On congestion: AMs 5 and 12; 16 and 23

Check all the amendments that MEPs must support on Tuesday here: https://wiki.laquadrature.net/FinalAmendments »


Pour les personnes qui veulent agir :
Go https://savetheinternet.eu/fr/#act (tél, tweet, mail)
«  Against Net Neutrality
 * S&D Group (exceptions below)
 * EPP
 * Part of ALDE
 * EFDD (UK)
 * ECR

In favour of Net Neutrality
   Greens
   GUE
   EFDD (It)
   Part of ALDE »
(Permalink)

Swagger | The World's Most Popular Framework for APIs.

dimanche 25 octobre 2015 à 20:18
Les liens de Fanch
Un outil pour maintenir un doc sur l'API de votre application symfony. Il permet aussi de lancer des appels exemples ou réels.

Un outil pour générer la doc swagger à partir symfony : https://packagist.org/packages/zircote/swagger-php

(Un autre outil qui me semble très actif : https://github.com/nelmio/NelmioApiDocBundle ou lègerement moins actif : https://github.com/Luracast/Restler)
(Permalink)

Programmes gratuits sous Windows (liste mise à jour)

dimanche 25 octobre 2015 à 19:59
Red Beard
Voici les programmes gratuits que j'utilise sous Windows.
Ceux précédés de * sont multiplateformes, donc disponibles sous Linux et (sans doute) Mac.
Ceux précédés de ° fonctionnent aussi sous Linux avec Wine.
(Avant d'essayer un programme, je le fais analyser ici http://www.virustotal.com)

Acrobat Reader 11 (la version gratuite permet d'ajouter des commentaires)
*Aegisub (pour éditer des sous-titres)
Album Art Downloader (pour trouver et télécharger des couvertures de cd)
AntRenamer2 ou Bulk Rename Utility (pour renommer plusieurs fichiers à la fois)
AvantiFfmpeg-gui (interface graphique pour ffmpeg, pour le traitement audio et video)
Avidemux (pour le traitement video)
BelarcAdvisor (pour avoir diverses infos sur mon ordinateur et les programmes installés)
*BlueGriffon (pour créer et modifier des pages web)
*Calibre (pour gérer une bibliothèque d'ebooks; Calibre installe aussi un excellent lecteur d'ebook)
Captvty (pour enregistrer les emissions d'Arte +7)
Ccleaner (pour nettoyer les fichiers inutiles Windows)
ClassicShell (pour remplacer le menu Windows par un menu amelioré, indispensable)
Chrome (navigateur; j'y installe moins d'extensions protectrices que sur Firefox, et si nécessaire pour accéder à un site, j'utilise Chrome)
ConEmu (shell pour exécuter des commandes, bien plus agréable que celui de Windows)
*Copy, *Dropbox, *HubiC, OneDrive, *Owncloud (pour stocker et partager des fichiers dans le nuage)
°Drago (pour rejouer des parties de baduk / (i)go / weichi avec des commentaires)
DupeGuru (pour trouver et supprimer facilement les fichiers en double)
*Duplicati2 (pour faire une sauvegarde incrémentale dans le nuage, et non une simple synchronisation)
ExactAudioCopy (pour faire une sauvegarde parfaite d'un cd musical; Foobar2000 marche bien aussi)
*Filezilla (pour téléverser des fichiers en ftp)
*Firefox (navigateur; j'y ajoute ces extensions: http://redbeard.free.fr/links/?JQaAFg)
Firewall app locker (pour empecher facilement à des programmes de se connecter)
°Foobar2000 (lecteur audio)
*Gimp et Picassa (pour retravailler images et photos, de façon poussée avec Gimp, simple avec Picassa)
Glarysoft Software Update (pour identifier facilement quels programmes ont des mises à jour disponibles)
Glasswire, CurrPorts et WNetWatcher (pour monitorer le traffic réseau)
Greenshot (pour faire des captures d'écran)
HostsEditor (pour éditer facilement le fichier hosts de Windows)
ImgBurn et InfraRecorder (pour graver cd et dvd, en particulier dvd double couche avec InfraRecorder)
*Jitsi (pour des visioconférences et des échanges de messages cryptés)
°KeePass2 (pour stocker ses mots de passe)
°LucasChess, °XieXie, FreeCoinche, Hexy  (pour s'améliorer aux échecs occidentaux, ou chinois, ou à la coinche, ou au jeu de hex)
*LibreOffice (remplace MicrosoftOffice)
Malewarebytes (antimalware)
*MComix (pour lire des BD)
*MediaInfo (informations techniques sur les fichier vidéo)
Mp3tag (pour retaguer des fichiers audio)
MstMd5 (pour vérifier les sommes md5 de fichiers téléchargés)
Notepad2-mod (bien meilleur que le bloc note de Windows)
PeaZip et 7-zip (pour décompresser des archives)
PeerBlock (pour écarter des importuns quand on télécharge un torrent)
ProcessHacker (pour en savoir plus sur les processus en cours)
*QbitTorrent et TransmissionQt (pour télécharger des torrents)
QuicksysRegDefrag (pour défragmenter le registre Windows)
Revo Uninstaller (pour désinstaller des programmes et les traces qu'ils laissent sous Windows)
Sandboxie (pour exécuter un programme possiblement vérolé avec moins de risque)
*Sigil (pour éditer des ebooks)
*Skype (pour les visioconférences, parce que beaucoup de monde a un compte Skype; j'utilise Jitsi si possible)
SumatraPdf (plus agréable pour lire les pdf qu'Acrobat)
Syncback Free (pour faire une sauvegarde sur un disque dur externe)
TeraCopy 2.3 (mieux que Windows pour copier les fichiers)
*TexLive (une bonne distribution latex; n'installer que ce dont on a besoin)
*Texstudio (excellent editeur pour travailler sur des fichiers latex)
*Thunderbird (mcourriels)
*VLC (lecteur vidéo)
Webcam on/off (pour (des)activer le driver de sa webcam)
WinCDEmu (pour monter des images disque iso)
Xenu (pour savoir quels liens d'un site web sont cassés)
*Youtube-dl-gui (pour enregistrer les videos youtube)
Yumi (crée une clé usb multiboot sur laquelle ajouter des distributions linux ou autres)

NB: J'utilise aussi ces logiciels payants:
AcdSeeUltimate (pour visionner et gérer mes photos)
AverTvVolarHD (tuner usb pour regarder la télé sur mon ordinateur)
DvdFab (pour recopier des dvd)
JRiverMediaCenter (pour la musique et les videos)
NitroPro (pour lire et modifier les pdf)
SophosEndpointSecurityandControl (antivirus)
ZenithGo5 (pour jouer au baduk / (i)go / weichi contre l'ordinateur)
(Permalink) (Profil)

Je suis illustratrice. Oui, c’est sympa. Mais je veux juste gagner ma vie - Rue89 - L'Obs

dimanche 25 octobre 2015 à 19:53
Nekoblog.org :: Marque-pages
« Je garde dans mes archives le mail d’un éditeur, qui, après que j’aie refusé un projet en argumentant qu’il ne me semblait pas assez bien payé pour que je puisse le réaliser dans de bonnes conditions (c’est-à-dire, en ne bâclant pas comme une cochonne, ou bien en ne réalisant pas les pages deux par deux, une avec la main gauche, l’autre avec la main droite, technique que je perfectionne mais ne maîtrise pas encore tout à fait), m’a écrit que je lui semblais trop intéressée par des questions pécuniaires, au détriment d’ambitions artistiques qui font d’habitude l’honneur de ma profession. »
(Permalink)

HTTP Status Codes

dimanche 25 octobre 2015 à 19:44
Les liens de Fanch
Les code de réponses HTTP sur une page si vous faites des apps REST par exemple.
(Permalink)

http://lcamtuf.coredump.cx/signals.txt

dimanche 25 octobre 2015 à 18:38
palkeo - liens
"Delivering Signals for Fun and Profit"

        Understanding, exploiting and preventing signal-handling
                       related vulnerabilities.

              Michal Zalewski <lcamtuf@razor.bindview.com>
                (C) Copyright 2001 BindView Corporation


0) Introduction
---------------

According to a popular belief, writing signal handlers has little or nothing
to do with secure programming, as long as handler code itself looks good.
At the same time, there have been discussions on functions that shall be
invoked from handlers, and functions that shall never, ever be used there.
Most Unix systems provide a standarized set of signal-safe library calls.
Few systems have extensive documentation of signal-safe calls - that includes
OpenBSD, Solaris, etc.:

 http://www.openbsd.org/cgi-bin/man.cgi?query=sigaction:

 "The following functions are either reentrant or not interruptible by sig-
 nals and are async-signal safe.  Therefore applications may invoke them,
 without restriction, from signal-catching functions:

       _exit(2), access(2), alarm(3), cfgetispeed(3), cfgetospeed(3),
       cfsetispeed(3), cfsetospeed(3), chdir(2), chmod(2), chown(2),
       close(2), creat(2), dup(2), dup2(2), execle(2), execve(2),
       fcntl(2), fork(2), fpathconf(2), fstat(2), fsync(2), getegid(2),
       geteuid(2), getgid(2), getgroups(2), getpgrp(2), getpid(2),
       getppid(2), getuid(2), kill(2), link(2), lseek(2), mkdir(2),
       mkfifo(2), open(2), pathconf(2), pause(2), pipe(2), raise(3),
       read(2), rename(2), rmdir(2), setgid(2), setpgid(2), setsid(2),
       setuid(2), sigaction(2), sigaddset(3), sigdelset(3),
       sigemptyset(3), sigfillset(3), sigismember(3), signal(3),
       sigpending(2), sigprocmask(2), sigsuspend(2), sleep(3), stat(2),
       sysconf(3), tcdrain(3), tcflow(3), tcflush(3), tcgetattr(3),
       tcgetpgrp(3), tcsendbreak(3), tcsetattr(3), tcsetpgrp(3), time(3),
       times(3), umask(2), uname(3), unlink(2), utime(3), wait(2),
       waitpid(2), write(2). sigpause(3), sigset(3).

 All functions not in the above list are considered to be unsafe with re-
 spect to signals.  That is to say, the behaviour of such functions when
 called from a signal handler is undefined.  In general though, signal
 handlers should do little more than set a flag; most other actions are
 not safe."

It is suggested to take special care when performing any non-atomic
operations while signal delivery is not blocked, and/or not to rely on
internal program state in signal handler. Generally, signal handlers should
do not much more than setting a flag, whenever it is acceptable.

Unfortunately, there were no known, practical security considerations of
such bad coding practices. And while signal can be delivered _anywhere_
during the userspace execution of given program, most of programmers never
take enough care to avoid potential implications caused by this fact.
Approximately 80 to 90% of signal handlers we have examined were written
in insecure manner.

This paper is an attempt to demonstrate and analyze actual risks caused by
this kind of coding practices, and to discuss threat scenarios that can be
used by an attacker in order to escalate local privileges, or, sometimes,
gain remote access to a machine. This class of vulnerabilities affects
numerous complex setuid programs (Sendmail, screen, pppd, etc.) and
several network daemons (ftpd, httpd and so on).

Thanks to Theo de Raadt for bringing this problem to my attention;
to Przemyslaw Frasunek for remote attack possibilities discussion; Dvorak,
Chris Evans and Pekka Savola for outstanding contribution to heap corruption
attacks field; Gregory Neil Shapiro and Solar Designer for their comments
on the issues discussed below. Additional thanks to Mark Loveless,
Dave Mann, Matt Power and other RAZOR team members for their support and
reviews.


1) Impact: handler re-entry (Sendmail case)
-------------------------------------------

Before we discuss more generalized attack scenarios, I would like to explain
signal handler races starting with very simple and clean example. We would
try to exploit non-atomic signal handler. The following code generalizes, in
simplified way, very common bad coding practice (which is present, for
example, in setuid root Sendmail program up to 8.11.3 and 8.12.0.Beta7):

/*********************************************************
* This is a generic verbose signal handler - does some  *
* logging and cleanup, probably calling other routines. *
*********************************************************/

void sighndlr(int dummy) {
 syslog(LOG_NOTICE,user_dependent_data);
 // *** Initial cleanup code, calling the following somewhere:
 free(global_ptr2);
 free(global_ptr1);
 // *** 1 *** >> Additional clean-up code - unlink tmp files, etc <<
 exit(0);
}

 /**************************************************
  * This is a signal handler declaration somewhere *
  * at the beginning of main code.                 *
  **************************************************/

 signal(SIGHUP,sighndlr);
 signal(SIGTERM,sighndlr);

 // *** Other initialization routines, and global pointer
 // *** assignment somewhere in the code (we assume that
 // *** nnn is partially user-dependent, yyy does not have to be):

 global_ptr1=malloc(nnn);
 global_ptr2=malloc(yyy);

 // *** 2 *** >> further processing, allocated memory <<
 // *** 2 *** >> is filled with any data, etc...     <<


This code seems to be pretty immune to any kind of security compromises. But
this is just an illusion. By delivering one of the signals handled by
sighndlr() function somewhere in the middle of main code execution (marked
as '*** 2 ***' in above example) code execution would reach handler function.
Let's assume we delivered SIGHUP. Syslog message is written, two pointers are
freed, and some more clean-up is done before exiting (*** 1 ***).

Now, by quickly delivering another signal - SIGTERM (note that already
delivered signal is masked and would be not delivered, so you cannot
deliver SIGHUP, but there is absolutely nothing against delivering SIGTERM) -
attacker might cause sighndlr() function re-entry. This is a very common
condition - 'shared' handlers are declared for SIGQUIT, SIGTERM, SIGINT,
and so on.

Now, for the purpose of this demonstration, we would like to target heap
structures by exploiting free() and syslog() behavior. It is very important
to understand how [v]syslog() implementation works. We would focus on Linux
glibc code - this function creates a temporary copy of the logged message in
so-called memory-buffer stream, which is dynamically allocated using two
malloc() calls - the first one allocates general stream description
structure, and the other one creates actual buffer, which would contain
logged message.

Please refer the following URL for vsyslog() function sources:

 http://src.openresources.com/debian/src/libs/HTML/S/glibc_2.0.7t.orig%20glibc-2.0.7t.orig%20misc%20syslog.c.html#101

Stream management functions (open_memstream, etc.) can be found at:

 http://src.openresources.com/debian/src/libs/HTML/S/glibc_2.0.7t.orig%20glibc-2.0.7t.orig%20libio%20memstream.c.html#63

In order for this particular attack to be successful, two conditions have
to be met:

 * syslog() data must be user-dependent (like in Sendmail log messages
   describing transferred mail traffic),

 * second of these two global memory blocks must be aligned the way
   that would be re-used in second open_memstream() malloc() call.

The second buffer (global_ptr2) would be free()d during the first
sighndlr() call, so if these conditions are met, the second syslog()
call would re-use this memory and overwrite this area, including
heap-management structures, with user-dependent syslog() buffer.

Of course, this situation is not limited to two global buffers - generally,
we need one out of any number of free()d buffers to be aligned that way.
Additional possibilities are related to interrupting free() chain by precise
SIGTERM delivery and/or influencing buffer sizes / heap data order by
using different input data patterns.

If so, the attacker can cause second free() pass to be called with a pointer
to user-dependent data (syslog buffer), this leads to instant root compromise
- see excellent article by Chris Evans (based on observations by Pekka Savola):

 http://lwn.net/2000/1012/a/traceroute.php3

Practical discussion and exploit code for the vulnerability discussed in
above article can be found there:

 http://security-archive.merton.ox.ac.uk/bugtraq-200010/0084.html

Below is a sample 'vulnerable program' code:

--- vuln.c ---
#include <signal.h>
#include <syslog.h>
#include <string.h>
#include <stdlib.h>

void *global1, *global2;
char *what;

void sh(int dummy) {
 syslog(LOG_NOTICE,"%s\n",what);
 free(global2);
 free(global1);
 sleep(10);
 exit(0);
}

int main(int argc,char* argv[]) {
 what=argv[1];
 global1=strdup(argv[2]);
 global2=malloc(340);
 signal(SIGHUP,sh);
 signal(SIGTERM,sh);
 sleep(10);
 exit(0);
}
---- EOF ----

You can exploit it, forcing free() to be called on a memory region filled
with 0x41414141 (you can see this value in the registers at the time
of crash -- the bytes represented as 41 in hex are set by the 'A'
input characters in the variable $LOG below). Sample command lines
for a Bash shell are:

$ gcc vuln.c -o vuln
$ PAD=`perl -e '{print "x"x410}'`
$ LOG=`perl -e '{print "A"x100}'`
$ ./vuln $LOG $PAD & sleep 1; killall -HUP vuln; sleep 1; killall -TERM vuln

The result should be a segmentation fault followed by nice core dump
(for Linux glibc 2.1.9x and 2.0.7).

(gdb) back
#0  chunk_free (ar_ptr=0x4013dce0, p=0x80499a0) at malloc.c:3069
#1  0x4009b334 in __libc_free (mem=0x80499a8) at malloc.c:3043
#2  0x80485b8 in sh ()
#4  0x400d5971 in __libc_nanosleep () from /lib/libc.so.6
#5  0x400d5801 in __sleep (seconds=10) at ../sysdeps/unix/sysv/linux/sleep.c:85
#6  0x80485d6 in sh ()

So, as you can see, failure was caused when signal handler was re-entered.
__libf_free function was called with a parameter of 0x080499a8, which points
somewhere in the middle of our AAAs:

(gdb) x/s 0x80499a8
0x80499a8:       'A' <repeats 94 times>, "\n"

You can find 0x41414141 in the registers, as well, showing this data
is being processed. For more analysis, please refer to the paper mentioned
above.

For the description, impact and fix information on Sendmail signal
handling vulnerability, please refer to the RAZOR advisory at:

http://razor.bindview.com/publish/advisories/adv_sm8120.html

Obviously, that is just an example of this attack. Whenever signal handler
execution is non-atomic, attacks of this kind are possible by re-entering
the handler when it is in the middle of performing non-reentrant operations.
Heap damage is the most obvious vector of attack, in this case, but not the
only one.


2) Impact: signal in the middle (screen case)
---------------------------------------------

The attack described above usually requires specific conditions
to be met, and takes advantage of non-atomic signal handler execution,
which can be easily avoided by using additional flags or blocking
signal delivery.

But, as signal can be delivered at any moment (unless explictly blocked),
this is obvious that it is possible to perform an attack without re-entering
the handler itself. It is enough to deliver a signal in a 'not appropriate'
moment. There are two attack schemes:

A) re-entering libc functions:

 Every function that is not listed as reentry-safe is a potential source
 of vulnerabilities. Indeed, numerous library functions are operating
 on global variables, and/or modify global state in non-atomic way.
 Once again, heap-management routines are probably the best example.
 By delivering a signal when malloc(), free() or any other libcall of
 this kind is being called, all subsequent calls to the heap management
 routines made from signal handler would have unpredictable effect,
 as heap state is completely unpredictable for the programmer.

 Other good examples are functions working on static/global variables
 and buffers like certain implementations of strtok(), inet_ntoa(),
 gethostbyname() and so on. In all cases, results will be unpredictable.

B) interrupting non-atomic modifications:

 This is basically the same problem, but outside library functions.
 For example, the following code:

    dropped_privileges = 1;
    setuid(getuid());

 is, technically speaking, using safe library functions only. But,
 at the same time, it is possible to interrupt execution between
 substitution and setuid() call, causing signal handler to be executed
 with dropped_privileges flag set, but superuser privileges not dropped.

 This, very often, might be a source of serious problems.

First of all, we would like to come back to Sendmail example, to
demonstrate potential consequences of re-entering libc. Note that signal
handler is NOT re-entered - signal is delivered only once:

#0  0x401705bc in chunk_free (ar_ptr=0x40212ce0, p=0x810f900) at malloc.c:3117  #1  0x4016fd12 in chunk_alloc (ar_ptr=0x40212ce0, nb=8200) at malloc.c:2601
#2  0x4016f7e6 in __libc_malloc (bytes=8192) at malloc.c:2703
#3  0x40168a27 in open_memstream (bufloc=0xbfff97bc, sizeloc=0xbfff97c0) at memstream.c:112
#4  0x401cf4fa in vsyslog (pri=6, fmt=0x80a5e03 "%s: %s", ap=0xbfff99ac) at syslog.c:142
#5  0x401cf447 in syslog (pri=6, fmt=0x80a5e03 "%s: %s") at syslog.c:102
#6  0x8055f64 in sm_syslog ()
#7  0x806793c in logsender ()
#8  0x8063902 in dropenvelope ()
#9  0x804e717 in finis ()
#10 0x804e9d8 in intsig ()                 <---- ** SIGINT **
#11 <signal handler called>
#12 chunk_alloc (ar_ptr=0x40212ce0, nb=4104) at malloc.c:2968
#13 0x4016f7e6 in __libc_malloc (bytes=4097) at malloc.c:2703

Heap corruption is caused by interruped malloc() call and, later, by
calling malloc() once again from vsyslog() function invoked from handler.

There are two another examples of very interesting stack corruption caused by
re-entering heap management routines in Sendmail daemon - in both cases,
signal was delivered only once:

A)

 #0  0x401705bc in chunk_free (ar_ptr=0xdbdbdbdb, p=0x810b8e8) at malloc.c:3117
 #1  0xdbdbdbdb in ?? ()

B)

 /.../
 #9  0x79f68510 in ?? ()
 Cannot access memory at address 0xc483c689

We'd like to leave this one as an exercise for a reader - try to figure
out why this happens and why this problem can be exploitable. For now,
we would like to come back to our second scenario, interrupting non-atomic
code to show that targeting heap is not the only possibility.

Some programs are temporarily returning to superuser UID in cleanup
routines, e.g., in order to unlink specific files. Very often, by entering
the handler at given moment, is possible to perform all the cleanup file
access  operations with superuser privileges.

Here's an example of such coding, that can be found mainly in
interactive setuid software:

--- vuln2.c ---
#include <signal.h>
#include <string.h>
#include <stdlib.h>

void sh(int dummy) {
 printf("Running with uid=%d euid=%d\n",getuid(),geteuid());
}

int main(int argc,char* argv[]) {
 seteuid(getuid());
 setreuid(0,getuid());
 signal(SIGTERM,sh);
 sleep(5);

 // this is a temporarily privileged code:
 seteuid(0);
 unlink("tmpfile");
 sleep(5);
 seteuid(getuid());

 exit(0);
}
---- EOF ----

# gcc vuln.c -o vuln; chmod 4755 vuln
# su user
$ ./vuln & sleep 3; killall -TERM vuln; sleep 3; killall -TERM vuln
Running with uid=500 euid=500
Running with uid=500 euid=0

Such a coding practice can be found, par example, in 'screen' utility
developed by Oliver Laumann. One of the most obvious locations is CoreDump
handler [screen.c]:

static sigret_t
CoreDump SIGDEFARG
{
 /.../
 setgid(getgid());
 setuid(getuid());
 unlink("core");
 /.../

SIGSEGV can be delivered in the middle of user-initiated screen detach
routine, for example. To better understand what and why is going on,
here's an strace output for detach (Ctrl+A, D) command:

23534 geteuid()                         = 0
23534 geteuid()                         = 0
23534 getuid()                          = 500
23534 setreuid(0, 500)                  = 0    *** HERE IT HAPPENS ***
23534 getegid()                         = 500  
23534 chmod("/home/lcamtuf/.screen/23534.tty5.nimue", 0600) = 0
23534 utime("/home/lcamtuf/.screen/23534.tty5.nimue", NULL) = 0
23534 geteuid()                         = 500
23534 getuid()                          = 0  

Marked line sets uid to zero. If SIGSEGV is delivered somewhere near this
point, CoreDump() handler would run with superuser privileges, due to
initial setuid(getuid()).


3) Remote exploitation of signal delivery (WU-FTPD case)
--------------------------------------------------------

This is a very interesting issue, directly related to re-entering libc
functions and/or interrupting non-atomic code. Many complex daemons,
like ftp, some http/proxy services, MTAs, etc., have SIGURG handlers declared -
very often these handlers are pretty verbose, calling syslog(), or freeing
some resources allocated for specific connection. The trick is that SIGURG,
obviously, can be delivered over the network, using TCP/IP OOB message.
Thus, it is possible to perform attacks using network layer without
any priviledges.

Below is a SIGURG handler routine, which, with small modifications,
is shared both by BSD ftpd and WU-FTPD daemons:

static VOIDRET myoob FUNCTION((input), int input)
{
 /.../
 if (getline(cp, 7, stdin) == NULL) {
   reply(221, "You could at least say goodbye.");
   dologout(0);
 }
 /.../
}

As you can see in certain conditions, dologout() function is called.
This routine looks this way:

dologout(int status)
{
   /.../
   if (logged_in) {
       delay_signaling(); /* we can't allow any signals while euid==0: kinch */
       (void) seteuid((uid_t) 0);
       wu_logwtmp(ttyline, "", "");
   }
   if (logging)
       syslog(LOG_INFO, "FTP session closed");
   /.../
}

As you can see, the authors took an additional precaution not to allow
signal delivery in the "logged_in" case. Unfortunately, syslog() is
a perfect example of a libc function that should NOT be called during
signal handling, regardless of whether "logged_in" or any other
special condition happens to be in effect.

As mentioned before, heap management functions such as malloc() are
called within syslog(), and these functions are not atomic. The OOB
message might arrive when the heap is in virtually any possible state.
Playing with uids / privileges / internal state is an option, as well.


4) Practical considerations: timing
-----------------------------------

In most cases this is a non-issue for local attacks, as the attacker
might control the execution environment (e.g., the load average, the
number of local files that the daemon needs to access, etc.) and try
a virtually infinite number of times by invoking the same program over
and over again, increasing the possibility of delivering signal at
given point. For remote attacks, this is a major issue, but as long
as the attack itself won't cause service to stop responding, thousands of
attempts might be performed.


5) Solving signal race problems
-------------------------------

This is a very complex and difficult task. There are at least three aspects
of this:

* Using reentrant-safe libcalls in signal handlers only. This would
  require major rewrites of numerous programs. Another half-solution is
  to implement a wrapper around every insecure libcall used, having
  special global flag checked to avoid re-entry,

* Blocking signal delivery during all non-atomic operations and/or
  constructing signal handlers in the way that would not rely on
  internal program state (e.g. unconditional setting of specific flag
  and nothing else),

* Blocking signal delivery in signal handlers.



                                                       Michal Zalewski
                                          <lcamtuf@razor.bindview.com>
                                                       16-17 May, 2001

Découvrez l'affaire Amesys et la loi Renseignement en BD - Pop culture - Numerama

dimanche 25 octobre 2015 à 18:28
OpenNews
«Grandes oreilles et bras cassés
Une enquête sous forme de récit de Jean-Marc Manach. Dessin et couleur de Nicoby»
http://www.futuropolis.fr/fiche_titre.php?id_article=790501
(Permalink)

Un artiste remplace une statue de Lénine par Dark Vador - Pop culture - Numerama

dimanche 25 octobre 2015 à 18:20
OpenNews
^_^
(Permalink)

Comment éviter de donner son numéro de téléphone pour recevoir un SMS - Tech - Numerama

dimanche 25 octobre 2015 à 18:15
Oros links
Je ne sais pas ce que ça vaut vraiment.
http://www.receive-sms-online.info/
http://www.receive-sms-now.com/
http://receivefreesms.net/
(Permalink) (Profil)

Note: bugs Qnap partage de fichiers

dimanche 25 octobre 2015 à 17:50
Strak.ch | Actu et liens en vrac
Une note à propos des partages de documents sur Qnap:

1) Quand on upload des documents avec IE, la barre de progression arrive bien jusqu'à 100% mais le fichier n'est pas déposé. Avec Firefox ou Chrome pas de souci.
2) La tentative de téléchargement d'un dossier comportant des accents ("é", pas essayé les autres), se termine par une "erreur inconnue" sans autre explication. Pas pratique à débugger, donc bon à savoir.
(Permalink)

Animated Gameboy in CSS

dimanche 25 octobre 2015 à 17:28
le hollandais volant
 I love this.
— (permalink)

WP Security Audit Log

dimanche 25 octobre 2015 à 17:02
Strak.ch | Actu et liens en vrac
"Keep an audit log of all changes and under the hood WordPress activity to ensure productivity and thwart possible WordPress hacker attacks."
via korben.info
(Permalink)

Thalassa_Au-coeur-des-grandes-routes-maritimes_20151015.webm

dimanche 25 octobre 2015 à 16:40
@jeekajoo links
Le rôle de notre armée c'était aussi (surtout) de défendre les intérêts de nos multinationales à l'étranger, pour qu'elles puissent continuer de piller les ressources tranquillement, notamment en Afrique. En l'occurence à partir 1:05:00, ils parlent des pirates et de la protection des cargaisons de pétrole en provenance des plateformes de forage de Total, dans le Golf de Guinée.

Qui sont les vrais méchants?
(Permalink) (Profil)