Stapler

enumération cron

  • Nom machine : Stapler

  • Difficulté : Intermédiaire

  • OS : Linux

Enumération

NMAP

Nmap scan report for 192.168.185.148
Host is up (0.034s latency).
Not shown: 65523 filtered tcp ports (no-response)
PORT      STATE  SERVICE     VERSION
20/tcp    closed ftp-data
21/tcp    open   ftp         vsftpd 2.0.8 or later
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
|_Can't get directory listing: PASV failed: 550 Permission denied.
| ftp-syst: 
|   STAT: 
| FTP server status:
|      Connected to 192.168.45.239
|      Logged in as ftp
|      TYPE: ASCII
|      No session bandwidth limit
|      Session timeout in seconds is 300
|      Control connection is plain text
|      Data connections will be plain text
|      At session startup, client count was 5
|      vsFTPd 3.0.3 - secure, fast, stable
|_End of status
22/tcp    open   ssh         OpenSSH 7.2p2 Ubuntu 4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 81:21:ce:a1:1a:05:b1:69:4f:4d:ed:80:28:e8:99:05 (RSA)
|   256 5b:a5:bb:67:91:1a:51:c2:d3:21:da:c0:ca:f0:db:9e (ECDSA)
|_  256 6d:01:b7:73:ac:b0:93:6f:fa:b9:89:e6:ae:3c:ab:d3 (ED25519)
53/tcp    open   tcpwrapped
80/tcp    open   http        PHP cli server 5.5 or later
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-title: 404 Not Found
123/tcp   closed ntp
137/tcp   closed netbios-ns
138/tcp   closed netbios-dgm
139/tcp   open   netbios-ssn Samba smbd 4.3.9-Ubuntu (workgroup: WORKGROUP)
666/tcp   open   doom?
| fingerprint-strings: 
|   NULL: 
|     message2.jpgUT 
|     QWux
|     "DL[E
|     #;3[
|     \xf6
|     u([r
|     qYQq
|     Y_?n2
|     3&M~{
|     9-a)T
|     L}AJ
|_    .npy.9
3306/tcp  open   mysql       MySQL 5.7.12-0ubuntu1
| mysql-info: 
|   Protocol: 10
|   Version: 5.7.12-0ubuntu1
|   Thread ID: 9
|   Capabilities flags: 63487
|   Some Capabilities: SupportsCompression, Speaks41ProtocolNew, LongPassword, ODBCClient, LongColumnFlag, InteractiveClient, Support41Auth, SupportsLoadDataLocal, FoundRows, IgnoreSpaceBeforeParenthesis, ConnectWithDatabase, IgnoreSigpipes, SupportsTransactions, Speaks41ProtocolOld, DontAllowDatabaseTableColumn, SupportsMultipleStatments, SupportsMultipleResults, SupportsAuthPlugins
|   Status: Autocommit
|   Salt: t\x13IId2G]\x0C^Dx\x15E]!\x7F<\x0C	
|_  Auth Plugin Name: mysql_native_password
12380/tcp open   http        Apache httpd 2.4.18 ((Ubuntu))
|_http-title: Site doesn't have a title (text/html).
| http-methods: 
|_  Supported Methods: GET HEAD POST OPTIONS
|_http-server-header: Apache/2.4.18 (Ubuntu)
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service 

FTP (21)

Nous avons un utilisateur : harry

Port 666

Un autre user : scott !

HTTP (12380)

Troisième user : tim

SMB

Fred et Kathy...

Rien d'intéressant

Nous avons une nouvelle liste d'user

Accès initial

Nous n'avons pas d'autres informations, nous allons donc essayer de voir si des noms d'utilisateurs servent également de mots de passe pour certaines machines.

On essaye également en ssh...

Elévation des privilèges

Nous tombons sur le site wordpress. Nous avons cette fois le fichier wp-config.php avec des infomrations intéressantes !

Nous allons nous connecter avec ces informations.

Nous pouvons essayer de les cracker.

L'exécution de linpeas.sh nous a égalemetn revelé des informatons intéressantes :

On se connecte en tant que peter.

Nous sommes root !

Nous pouvions également effectuer ceci avec cette sortie linpeas :

Après un moment ...

Mis à jour