-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Cards not working with the MITM component #382
Comments
Supporting SmartCard is not something we are interested in at this point. I don't even know how to test it. That said, if you are willing to do the exploration and the code changes required, we can guide you. |
I used EIDVirtual to create a smart card out of an usb stick. By installing EIDVirtual on the server, one can use the smart card manager to view the certificates on the smart card in the remote server. |
Information about how to decrypt TLS traffic with Wireshark can be found in Wireshark's wiki. An easier-to-follow tutorial with screenshots is also available here: https://unit42.paloaltonetworks.com/wireshark-tutorial-decrypting-https-traffic/. Record the whole conversation then open the pcap following the TLS decryption instructions. The TLS master-secrets will be in Good luck and keep us posted on your progress! |
After dumping the incoming and outgoing packets via tcpdump using the following filters:
I don't seem to be able to filter the traffic by rdp in wireshark, and all I see is a bit of TLS1.2 traffic followed by a large amount of TCP packets. I did configure wireshark to use the log field and also supplied the private key in the preferences > protocols > TLS This is what i did in order:
Any ideas what I may be missing? My networking knowledge is a bit limited so any help would be appreciated. |
Also, it seems that all the IO requests and responses pass through except the 0x000900a4 | FSCTL_SET_REPARSE_POINT call, which has something to do with SCardGetStatusChangeW (Couldn't really figure out this part). |
I tried various combinations of supplying the pk and the log and was not successful |
These two IO requests (as defined in the docs) from the server never receive a response. Any ideas on what the cause may be? |
I think it might be because we implemented MITM for Device IO since it is how we collect files but we haven't done anything regarding smart cards. One approach would be to use a debugger at the right spots and see if you could pass through the exchange back and forth instead of intercepting them. For example: install ipdb
add a statement to trigger the debugger at the right spot. In
Add:
Restart Good luck! |
It appears that the major function field is set to 0x0000000C and the minor function is 0 even though it is explicitly stated that this is not a valid state of the pdu in the docs. |
You are not providing enough details. Without them, I can't help you.
|
Yes, my bad. Had to tend to some other stuff and could not exactly pay attention. Sorry for any inconvenience this may have caused. Now that i'm back, I realized that what I said here was incorrect. There is nothing wrong with the pdu. Upon further investigation, and some parsing by hand, I managed to extract the ioctl codes for the smart card DeviceIOControl calls. I couldn't find anything about the codes that I parsed, but then stumbled across the definitions in the smart card extension page There really should be no issue for smart cards, as all the pdu's that pass through are just forwarded with no modifications, and I couldn't find anything that was mishandled. Do we need to do some additional work to support the protocol extensions?
|
Does that feature use DynamicChannels or VirtualChannels? We don't support DynamicChannels just yet. See #232 for the beginning of that work. |
@olivier i checked, it's the rdpdr channel (device redirection)
…On Fri., Jan. 28, 2022, 10:25 Olivier Bilodeau, ***@***.***> wrote:
Does that feature use DynamicChannels or VirtualChannels? We don't support
DynamicChannels just yet. See #232
<#232> for the beginning of that
work.
—
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADPMNLY5BF5HA7672EQ63STUYKYP3ANCNFSM5LONWC3Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
When connecting to a server via pyrdp MITM, smart cards are not working properly. The device appears on the remote host but the certificates in the smart card are unaccessible.
The text was updated successfully, but these errors were encountered: