# Nmap 7.91 scan initiated Sun May 16 10:02:25 2021 as: nmap -p22,80,9090 -sC -sV -oA nmap/detailed 10.129.107.110Nmapscanreportfor10.129.107.110Hostisup (0.11s latency).PORTSTATESERVICEVERSION22/tcpopensshOpenSSH8.0 (protocol 2.0)|ssh-hostkey:|30726f:c3:40:8f:69:50:69:5a:57:d7:9c:4e:7b:1b:94:96 (RSA)|256c2:6f:f8:ab:a1:20:83:d1:60:ab:cf:63:2d:c8:65:b7 (ECDSA)|_2566b:65:6c:a6:92:e5:cc:76:17:5a:2f:9a:e7:50:c3:50 (ED25519)80/tcpopenhttpnginx1.14.1|_http-server-header:nginx/1.14.1|_http-title:TestPagefortheNginxHTTPServeronRedHatEnterpriseLinux9090/tcpopenssl/zeus-admin?|fingerprint-strings:|GetRequest,HTTPOptions:|HTTP/1.1400Badrequest|Content-Type:text/html; charset=utf8|Transfer-Encoding:chunked|X-DNS-Prefetch-Control:off|Referrer-Policy:no-referrer|X-Content-Type-Options:nosniff|Cross-Origin-Resource-Policy:same-origin|<!DOCTYPEhtml>|<html>|<head>|<title>|request|</title>|<metahttp-equiv="Content-Type"content="text/html; charset=utf-8">|<metaname="viewport"content="width=device-width, initial-scale=1.0">|<style>|body{|margin:0;|font-family:"RedHatDisplay","Open Sans",Helvetica,Arial,sans-serif;|font-size:12px;|line-height:1.66666667;|color:#333333;|background-color:#f5f5f5;|border:0;|vertical-align:middle;|font-weight:300;|_margin:0010p|ssl-cert:Subject:commonName=dms-pit.htb/organizationName=4cd9329523184b0ea52ba0d20a1a6f92/countryName=US|SubjectAlternativeName:DNS:dms-pit.htb,DNS:localhost,IPAddress:127.0.0.1|Notvalidbefore:2020-04-16T23:29:12|_Notvalidafter:2030-06-04T16:09:12|_ssl-date:TLSrandomnessdoesnotrepresenttime1 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> :
SF-Port9090-TCP:V=7.91%T=SSL%I=7%D=5/16%Time=60A12635%P=x86_64-pc-linux-gn...[snip]...Servicedetectionperformed.Pleasereportanyincorrectresultsat<https://nmap.org/submit/>.# Nmap done at Sun May 16 10:05:44 2021 -- 1 IP address (1 host up) scanned in 199.21 seconds
Here the ssl-cert field tells that domain name is dms-pit.htb
dms-pit.htb is served on port 80 and 9090 but here returns 403 Forbidden
SNMP
With public community string dumping a lot information was possible including nsExtendObjects that leaked user michelle and SELinux Roles as well as system version CentOs Linux release 8.3.2011
snmpwalk-v2c-cpublic10.10.10.2411# 1 at the end is to query all the records...[snip]...UCD-SNMP-MIB::prCount.1=INTEGER:3UCD-SNMP-MIB::prErrorFlag.1=INTEGER:noError(0)UCD-SNMP-MIB::prErrFix.1=INTEGER:noError(0)UCD-SNMP-MIB::prErrFixCmd.1=STRING:UCD-SNMP-MIB::dskIndex.1=INTEGER:1UCD-SNMP-MIB::dskIndex.2=INTEGER:2UCD-SNMP-MIB::dskPath.1=STRING:/UCD-SNMP-MIB::dskPath.2=STRING:/var/www/html/seeddms51x/seeddmsUCD-SNMP-MIB::dskDevice.1=STRING:/dev/mapper/cl-rootUCD-SNMP-MIB::dskDevice.2=STRING:/dev/mapper/cl-seeddmsUCD-SNMP-MIB::dskMinimum.1=INTEGER:10000UCD-SNMP-MIB::dskMinimum.2=INTEGER:100000UCD-SNMP-MIB::dskMinPercent.1=INTEGER:-1UCD-SNMP-MIB::dskMinPercent.2=INTEGER:-1UCD-SNMP-MIB::dskTotal.1=INTEGER:2611200UCD-SNMP-MIB::dskTotal.2=INTEGER:125600UCD-SNMP-MIB::dskAvail.1=INTEGER:350764UCD-SNMP-MIB::dskAvail.2=INTEGER:75496...[snip]...
Command returned interesting string /var/www/htmlseeddms51x/seeddms as this could indicate another web application running on the server.
SeedDMS
On port 80 SeedDMS was accessible on dms-pit.htb/seeddms51x/seeddms
SeedDMS
Login page
The obtained user michelle was using her name as a password that allowed to login to SeedDMS
Version
Upgrade note from administrator says that version was upgraded to 5.1.15
Users
Insider Docs/Users directory was listed one additional user Jack
Code Execution
User can add any file to the server and access it by going to the /seeddms51x/data/1048576/31/1.php url where data, 1048576 and 1.php are hardcoded values and 31 is DocumentID and this can be obtained from the URL