Why is remote SmartCard not found when using RDP - vb6

I'm using Windows Server 2008 R2 which runs a VB6.0 application that uses a smartcard locally.
I then connect to this machine remotely using Remote Desktop Connection (6.3). However now the application shows the following error (SmartCard):
0x8010001d The Smart card resource manager is not running.
Research so far:
I don't want to use redirection as the card is on the remote machine already.
Using RDP the way I am trying to use it for is wrong and tightVNC is more appropriate (This does fix the issue)
Unsure - SCardEstablishContext API is returning that error because it gets an Access Denied error when trying to open an event called "Global\Microsoft Smart Card Resource Manager Started" with OpenEvent API. The default security for that event on Vista and Windows 7 specifies that only SYSTEM, LOCAL SERVICE and INTERACTIVE users have access to it. NETWORK SERVICE or non-interactive users won’t be able to access the event.
Why is the SmartCard not being recognised?
Any Information would be appreciated.
NOTE: The smartcard works fine when the application is on Windows Server 2008 R2 - however only fails when connecting remotely.

It is not possible, you can't use the locally plugged smartcard of the server you RDP into, as your session is redirected to the client then only the clients smartcard is accessible in the rdp session.
Microsoft made it like this for security reasons.
But there is a turn around, like sharing the device (smartcard reader, Usb token, Usb devices ) using software or hardware :
softawre examples (i only found paid solutions), see link
or hardware using a Device server but it doesn't work through WAN only LAN.

Use VNC instead of RDP
TLDR: Use VNC as a Windows Service
If you insist on using RPD, then you'll have to patch your RDP DLLs. If you don't want to do this, then instead use ANY OTHER PROTOCOL other than RDP. If it's a vmware VM, then just use the vcenter console. If it's an Azure VM where you don't GET a console, then just install VNC-server-softer on the server that has the Smart Cards and then access from somewhere else via VNC-client. "TightVNC" (https://community.chocolatey.org/packages/tightvnc) worked nicely for me.
There are two ways to run TightVNC server:
TightVNC Server (Service Mode) -- Connecting with VNC-client will take you to the Windows logon screen.
TightVNC Server (Application Mode)
You will need to run TightVNC as a Windows Service. Then you will start a NEW session. Otherwise you'll just be on top of the existing RDP session and still not see remote Smart Cards.
Long Version
If you RDP into a remote server, then that remote server's Smart Cards will be hidden. That behavior is baked into RDP and it is BY DESIGN.
You can optionally take your LOCAL Smart Cards along into the RDP session. (Via mstsc.exe's "Local Resources" tab and then checking "Smart cards".) But these are the Smart Cards connected LOCALLY to your laptop. And NOT the Smart Cards connected to the remote server.
So if you use RDP, then you have option to either see no Smart Cards at all (neither local, nor remote) or just see your LOCAL Smart Cards. To see the REMOTE Smart Cards is NOT possible via RDP.
This is by design inside RDP. And if you want to change it, then you have to manually patch some .DLL files. And somebody has actually done this. See this question here:
How to Access Remote USB Smartcard during RDP

Before you create your Remote Desktop session, click on "Show options". Under the "Local Resources" tab there is a "Local devices and resources" panel. Click the "More" button.
Click on "Smart Cards". No complete the remote desktop session.

Related

Using Server USB SmartCard reader

i'm running a Terminal Server (Windows Server 2012 R2)
And have a big problem accessing smart cards (in my setting German "Gesundheitskarten") on our Terminal Server in RDP Sessions. These cards are not used to provide login to a program, but to transmit data like Insurance Number, Street, Postal Code etc... to our Database.
The Problem is, that the Smart Card reader (https://www.identiv.com/products/smart-card-readers/contact-smart-card-readers/utrust-2700-r-contact-smart-card-reader) which is attached to the Server (via USB) is showing in the device manager but not accessible in an RDP Session. The manufacturers test programm says that the Smart Card Ressource Manager is NOT Running (which isn't true) which indicates the the device is not accessible.
When i logon directly on the server (without RDP) the reader works fine. (Logged in as Admin or User)
I would try to connect the reader to the client device, but there a numerous reasons against it. Just to name a few: We have all sorts of clients (Mac/Android/iOs/Windows) who need access to the reader when they are near our front desk. Mobile Devices and Macs do not support SmartCard redirection. Also the Application which reads the Cards is unknown to support the redirection setup.
(Just for clarification, i don't want to give our users direct physical access to the Server - they use the app via RDP or mainly via Remote Resources)
Is there any way to map/bind the USB Smart Card Reader to a user also in an RDP Session which is connected to the Server? Is there any group policy setting i forgot?
You have to crack WinSCard.dll and SCardSvr.dll.
Refer to this page: http://lifayk.blogspot.co.uk/2012/07/windows-smart-card-subsystem-and-remote.html
I had tested the method and it works on Windows 2012 R2 Standard and Dataceneter.

Configure Internet option from remote for windows 8

I want to configure internet option via remote for windows 8. For example, I some pcs have two accounts, say admin,user. All pc connected via LAN with a server. How do I disable and enable internet from centralized server for only those users who have logged in via 'user' account? I asked for windows 8 machines.
The best way would be some kind of Centralized authentication and authorization.
Like the Microsoft ActiveDirectory, or An OpenLDAP Server.
Next you would need a proxy server where every program/user has tho authenticate to open up a new Connection to the outside world.
Another approach could be some kind of captive portal on your router (pfsense does this pretty easy and fast) for authentication.
This could also be paired with a centralized user management oder just local users.
Local Users (on every machine) have the problem that none of the settings and properties, such as passwords, could be synchronized and have to be set by hand on every machine.

Can't rdp to Azure on Mac OS X

I am trying to Remote Desktop onto an Azure instance from Mac OS X, but can't find a tool that allows me to do it. Address and username is fine, but none of the clients seem to have the capabilities to include the instance information.
I have so far tried the Miscrosoft RDC and CoRD but to no avail.
Has anyone succeeded in using RDP to an Azure instance on a Mac?
By default, you can't connect to an Azure Windows server except through the Windows Remote Desktop client.
To connect from OS X, whether through CoRD or the Microsoft Remote Desktop client for Mac, you need to turn off network level authentication:
Connect to the Azure server using the Remote Desktop client on a Windows machine
Under Control Panel, go to System, then open 'Advanced system settings'
On the Remote tab, uncheck "Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)"
Re-connect from OS X
you need to create connect from microsoft remote desktop on mac
add ip, user, password
and you can connect now
if you still can't connect , check your azure endpoint setting
set the port that your firewall can pass
I have the same problem with you, and I think there is nothing to do with the network level authentication. The main reason is the default remote desktop app will connecting through port 3389, but your VM's default endpoint set another public port, here is what i do to solve it:
Download the latest version of Microsoft Remote Desktop app at Mac app store.
Add the port after your connection's DOMAIN/IP like yourvmdomain.com:yourpublicport. You will find the public port on endpoint setting tab. To me, the public port of Remote Desktop is 58494, so the connection will be xx.xx.xx.xx:58494.
This works for me.
Download the new Microsoft remote desktop client, which will allow you to connect to Azure instances without changing the configuration.
(As suggested in the comment from Kim Burgess)
It's tricky to connect to an Azure Cloud Service (aka Web or Worker Role) from a Mac, since PaaS instances sit behind a load balancer. You therefore need to specify which instance to connect to via cookies.
Royal TS supports cookies, so I got this working:
Install Royal TS free version (http://www.royalapplications.com/ts/osx/features)
Add the Remote Desktop plugin
Create new connection
Enter usual details (server/username/password)
Advanced > Connection > Load Balance Info > Cookie: mstshash=Your.Server#Your.Server_IN_0
This cookie info is available in the RDP file you can download for your instance from the Azure management portal (just open it in a text editor).
I use the Microsoft Remote Desktop application on OSX to connect to an Azure VM.
Recently I set up a VM from a Windows machine and was able to connect successfully using the admin username and password, but found that I had to reset the admin password to connect from OSX.
You can easily reset the password from the Azure portal for the VM. Go to "Support + troubleshooting/Reset Password".
I often have to enter the user name in the form:
PC name: xxx.xxx.xxx.xxx:yyyyy
Gateway: No gateway configured
User name: localhost\user.name
Hope that helps someone.
To access Azure instances from a MAC download Microsoft Remote Desktop client in Appstore. The default RDP client Azure provides doesnt work on a MAC. Worked for me
Check that your Networking Inbound Port rules (typically port 3389, but will change behind a load balancer) for the Azure VM allow you in.

Windows Store App, VPN, RAS Api

Our windows store app allows user to manage (create or dial) VPN profiles.
For this functionality we use
RAS Api (create and dial VPN profile)
RAS Api
Wlan Api (listen to wifi networks) - will be changed to classes with Windows.Networking.Connectivity in windows8
Wlan Api
We face following troubles for Windows Store application:
RAS API functions don't work properly under windows store application template (as example RasEnumDevices return error code 5 - Access Denied).
However it works good from desktop application launched on windows 8.
Question: how we could get RAS API to work under window store applications? If that is absolutely impossible - is there any other way to create VPN connection in app developed for Windows Store?
All user's VPN profiles stored by Windows OS in "..\Microsoft\Network\Connections\Pbk\rasphone.pbk", file could be found on file system manually, but we don't have access to this file via API, either we can't access it directrly. Current workarround uses own created PBK file located in users profile folder.
Question: how we could get access to system VPN connections stored in OS.
Thanks.
Hotspot Shield VPN for Windows offers private browsing to ensure the privacy of your web session.
Check it out here: http://www.anchorfree.com/hotspot-shield-VPN-download-windows.php

How does one add services to the Windows Firewall trust list, or prompt the user to do the same?

I integrated a small http server in my software distribution, intended to allow access to my installed application from the customer's LAN.
Right now, the customer has to manually update the firewall's list of trusted applications. I want to either open a hole in the firewall at install-time, or to ensure that the firewall prompts the user to allow my web server as a trusted application, able to receive inbound traffic.
Any solution should work with the built-in Windows Firewall at minimum.
Suggestions?
I would start out by reading up on the following sections on MSDN. This should give you enough background to know what you need. In short you could be looking to talk to the INetFwMgr COM object.
XP
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366453%28v=vs.85%29.aspx
Vista or later INetFwPolicy2
http://msdn.microsoft.com/en-us/library/windows/desktop/ff956124(v=vs.85).aspx

Resources