Security Basics mailing list archives

Re: Access a PC behind NAT


From: "Shreyas Zare" <shreyas () technitium com>
Date: Mon, 30 Jun 2008 21:21:26 +0530

Hi,

Well its possible to bypass NAT using Simple Traversal of UDP through
NAT (STUN) protocol or similar technique. But there is downside, the
sender and receiver must know each others IP address and ports to
work. It can also bypass Windows XP built in firewall (I have tested
it). Just Google to find more or read rfc3489.

Regards,

On Mon, Jun 30, 2008 at 6:17 PM, Ahmed Khalid <warevulf () gmail com> wrote:

Hi,

I am trying to make a desktop sharing application (like teamviewer) in
.NET framework 2.0, i was wondering if this is possible to connect a
pc behind NAT without port forwarding? The other option i can think of
is creating a tunnel between two pcs but i am unable to make a vpn
connection through command line i found a vbscript though which does
the work but thats not the best way of doing it, the created
connection could be dialed using rasdial command.

Is there any other way of connecting a pc behind NAT?

P.S. There are WCF(Windows Communication Foundation) and WDS (Windows
Desktop Sharing) for framework 3.5 but i am looking for a solution in
2.0.

Regards,

Ahmed Khalid


VB Script
--------------

Dim objShell, sName, sHost
Set objShell = WScript.CreateObject("WScript.Shell")


sName = "COMPANY NAME"
sHost = "IP ADDRESS OR HOST NAME"


With objShell
       .Run "Control ncpa.cpl"
       wscript.sleep 2000
       .AppActivate "Network Connections"
       wscript.sleep 1000
       .SendKeys "%FN"
       wscript.sleep 1000
       .SendKeys "%N"
       wscript.sleep 1000
       .SendKeys "%ON"
       wscript.sleep 1000
       .SendKeys "%VN"
       wscript.sleep 1000
       .SendKeys "%A" & sName & "%N"
       wscript.sleep 1000
       .SendKeys "%DN"
       wscript.sleep 1000
       .SendKeys "%H" & sHost & "%N"
       wscript.sleep 1000
       .SendKeys "%AN"
       wscript.sleep 1000
       .SendKeys "%S"
       wscript.sleep 1000
       .SendKeys "{TAB}{TAB}~"
       wscript.sleep 1000
       .SendKeys "{ESC}"
       ' .AppActivate "Connect " + sName
       ' .SendKeys "%{F4}"
End With



--
("There are only 10 kinds of people in this world: those who know
binary and those who don't.")

Shreyas Zare
Co-Founder, Technitium
eMail: shreyas () technitium com

..::< The Technitium Team >::..
Visit us at www.technitium.com
Contact us at theteam () technitium com

Technitium Personal Computers
We believe in quality.
Visit http://pc.technitium.com for details.


Current thread: