Service Scanning

Perform an Nmap scan of the target. What does Nmap display as the version of the service running on port 8080?

$ nmap -sC -sV -p- 10.129.42.254             

Starting Nmap 7.93 ( https://nmap.org ) at 2025-06-14 00:55 CEST
Nmap scan report for 10.129.42.254
Host is up (0.037s latency).
Not shown: 65528 closed tcp ports (reset)
PORT     STATE SERVICE     VERSION
21/tcp   open  ftp         vsftpd 3.0.3
22/tcp   open  ssh         OpenSSH 8.2p1 Ubuntu 4ubuntu0.1 (Ubuntu Linux; protocol 2.0)
80/tcp   open  http        Apache httpd 2.4.41 ((Ubuntu))
139/tcp  open  netbios-ssn Samba smbd 4.6.2
445/tcp  open  netbios-ssn Samba smbd 4.6.2
2323/tcp open  telnet      Linux telnetd
8080/tcp open  http        Apache Tomcat

La version du service présent sur le port 8080 de la cible est :

Apache Tomcat

Perform an Nmap scan of the target and identify the non-default port that the telnet service is running on.

2323/tcp open  telnet      Linux telnetd

Le port sur lequel telnet est configuré sur la cible est le port :

2323

List the SMB shares available on the target host. Connect to the available share as the bob user. Once connected, access the folder called 'flag' and submit the contents of the flag.txt file.

Afin de réaliser cette question, je me réfère aux informations concernant l'utilisateur "bob" donné dans le cours (bob:Welcome1).

Nous nous connectons au serveur SMB via les identifiants de bob :

$ smbclient -U bob \\\\10.129.42.254\\users
Password for [WORKGROUP\bob]:
Try "help" to get a list of possible commands.
smb: \> ls
  .                                   D        0  Fri Feb 26 00:06:52 2021
  ..                                  D        0  Thu Feb 25 21:05:31 2021
  flag                                D        0  Fri Feb 26 00:09:26 2021
  bob                                 D        0  Thu Feb 25 22:42:23 2021

		4062912 blocks of size 1024. 1276228 blocks available

La connexion étant effective, nous pouvons extraire le fichier flag.txt :

smb: \> cd flag\
smb: \flag\> ls
  .                                   D        0  Fri Feb 26 00:09:26 2021
  ..                                  D        0  Fri Feb 26 00:06:52 2021
  flag.txt                            N       33  Fri Feb 26 00:09:26 2021

		4062912 blocks of size 1024. 1276228 blocks available
smb: \flag\> get flag.txt 
getting file \flag\flag.txt of size 33 as flag.txt (0.3 KiloBytes/sec) (average 0.3 KiloBytes/sec)

Une fois le fichier flag.txt extrait, nous vérifions sa présence et lisons son contenu :

$ ls
flag.txt

$ cat flag.txt 
dceece590f3284c3866305eb2473d099

Le flag est donc :

dceece590f3284c3866305eb2473d099

Mis à jour