PROJET AUTOBLOG


Le Blog de Genma

source: Le Blog de Genma

⇐ retour index

Wifi ouvert sur une imprimante

jeudi 1 janvier 1970 à 01:00

Wifi HP-Print-C8-Officejet Pro

Pendant mes vacances, j'étais sur mon ordinateur, je regardais les réseaux wifi du voisinage quand j'ai vu un réseau wifi "HP-Print-C8-Officejet Pro" ouvert. Le nom, assez explicite, indique le réseau mis à disposition par une imprimante professionnelle.

Une rapide recherche dans un moteur de recherche confirme que l'imprimante met à disposition un Wifi qui lui est propre, pour permettre à différents appareils (smartphone ou autre) d'imprimer directement sur l'imprimante en mode sans-fil, sans avoir à passer par un ordinateur.

Connexion à ce wifi

Je me suis donc connecté à ce wifi, mon PC s'est vu attribuer automatiquement une adresse IP. Pour analyser un peu le réseau, j'ai fait un simple "nmap" (via ZenMap, une interface graphique au logiciel nmap).

Le résultat a été le suivant :

Initiating SYN Stealth Scan at 21:06
Scanning 192.168.223.1 [1000 ports]
Discovered open port 445/tcp on 192.168.223.1
Discovered open port 443/tcp on 192.168.223.1
Discovered open port 80/tcp on 192.168.223.1
Increasing send delay for 192.168.223.1 from 0 to 5 due to 14 out of 34 dropped probes since last increase.
Discovered open port 8080/tcp on 192.168.223.1
Discovered open port 139/tcp on 192.168.223.1
Increasing send delay for 192.168.223.1 from 5 to 10 due to 42 out of 104 dropped probes since last increase.
Discovered open port 631/tcp on 192.168.223.1
Discovered open port 7435/tcp on 192.168.223.1
Discovered open port 6839/tcp on 192.168.223.1
Discovered open port 9111/tcp on 192.168.223.1
Discovered open port 9110/tcp on 192.168.223.1
Discovered open port 515/tcp on 192.168.223.1
Discovered open port 9220/tcp on 192.168.223.1
Discovered open port 9100/tcp on 192.168.223.1
Discovered open port 9290/tcp on 192.168.223.1
Discovered open port 9101/tcp on 192.168.223.1
Discovered open port 9102/tcp on 192.168.223.1
Completed SYN Stealth Scan at 21:06, 22.61s elapsed (1000 total ports)
Initiating Service scan at 21:06
Scanning 13 services on 192.168.223.1
Completed Service scan at 21:08, 135.26s elapsed (16 services on 1 host)
Initiating OS detection (try #1) against 192.168.223.1
NSE: Script scanning 192.168.223.1.
Initiating NSE at 21:08
Completed NSE at 21:10, 78.34s elapsed
Nmap scan report for 192.168.223.1
Host is up (0.0047s latency).
Not shown: 984 closed ports
PORT STATE SERVICE VERSION
80/tcp open http HP Officejet Pro 8600 printer http config (Serial CN388XXXXXXX)
|_http-favicon: Unknown favicon MD5: A14D3BAA6A6746D1A77AFB1E1DC82F0F
|_http-methods: GET
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
139/tcp open tcpwrapped
443/tcp open ssl/http HP Officejet Pro 8600 printer http config (Serial CN388XXXXXXX)
|_http-favicon: Unknown favicon MD5: A14D3BAA6A6746D1A77AFB1E1DC82F0F
|_http-methods: GET
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
| ssl-cert: Subject: commonName=HPalpbat/organizationName=HP/stateOrProvinceName=Washington/countryName=US
| Issuer: commonName=HPalpbat/organizationName=HP/stateOrProvinceName=Washington/countryName=US
| Public Key type: rsa
| Public Key bits: 1024
| Not valid before: 2013-01-25T14:33:38+00:00
| Not valid after: 2033-01-20T14:33:38+00:00
| MD5: 20b0 f6cb def4 09ae c132 0f41 fb5e 147d
|_SHA-1: c15c eecd dbc0 51c6 92f4 8caa e7ea 4b9d b0ae b1dd
|_ssl-date: 2015-08-28T20:10:14+00:00; +1h01m26s from local time.
445/tcp open netbios-ssn
515/tcp open printer
631/tcp open http HP Officejet Pro 8600 printer http config (Serial CN388XXXXXXX)
|_http-methods: No Allow or Public header in OPTIONS response (status code 404)
|_http-title: Site doesn't have a title.
6839/tcp open tcpwrapped
7435/tcp open tcpwrapped
8080/tcp open http HP Officejet Pro 8600 printer http config (Serial CN388XXXXXXX)
|_http-favicon: Unknown favicon MD5: A14D3BAA6A6746D1A77AFB1E1DC82F0F
|_http-methods: GET
|_http-title: Site doesn't have a title (text/html; charset=UTF-8).
9100/tcp open jetdirect?
9101/tcp open jetdirect?
9102/tcp open jetdirect?
9110/tcp open unknown
9111/tcp open DragonIDSConsole?
9220/tcp open hp-gsg HP Generic Scan Gateway 1.0
9290/tcp open hp-gsg IEEE 1284.4 scan peripheral gateway
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at http://www.insecure.org/cgi-bin/servicefp-submit.cgi :
SF-Port9110-TCP:V=6.47%I=7%D=8/28%Time=55E0B159%P=x86_64-pc-linux-gnu%r(RP
SF:CCheck,2B,"\0\0\(r\xfe\x1d\x13\0\0\0\0\0\0\0\x02\0\x01\x86\xa0\0\x01\x9
SF:7\|\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0")%r(kumo-server,1,"\0");
MAC Address: 2C:44:FD:F7:3F:59 (Hewlett Packard)
Device type: printer|VoIP adapter
Running: HP VxWorks, Vocality embedded
OS CPE: cpe:/o:hp:vxworks
OS details: VxWorks: HP printer or Vocality BASICS Four Wire VoIP gateway
Uptime guess: 5.951 days (since Sat Aug 22 22:20:00 2015)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=129 (Good luck!)
IP ID Sequence Generation: Random positive increments
Service Info: Device: printer; CPE: cpe:/h:hp:officejet_pro_8600

TRACEROUTE
HOP RTT ADDRESS
1 4.73 ms 192.168.223.1

Initiating SYN Stealth Scan at 21:10
Scanning 192.168.223.100 [1000 ports]
Completed SYN Stealth Scan at 21:10, 1.68s elapsed (1000 total ports)
Initiating Service scan at 21:10
Initiating OS detection (try #1) against 192.168.223.100
adjust_timeouts2: packet supposedly had rtt of -125591 microseconds. Ignoring time.
adjust_timeouts2: packet supposedly had rtt of -125591 microseconds. Ignoring time.
Retrying OS detection (try #2) against 192.168.223.100
WARNING: OS didn't match until try #2
NSE: Script scanning 192.168.223.100.
Initiating NSE at 21:10
Completed NSE at 21:10, 0.00s elapsed
Nmap scan report for 192.168.223.100
Host is up (0.0000070s latency).
All 1000 scanned ports on 192.168.223.100 are closed
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: webcam|general purpose|phone|storage-misc
Running: AXIS Linux 2.6.X, Linux 2.6.X, ZyXEL embedded
OS CPE: cpe:/h:axis:210a_network_camera cpe:/h:axis:211_network_camera cpe:/o:axis:linux_kernel:2.6 cpe:/o:linux:linux_kernel:2.6 cpe:/o:google:android:2.2 cpe:/h:zyxel:nsa-210
OS details: AXIS 210A or 211 Network Camera (Linux 2.6.17), Linux 2.6.14 - 2.6.34, Linux 2.6.17, Linux 2.6.17 (Mandriva), Android 2.2 (Linux 2.6), ZyXEL NSA-210 NAS device
Network Distance: 0 hops

NSE: Script Post-scanning.
Read data files from: /usr/bin/../share/nmap
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 256 IP addresses (2 hosts up) scanned in 271.35 seconds
Raw packets sent: 4047 (174.866KB) | Rcvd: 3986 (170.603KB)

Je n'ai pas encore analysé en détail toutes les informations retournées, j'ai vu de suite que les port 80 et 443 était ouvert…

Entrée via le port 80

En lançant un navigateur avec l'adresse https://192.168.223.1:80/, je suis tombé sur l'interface complète de l'administration de l'imprimante. J'ai pu voir le niveau des cartouches d'encre, l'historique du nombre de pages imprimées... Il y avait la possibilité de lancer une impression et j'ai bien pensé à lancer l'impression d'une page qui contiendrai Je suis ton imprimante, j'ai faim. Nourris moi en encre ou j'imprimerai ton historique Internet quand ta femme sera là mais je n'ai pas osé.

Il y avait un certain nombre d'informations dont le résau wifi auquel elle était reliée par ailleurs. J'ai ainsi pu savoir à quel voisin elle appartenait.

Visite au voisin

Je suis donc allé voir mon voisin pour lui expliquer que son imprimante était en libre accès via le Wifi que cette dernière mettait à disposition et qu'il serait bien qu'il mette un code ou un mot de passe sur ce wifi. Je lui ai fait part des informations que j'avais pu voir (et comment j'avais su que c'était son imprimante), du fait que j'avais pensé à lui faire une blague. Réaction : On peut faire ça ? Je te remercie, je vais mettre un code. En fin de journée, le wifi de l'imprimante était protégé par un code.

Conclusion

Le peu que j'ai pu voir/chercher à voir de l'interface d'administration de l'imprimante m'ont confirmé ce que le scan nmap donne : l'imprimante est un vértiable ordinateur. Elle a un serveur web complet (et un noyau linux), elle met à disposition tout un tas de protocle de partage réseau (pour Apple), pour une reconnaissance automatique par des smartphones, un fax, un scanner... Beaucoup trop de fonctionnalités, beaucoup trop de logiciels.

Ma grande question est : qu'en est-il de la sécurité de tout ça ? Tous ces ports ouverts, ces logiciels qui ne seront pas mis à jour... Je n'ai consulté que brièvement l'interface d'administration et je suis allé voir mon voisin. Mais si je ne l'avais pas fait, quelles informations aurai-je pu voir ? Ses scans ou fax reçus ou envoyés ? Ses documents imprimés ? L'imprimante étant reliée au wifi de sa box ADSL et donc à son réseau Interne, ne serait-il pas possible de passer par l'imprimante pour récupérer la clef WPA du wifi pour ensuite être sur le dit réseau ?

Par curiosité et si j'ai un peu de temps, j'étudierai en détail les protocles que cette imprimante utilise, pour conseiller à mon voisin ceux qui sont actifs par défaut et qu'il devrait désactiver. Si je prends le temps de faire ça, je pense que je ferai un nouveau billet dans ce cas.

Enfin, dans ce genre de situation, comment auriez vous réagi ? Mode hacker : j'explore et je suis curieux ? Mode cracker : je ne dis rien et j'espionne (sachant que là c'est clairement hors la loi, répréhensible par la loi).