Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 9:14 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Dec 18, 2014 10:04 pm 
Offline

Joined: Tue Nov 18, 2014 9:14 pm
Posts: 95
Location: San Jose, CA
Question 1: Is it possible for me to select the NDEF app and query it for its value from the USB interface?

Question 2: Can the NDEF feature on the NEO be disabled?


Last edited by darco on Fri Jan 02, 2015 11:02 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Fri Dec 19, 2014 12:42 am 
Offline

Joined: Tue Nov 18, 2014 9:14 pm
Posts: 95
Location: San Jose, CA
Well, it seems I answered my first question:
Code:
OpenSC [3F00]> apdu 00 A4 04 00 07 D2 76 00 00 85 01 01 00
Sending: 00 A4 04 00 07 D2 76 00 00 85 01 01 00
Received (SW1=0x90, SW2=0x00)
Success!
OpenSC [3F00]> apdu 00 A4 00 0C 02 E1 03
Sending: 00 A4 00 0C 02 E1 03
Received (SW1=0x90, SW2=0x00)
Success!
OpenSC [3F00]> apdu 00 B0 00 00 0F
Sending: 00 B0 00 00 0F
Received (SW1=0x90, SW2=0x00):
00 0F 20 00 7F 00 7F 04 06 E1 04 00 7F 00 00 .. ......?.....
Success!
OpenSC [3F00]> apdu 00 A4 00 0C 02 E1 04
Sending: 00 A4 00 0C 02 E1 04
Received (SW1=0x90, SW2=0x00)
Success!
OpenSC [3F00]> apdu  00 B0 00 00 02
Sending: 00 B0 00 00 02
Received (SW1=0x69, SW2=0x83)
Failure: Authentication method blocked


It also fails to read the OTP when using the private yubico API (which is what I would expect):
Code:
OpenSC [3F00]> apdu 00 a4 04 00 08 A0 00 00 05 27 20 01 01
Sending: 00 A4 04 00 08 A0 00 00 05 27 20 01 01
Received (SW1=0x90, SW2=0x00):
03 03 00 01 85 07 06 00 00 00 ..........
Success!
OpenSC [3F00]> apdu 00 03 00 00 00
Sending: 00 03 00 00 00
Received (SW1=0x90, SW2=0x00):
03 03 00 01 85 07 ......
Success!
OpenSC [3F00]> apdu 00 02 00 00 00
Sending: 00 02 00 00 00
Received (SW1=0x69, SW2=0x85)
Failure: Not allowed


So, unless I am interpreting these results incorrectly, it seems that you cannot read the OTP value from a slot without performing some sort of user action, either by pressing the button or by NFC NDEF. This is a good thing.

I'm curious if it is possible to read the NDEF multiple times over NFC (without removing and replacing the ykneo), but the security impact of that would be considerably less significant.


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 19, 2014 4:33 pm 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
As you've discovered, if the NDEF is read over a contact interface it requires the button to be touched.

If you read it several times over NFC you'll get the same behaviour as if you touch the button several times in one session, the session counter is incremented for each OTP read.

And to answer #2, no way to completely disable NDEF.

/klas


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 19, 2014 10:56 pm 
Offline

Joined: Tue Nov 18, 2014 9:14 pm
Posts: 95
Location: San Jose, CA
Too bad about not being able to disable NDEF support. That would be a desirable feature for a future version, by the way.

I notice that multiple requests to read 0xE104 yield the same OTP. After which specific command is the OTP generated? Is it when I select 0xE104, or when I read it first?

I also noticed that if I query the OTP directly from the YubicoOTP app (using APDU 00 02 00 00 00) that I can query for many new OTPs successfully for as long as my ykneo is laying on top of the NFC reader. Not really a problem as a reset will probably get similar behavior from the NDEF app... Just pointing it out to anyone who is reading and interested.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 22, 2014 7:58 am 
Offline
Site Admin
Site Admin

Joined: Thu Apr 19, 2012 1:45 pm
Posts: 148
Yes, you're entirely correct, the NDEF applet will always respond with the same OTP (until it's re-selected).
The main reason that the NDEF applet returns the same OTP is that it supports chunking by specifying an offset in p1 and p2.

/klas


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group