AuthBy

ftp

  • Nom machine : AuthBy

  • Difficulté : Intermédiaire

  • OS : Windows

Enumération

NMAP

Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-06 03:40 EDT
Nmap scan report for 192.168.212.46
Host is up (0.035s latency).
Not shown: 65531 filtered tcp ports (no-response)
PORT     STATE SERVICE            VERSION
21/tcp   open  ftp                zFTPServer 6.0 build 2011-10-17
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| total 9680
| ----------   1 root     root      5610496 Oct 18  2011 zFTPServer.exe
| ----------   1 root     root           25 Feb 10  2011 UninstallService.bat
| ----------   1 root     root      4284928 Oct 18  2011 Uninstall.exe
| ----------   1 root     root           17 Aug 13  2011 StopService.bat
| ----------   1 root     root           18 Aug 13  2011 StartService.bat
| ----------   1 root     root         8736 Nov 09  2011 Settings.ini
| dr-xr-xr-x   1 root     root          512 Aug 06 14:40 log
| ----------   1 root     root         2275 Aug 08  2011 LICENSE.htm
| ----------   1 root     root           23 Feb 10  2011 InstallService.bat
| dr-xr-xr-x   1 root     root          512 Nov 08  2011 extensions
| dr-xr-xr-x   1 root     root          512 Nov 08  2011 certificates
|_dr-xr-xr-x   1 root     root          512 Apr 12 01:39 accounts
242/tcp  open  http               Apache httpd 2.2.21 ((Win32) PHP/5.3.8)
|_http-title: 401 Authorization Required
| http-auth: 
| HTTP/1.1 401 Authorization Required\x0D
|_  Basic realm=Qui e nuce nuculeum esse volt, frangit nucem!
|_http-server-header: Apache/2.2.21 (Win32) PHP/5.3.8
3145/tcp open  zftp-admin         zFTPServer admin
3389/tcp open  ssl/ms-wbt-server?
| rdp-ntlm-info: 
|   Target_Name: LIVDA
|   NetBIOS_Domain_Name: LIVDA
|   NetBIOS_Computer_Name: LIVDA
|   DNS_Domain_Name: LIVDA
|   DNS_Computer_Name: LIVDA
|   Product_Version: 6.0.6001
|_  System_Time: 2024-08-06T07:43:16+00:00
|_ssl-date: 2024-08-06T07:43:21+00:00; +1s from scanner time.
| ssl-cert: Subject: commonName=LIVDA
| Not valid before: 2024-04-10T18:40:02
|_Not valid after:  2024-10-10T18:40:02
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

FTP (21) : zFTPServer 6.0 build 2011-10-17

Comme montré sur le scan nmap, nous pouvons nous connecter en FTP de manière anonyme. Cependant, nous n'obtenons rien d'intéressant, nous ne pouvont pas télécharger les fichier. Nous apprenons néanmoins en listant le directoire accounts qu'il y a 3 utilisateurs :

  • Offsec

  • Anonymous

  • Admin

Nous allons tenter différent mot de pase pour l'utilisateur et admin:admin fonctionne.

offsec:elite

zFTP-admin (3145) : zFTPServer admin

Impossible de s'y connecter pour le moment.

HTTP (242)

Entrer les identifiants précédemment trouvés pour avoir accès à la page.

Local exploitation

Maintenant que nous avons accès à la page web et pouvant nous connecter via admin en ftp, nous allons pouvoir uploader un reverse-shell sur le serveur.

Nous allons utiliser le reverse-shell PowerShell base64 de :

https://www.revshells.com/

Nous lançons un listeneur avant d'exécuter le code.

Il ne fonctionne pas !

Sans résultat, nous allons cette fois essayer le reverse shell php de Ivan Sincek : il fonctionne !

Escalade de privilège

SeImpersonatePrivilege

X86-based PC

Nous allons également télécharger nc32.exe sur la cible.

Mis à jour